diff --git a/specs/latest/open-api3-latest-client.json b/specs/latest/open-api3-latest-client.json index fe3fbf77..f6be858b 100644 --- a/specs/latest/open-api3-latest-client.json +++ b/specs/latest/open-api3-latest-client.json @@ -176,21 +176,21 @@ } } }, - "\/account\/email": { - "patch": { - "summary": "Update email", - "operationId": "accountUpdateEmail", + "\/account\/consents": { + "get": { + "summary": "List consents", + "operationId": "accountListConsents", "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", + "description": "Get a list of the OAuth2 consents the current user has given to third-party apps.", "responses": { "200": { - "description": "User", + "description": "OAuth2 consents list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/oauth2ConsentList" } } } @@ -198,11 +198,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmail", - "group": "account", + "method": "listConsents", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/update-email.md", + "demo": "account\/list-consents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -214,7 +214,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "auth": { "Project": [] } @@ -226,50 +225,49 @@ "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "email", - "password" - ] - } - } + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/account\/identities": { + "\/account\/consents\/{consentId}": { "get": { - "summary": "List identities", - "operationId": "accountListIdentities", + "summary": "Get consent", + "operationId": "accountGetConsent", "tags": [ "account" ], - "description": "Get the list of identities for the currently logged in user.", + "description": "Get an OAuth2 consent the current user has given to a third-party app by its unique ID.", "responses": { "200": { - "description": "Identities List", + "description": "OAuth2 Consent", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/identityList" + "$ref": "#\/components\/schemas\/oauth2Consent" } } } @@ -277,11 +275,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIdentities", - "group": "identities", + "method": "getConsent", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/list-identities.md", + "demo": "account\/get-consent.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -293,7 +291,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "auth": { "Project": [] } @@ -307,40 +304,24 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "consentId", + "description": "Consent unique ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - } - }, - "\/account\/identities\/{identityId}": { + }, "delete": { - "summary": "Delete identity", - "operationId": "accountDeleteIdentity", + "summary": "Delete consent", + "operationId": "accountDeleteConsent", "tags": [ "account" ], - "description": "Delete an identity by its unique ID.", + "description": "Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.", "responses": { "204": { "description": "No content" @@ -348,11 +329,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", + "method": "deleteConsent", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/delete-identity.md", + "demo": "account\/delete-consent.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -364,7 +345,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -378,33 +361,33 @@ ], "parameters": [ { - "name": "identityId", - "description": "Identity ID.", + "name": "consentId", + "description": "Consent unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/account\/jwts": { - "post": { - "summary": "Create JWT", - "operationId": "accountCreateJWT", + "\/account\/consents\/{consentId}\/tokens": { + "get": { + "summary": "List consent tokens", + "operationId": "accountListConsentTokens", "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.", + "description": "Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.", "responses": { - "201": { - "description": "JWT", + "200": { + "description": "OAuth2 consent tokens list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/jwt" + "$ref": "#\/components\/schemas\/oauth2ConsentTokenList" } } } @@ -412,14 +395,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "createJWT", - "group": "tokens", + "method": "listConsentTokens", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/create-jwt.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "url:{url},userId:{userId}", + "demo": "account\/list-consent-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "account", "platforms": [ "console", @@ -428,7 +411,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "auth": { "Project": [] } @@ -440,41 +422,59 @@ "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/account\/logs": { + "\/account\/consents\/{consentId}\/tokens\/{tokenId}": { "get": { - "summary": "List logs", - "operationId": "accountListLogs", + "summary": "Get consent token", + "operationId": "accountGetConsentToken", "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.", + "description": "Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.", "responses": { "200": { - "description": "Logs List", + "description": "OAuth2 Consent Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/oauth2ConsentToken" } } } @@ -482,11 +482,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "logs", + "method": "getConsentToken", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/list-logs.md", + "demo": "account\/get-consent-token.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -498,7 +498,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "auth": { "Project": [] } @@ -512,59 +511,46 @@ ], "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, + "name": "consentId", + "description": "Consent unique ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "tokenId", + "description": "Token unique ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - } - }, - "\/account\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "accountUpdateMFA", + }, + "delete": { + "summary": "Delete consent token", + "operationId": "accountDeleteConsentToken", "tags": [ "account" ], - "description": "Enable or disable MFA on an account.", + "description": "Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateMFA", - "group": "mfa", + "method": "deleteConsentToken", + "group": "consents", "cookies": false, "type": "", - "demo": "account\/update-mfa.md", + "demo": "account\/delete-consent-token.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -576,7 +562,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -588,54 +576,57 @@ "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false - } - }, - "required": [ - "mfa" - ] - } - } + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } - } + ] } }, - "\/account\/mfa\/authenticators\/{type}": { - "post": { - "summary": "Create authenticator", - "operationId": "accountCreateMfaAuthenticator", + "\/account\/email": { + "patch": { + "summary": "Update email", + "operationId": "accountUpdateEmail", "tags": [ "account" ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "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": "MFAType", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaType" + "$ref": "#\/components\/schemas\/user" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createMfaAuthenticator", - "group": "mfa", + "method": "updateEmail", + "group": "account", "cookies": false, "type": "", - "demo": "account\/create-mfa-authenticator.md", + "demo": "account\/update-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -646,64 +637,8 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - }, - "methods": [ - { - "name": "createMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAAuthenticator" - } - }, - { - "name": "createMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaType" - } - ], - "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", - "demo": "account\/create-mfa-authenticator.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "auth": { "Project": [] } @@ -715,52 +650,62 @@ "JWT": [] } ], - "parameters": [ - { - "name": "type", - "description": "Type of authenticator. Must be `totp`", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [ - "totp" - ] - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "email", + "password" + ] + } + } } - ] - }, - "put": { - "summary": "Update authenticator (confirmation)", - "operationId": "accountUpdateMfaAuthenticator", + } + } + }, + "\/account\/identities": { + "get": { + "summary": "List identities", + "operationId": "accountListIdentities", "tags": [ "account" ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "description": "Get the list of identities for the currently logged in user.", "responses": { "200": { - "description": "User", + "description": "Identities List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/identityList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfaAuthenticator", - "group": "mfa", + "method": "listIdentities", + "group": "identities", "cookies": false, "type": "", - "demo": "account\/update-mfa-authenticator.md", + "demo": "account\/list-identities.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -771,68 +716,8 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - }, - "methods": [ - { - "name": "updateMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAAuthenticator" - } - }, - { - "name": "updateMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type", - "otp" - ], - "required": [ - "type", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", - "demo": "account\/update-mfa-authenticator.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "auth": { "Project": [] } @@ -846,62 +731,52 @@ ], "parameters": [ { - "name": "type", - "description": "Type of authenticator.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [ - "totp" - ] + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" - } - }, - "required": [ - "otp" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - }, + ] + } + }, + "\/account\/identities\/{identityId}": { "delete": { - "summary": "Delete authenticator", - "operationId": "accountDeleteMfaAuthenticator", + "summary": "Delete identity", + "operationId": "accountDeleteIdentity", "tags": [ "account" ], - "description": "Delete an authenticator for a user by ID.", + "description": "Delete an identity by its unique ID.", "responses": { "204": { "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", + "method": "deleteIdentity", + "group": "identities", "cookies": false, "type": "", - "demo": "account\/delete-mfa-authenticator.md", + "demo": "account\/delete-identity.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -912,62 +787,8 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "type" - ], - "required": [ - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator for a user by ID.", - "demo": "account\/delete-mfa-authenticator.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "auth": { "Project": [] } @@ -981,54 +802,47 @@ ], "parameters": [ { - "name": "type", - "description": "Type of authenticator.", + "name": "identityId", + "description": "Identity ID.", "required": true, "schema": { "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [ - "totp" - ] + "x-example": "" }, "in": "path" } ] } }, - "\/account\/mfa\/challenges": { + "\/account\/jwts": { "post": { - "summary": "Create MFA challenge", - "operationId": "accountCreateMfaChallenge", + "summary": "Create JWT", + "operationId": "accountCreateJWT", "tags": [ "account" ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "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": "MFA Challenge", + "description": "JWT", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaChallenge" + "$ref": "#\/components\/schemas\/jwt" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createMfaChallenge", - "group": "mfa", + "method": "createJWT", + "group": "tokens", "cookies": false, "type": "", - "demo": "account\/create-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, + "demo": "account\/create-jwt.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},userId:{userId}", "scope": "account", "platforms": [ @@ -1037,64 +851,8 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - }, - "methods": [ - { - "name": "createMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.createMFAChallenge" - } - }, - { - "name": "createMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "factor" - ], - "required": [ - "factor" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaChallenge" - } - ], - "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", - "demo": "account\/create-mfa-challenge.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "auth": { "Project": [] } @@ -1112,62 +870,50 @@ "schema": { "type": "object", "properties": { - "factor": { - "type": "string", - "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", - "x-example": "email", - "enum": [ - "email", - "phone", - "totp", - "recoverycode" - ], - "x-enum-name": "AuthenticationFactor", - "x-enum-keys": [ - "email", - "phone", - "totp", - "recoverycode" - ] + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" } - }, - "required": [ - "factor" - ] + } } } } } - }, - "put": { - "summary": "Update MFA challenge (confirmation)", - "operationId": "accountUpdateMfaChallenge", + } + }, + "\/account\/logs": { + "get": { + "summary": "List logs", + "operationId": "accountListLogs", "tags": [ "account" ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "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": "Session", + "description": "Logs List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/logList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfaChallenge", - "group": "mfa", + "method": "listLogs", + "group": "logs", "cookies": false, "type": "", - "demo": "account\/update-mfa-challenge.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},challengeId:{param-challengeId}", + "demo": "account\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "account", "platforms": [ "console", @@ -1175,68 +921,86 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - }, - "methods": [ - { - "name": "updateMfaChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" - } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "account.updateMFAChallenge" - } + "default": [] }, - { - "name": "updateMFAChallenge", - "namespace": "account", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "challengeId", - "otp" - ], - "required": [ - "challengeId", - "otp" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/session" + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "accountUpdateMFA", + "tags": [ + "account" + ], + "description": "Enable or disable MFA on an account.", + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" } - ], - "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/update-mfa-challenge.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMFA", + "group": "mfa", + "cookies": false, + "type": "", + "demo": "account\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "auth": { "Project": [] } @@ -1254,20 +1018,14 @@ "schema": { "type": "object", "properties": { - "challengeId": { - "type": "string", - "description": "ID of the challenge.", - "x-example": "" - }, - "otp": { - "type": "string", - "description": "Valid verification token.", - "x-example": "" + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false } }, "required": [ - "challengeId", - "otp" + "mfa" ] } } @@ -1275,21 +1033,21 @@ } } }, - "\/account\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "accountListMfaFactors", + "\/account\/mfa\/authenticators\/{type}": { + "post": { + "summary": "Create authenticator", + "operationId": "accountCreateMfaAuthenticator", "tags": [ "account" ], - "description": "List the factors available on the account to be used as a MFA challange.", + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", "responses": { "200": { - "description": "MFAFactors", + "description": "MFAType", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" + "$ref": "#\/components\/schemas\/mfaType" } } } @@ -1297,11 +1055,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "listMfaFactors", + "method": "createMfaAuthenticator", "group": "mfa", "cookies": false, "type": "", - "demo": "account\/list-mfa-factors.md", + "demo": "account\/create-mfa-authenticator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1313,52 +1071,60 @@ ], "packaging": false, "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "deprecated": { "since": "1.8.0", - "replaceWith": "account.listMFAFactors" + "replaceWith": "account.createMFAAuthenticator" }, "methods": [ { - "name": "listMfaFactors", + "name": "createMfaAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type" + ], + "required": [ + "type" + ], "responses": [ { "code": 200, - "model": "#\/components\/schemas\/mfaFactors" + "model": "#\/components\/schemas\/mfaType" } ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", "public": false, "deprecated": { "since": "1.8.0", - "replaceWith": "account.listMFAFactors" + "replaceWith": "account.createMFAAuthenticator" } }, { - "name": "listMFAFactors", + "name": "createMFAAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type" + ], + "required": [ + "type" + ], "responses": [ { "code": 200, - "model": "#\/components\/schemas\/mfaFactors" + "model": "#\/components\/schemas\/mfaType" } ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "account\/list-mfa-factors.md", + "description": "Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](\/docs\/references\/cloud\/client-web\/account#updateMfaAuthenticator) method.", + "demo": "account\/create-mfa-authenticator.md", "public": true } ], @@ -1372,24 +1138,41 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator. Must be `totp`", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [ + "totp" + ] + }, + "in": "path" + } ] - } - }, - "\/account\/mfa\/recovery-codes": { - "get": { - "summary": "List MFA recovery codes", - "operationId": "accountGetMfaRecoveryCodes", + }, + "put": { + "summary": "Update authenticator (confirmation)", + "operationId": "accountUpdateMfaAuthenticator", "tags": [ "account" ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", "responses": { "200": { - "description": "MFA Recovery Codes", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/user" } } } @@ -1397,11 +1180,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "getMfaRecoveryCodes", + "method": "updateMfaAuthenticator", "group": "mfa", "cookies": false, "type": "", - "demo": "account\/get-mfa-recovery-codes.md", + "demo": "account\/update-mfa-authenticator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1413,52 +1196,64 @@ ], "packaging": false, "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "deprecated": { "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" + "replaceWith": "account.updateMFAAuthenticator" }, "methods": [ { - "name": "getMfaRecoveryCodes", + "name": "updateMfaAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], "responses": [ { "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "model": "#\/components\/schemas\/user" } ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", "public": false, "deprecated": { "since": "1.8.0", - "replaceWith": "account.getMFARecoveryCodes" + "replaceWith": "account.updateMFAAuthenticator" } }, { - "name": "getMFARecoveryCodes", + "name": "updateMFAAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type", + "otp" + ], + "required": [ + "type", + "otp" + ], "responses": [ { "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "model": "#\/components\/schemas\/user" } ], - "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", - "demo": "account\/get-mfa-recovery-codes.md", + "description": "Verify an authenticator app after adding it using the [add authenticator](\/docs\/references\/cloud\/client-web\/account#createMfaAuthenticator) method.", + "demo": "account\/update-mfa-authenticator.md", "public": true } ], @@ -1472,34 +1267,65 @@ "Session": [], "JWT": [] } - ] + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [ + "totp" + ] + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "otp" + ] + } + } + } + } }, - "post": { - "summary": "Create MFA recovery codes", - "operationId": "accountCreateMfaRecoveryCodes", + "delete": { + "summary": "Delete authenticator", + "operationId": "accountDeleteMfaAuthenticator", "tags": [ "account" ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "description": "Delete an authenticator for a user by ID.", "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } + "204": { + "description": "No content" } }, "deprecated": true, "x-appwrite": { - "method": "createMfaRecoveryCodes", + "method": "deleteMfaAuthenticator", "group": "mfa", "cookies": false, "type": "", - "demo": "account\/create-mfa-recovery-codes.md", + "demo": "account\/delete-mfa-authenticator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1511,52 +1337,58 @@ ], "packaging": false, "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "deprecated": { "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" + "replaceWith": "account.deleteMFAAuthenticator" }, "methods": [ { - "name": "createMfaRecoveryCodes", + "name": "deleteMfaAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type" + ], + "required": [ + "type" + ], "responses": [ { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "code": 204 } ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", "public": false, "deprecated": { "since": "1.8.0", - "replaceWith": "account.createMFARecoveryCodes" + "replaceWith": "account.deleteMFAAuthenticator" } }, { - "name": "createMFARecoveryCodes", + "name": "deleteMFAAuthenticator", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "type" + ], + "required": [ + "type" + ], "responses": [ { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "code": 204 } ], - "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", - "demo": "account\/create-mfa-recovery-codes.md", + "description": "Delete an authenticator for a user by ID.", + "demo": "account\/delete-mfa-authenticator.md", "public": true } ], @@ -1570,22 +1402,43 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [ + "totp" + ] + }, + "in": "path" + } ] - }, - "patch": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "accountUpdateMfaRecoveryCodes", + } + }, + "\/account\/mfa\/challenges": { + "post": { + "summary": "Create MFA challenge", + "operationId": "accountCreateMfaChallenge", "tags": [ "account" ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", "responses": { - "200": { - "description": "MFA Recovery Codes", + "201": { + "description": "MFA Challenge", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/mfaChallenge" } } } @@ -1593,14 +1446,14 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateMfaRecoveryCodes", + "method": "createMfaChallenge", "group": "mfa", "cookies": false, "type": "", - "demo": "account\/update-mfa-recovery-codes.md", - "rate-limit": 0, + "demo": "account\/create-mfa-challenge.md", + "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-key": "url:{url},userId:{userId}", "scope": "account", "platforms": [ "console", @@ -1608,53 +1461,61 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "deprecated": { "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" + "replaceWith": "account.createMFAChallenge" }, "methods": [ { - "name": "updateMfaRecoveryCodes", + "name": "createMfaChallenge", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], "responses": [ { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" } ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", - "public": true, + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", + "public": false, "deprecated": { "since": "1.8.0", - "replaceWith": "account.updateMFARecoveryCodes" + "replaceWith": "account.createMFAChallenge" } }, { - "name": "updateMFARecoveryCodes", + "name": "createMFAChallenge", "namespace": "account", "desc": "", "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "factor" + ], + "required": [ + "factor" + ], "responses": [ { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" + "code": 201, + "model": "#\/components\/schemas\/mfaChallenge" } ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", - "demo": "account\/update-mfa-recovery-codes.md", + "description": "Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](\/docs\/references\/cloud\/client-web\/account#updateMfaChallenge) method.", + "demo": "account\/create-mfa-challenge.md", "public": true } ], @@ -1662,58 +1523,6 @@ "Project": [] } }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ] - } - }, - "\/account\/name": { - "patch": { - "summary": "Update name", - "operationId": "accountUpdateName", - "tags": [ - "account" - ], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateName", - "group": "account", - "cookies": false, - "type": "", - "demo": "account\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", - "auth": { - "Project": [] - } - }, "security": [ { "Project": [], @@ -1727,51 +1536,62 @@ "schema": { "type": "object", "properties": { - "name": { + "factor": { "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "" + "description": "Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.", + "x-example": "email", + "enum": [ + "email", + "phone", + "totp", + "recoverycode" + ], + "x-enum-name": "AuthenticationFactor", + "x-enum-keys": [ + "email", + "phone", + "totp", + "recoverycode" + ] } }, "required": [ - "name" + "factor" ] } } } } - } - }, - "\/account\/password": { - "patch": { - "summary": "Update password", - "operationId": "accountUpdatePassword", + }, + "put": { + "summary": "Update MFA challenge (confirmation)", + "operationId": "accountUpdateMfaChallenge", "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.", + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { "200": { - "description": "User", + "description": "Session", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/session" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updatePassword", - "group": "account", + "method": "updateMfaChallenge", + "group": "mfa", "cookies": false, "type": "", - "demo": "account\/update-password.md", + "demo": "account\/update-mfa-challenge.md", "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-key": "url:{url},challengeId:{param-challengeId}", "scope": "account", "platforms": [ "console", @@ -1779,8 +1599,68 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + }, + "methods": [ + { + "name": "updateMfaChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFAChallenge" + } + }, + { + "name": "updateMFAChallenge", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "challengeId", + "otp" + ], + "required": [ + "challengeId", + "otp" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/session" + } + ], + "description": "Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/update-mfa-challenge.md", + "public": true + } + ], "auth": { "Project": [] } @@ -1798,22 +1678,20 @@ "schema": { "type": "object", "properties": { - "password": { + "challengeId": { "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" + "description": "ID of the challenge.", + "x-example": "" }, - "oldPassword": { + "otp": { "type": "string", - "description": "Current user password. Max length: 256 chars.", - "default": "", - "x-example": "password", - "format": "password" + "description": "Valid verification token.", + "x-example": "" } }, "required": [ - "password" + "challengeId", + "otp" ] } } @@ -1821,33 +1699,33 @@ } } }, - "\/account\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "accountUpdatePhone", + "\/account\/mfa\/factors": { + "get": { + "summary": "List factors", + "operationId": "accountListMfaFactors", "tags": [ "account" ], - "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", + "description": "List the factors available on the account to be used as a MFA challange.", "responses": { "200": { - "description": "User", + "description": "MFAFactors", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/mfaFactors" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updatePhone", - "group": "account", + "method": "listMfaFactors", + "group": "mfa", "cookies": false, "type": "", - "demo": "account\/update-phone.md", + "demo": "account\/list-mfa-factors.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1858,8 +1736,56 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "account\/list-mfa-factors.md", + "public": true + } + ], "auth": { "Project": [] } @@ -1870,63 +1796,36 @@ "Session": [], "JWT": [] } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "phone", - "password" - ] - } - } - } - } + ] } }, - "\/account\/prefs": { + "\/account\/mfa\/recovery-codes": { "get": { - "summary": "Get account preferences", - "operationId": "accountGetPrefs", + "summary": "List MFA recovery codes", + "operationId": "accountGetMfaRecoveryCodes", "tags": [ "account" ], - "description": "Get the preferences as a key-value object for the currently logged in user.", + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", "responses": { "200": { - "description": "Preferences", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getPrefs", - "group": "account", + "method": "getMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "account\/get-prefs.md", + "demo": "account\/get-mfa-recovery-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1937,8 +1836,56 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.", + "demo": "account\/get-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [] } @@ -1951,32 +1898,32 @@ } ] }, - "patch": { - "summary": "Update preferences", - "operationId": "accountUpdatePrefs", + "post": { + "summary": "Create MFA recovery codes", + "operationId": "accountCreateMfaRecoveryCodes", "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.", + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", "responses": { - "200": { - "description": "User", + "201": { + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updatePrefs", - "group": "account", + "method": "createMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "account\/update-prefs.md", + "demo": "account\/create-mfa-recovery-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -1987,8 +1934,56 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method.", + "demo": "account\/create-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [] } @@ -1999,63 +1994,38 @@ "Session": [], "JWT": [] } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" - } - }, - "required": [ - "prefs" - ] - } - } - } - } - } - }, - "\/account\/recovery": { - "post": { - "summary": "Create password recovery", - "operationId": "accountCreateRecovery", + ] + }, + "patch": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "accountUpdateMfaRecoveryCodes", "tags": [ "account" ], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", "responses": { - "201": { - "description": "Token", + "200": { + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/token" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRecovery", - "group": "recovery", + "method": "updateMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "account\/create-recovery.md", - "rate-limit": 10, + "demo": "account\/update-mfa-recovery-codes.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": [ - "url:{url},email:{param-email}", - "url:{url},ip:{ip}" - ], - "scope": "sessions.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "account", "platforms": [ "console", "client", @@ -2063,7 +2033,55 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "account.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "account", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.", + "demo": "account\/update-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [] } @@ -2074,49 +2092,24 @@ "Session": [], "JWT": [] } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "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", - "format": "url" - } - }, - "required": [ - "email", - "url" - ] - } - } - } - } - }, - "put": { - "summary": "Update password recovery (confirmation)", - "operationId": "accountUpdateRecovery", + ] + } + }, + "\/account\/name": { + "patch": { + "summary": "Update name", + "operationId": "accountUpdateName", "tags": [ "account" ], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "description": "Update currently logged in user account name.", "responses": { "200": { - "description": "Token", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/token" + "$ref": "#\/components\/schemas\/user" } } } @@ -2124,15 +2117,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecovery", - "group": "recovery", + "method": "updateName", + "group": "account", "cookies": false, "type": "", - "demo": "account\/update-recovery.md", - "rate-limit": 10, + "demo": "account\/update-name.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "sessions.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "account", "platforms": [ "console", "client", @@ -2140,7 +2133,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "auth": { "Project": [] } @@ -2158,27 +2151,14 @@ "schema": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "x-example": "" - }, - "password": { + "name": { "type": "string", - "description": "New user password. Must be between 8 and 256 chars.", - "x-example": "password", - "format": "password" + "description": "User name. Max length: 128 chars.", + "x-example": "" } }, "required": [ - "userId", - "secret", - "password" + "name" ] } } @@ -2186,21 +2166,21 @@ } } }, - "\/account\/sessions": { - "get": { - "summary": "List sessions", - "operationId": "accountListSessions", + "\/account\/password": { + "patch": { + "summary": "Update password", + "operationId": "accountUpdatePassword", "tags": [ "account" ], - "description": "Get the list of active sessions across different devices for the currently logged in user.", + "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": "Sessions List", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/sessionList" + "$ref": "#\/components\/schemas\/user" } } } @@ -2208,12 +2188,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSessions", - "group": "sessions", + "method": "updatePassword", + "group": "account", "cookies": false, "type": "", - "demo": "account\/list-sessions.md", - "rate-limit": 0, + "demo": "account\/update-password.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "account", @@ -2224,7 +2204,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "auth": { "Project": [] } @@ -2235,28 +2215,64 @@ "Session": [], "JWT": [] } - ] - }, - "delete": { - "summary": "Delete sessions", - "operationId": "accountDeleteSessions", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Max length: 256 chars.", + "default": "", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] + } + } + } + } + } + }, + "\/account\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "accountUpdatePhone", "tags": [ "account" ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "description": "Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST \/account\/verification\/phone](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createPhoneVerification) endpoint to send a confirmation SMS.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", + "method": "updatePhone", + "group": "account", "cookies": false, "type": "", - "demo": "account\/delete-sessions.md", - "rate-limit": 100, + "demo": "account\/update-phone.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "account", @@ -2267,7 +2283,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "auth": { "Project": [] } @@ -2278,24 +2294,51 @@ "Session": [], "JWT": [] } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "phone", + "password" + ] + } + } + } + } } }, - "\/account\/sessions\/anonymous": { - "post": { - "summary": "Create anonymous session", - "operationId": "accountCreateAnonymousSession", + "\/account\/prefs": { + "get": { + "summary": "Get account preferences", + "operationId": "accountGetPrefs", "tags": [ "account" ], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "description": "Get the preferences as a key-value object for the currently logged in user.", "responses": { - "201": { - "description": "Session", + "200": { + "description": "Preferences", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/preferences" } } } @@ -2303,15 +2346,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createAnonymousSession", - "group": "sessions", + "method": "getPrefs", + "group": "account", "cookies": false, "type": "", - "demo": "account\/create-anonymous-session.md", - "rate-limit": 50, + "demo": "account\/get-prefs.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "account", "platforms": [ "console", "client", @@ -2319,7 +2362,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "auth": { "Project": [] } @@ -2331,23 +2374,21 @@ "JWT": [] } ] - } - }, - "\/account\/sessions\/email": { - "post": { - "summary": "Create email password session", - "operationId": "accountCreateEmailPasswordSession", + }, + "patch": { + "summary": "Update preferences", + "operationId": "accountUpdatePrefs", "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "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": { - "201": { - "description": "Session", + "200": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/user" } } } @@ -2355,15 +2396,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEmailPasswordSession", - "group": "sessions", + "method": "updatePrefs", + "group": "account", "cookies": false, "type": "", - "demo": "account\/create-email-password-session.md", - "rate-limit": 10, + "demo": "account\/update-prefs.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "sessions.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "account", "platforms": [ "console", "client", @@ -2371,7 +2412,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "auth": { "Project": [] } @@ -2389,59 +2430,132 @@ "schema": { "type": "object", "properties": { - "email": { - "type": "string", + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } + } + }, + "\/account\/recovery": { + "post": { + "summary": "Create password recovery", + "operationId": "accountCreateRecovery", + "tags": [ + "account" + ], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/token" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecovery", + "group": "recovery", + "cookies": false, + "type": "", + "demo": "account\/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": [ + "url:{url},email:{param-email}", + "url:{url},ip:{ip}" + ], + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", "description": "User email.", "x-example": "email@example.com", "format": "email" }, - "password": { + "url": { "type": "string", - "description": "User password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" + "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", + "format": "url" } }, "required": [ "email", - "password" + "url" ] } } } } - } - }, - "\/account\/sessions\/magic-url": { + }, "put": { - "summary": "Update magic URL session", - "operationId": "accountUpdateMagicURLSession", + "summary": "Update password recovery (confirmation)", + "operationId": "accountUpdateRecovery", "tags": [ "account" ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", "responses": { - "201": { - "description": "Session", + "200": { + "description": "Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/token" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMagicURLSession", - "group": "sessions", + "method": "updateRecovery", + "group": "recovery", "cookies": false, "type": "", - "demo": "account\/update-magic-url-session.md", + "demo": "account\/update-recovery.md", "rate-limit": 10, "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", + "rate-key": "url:{url},userId:{param-userId}", "scope": "sessions.write", "platforms": [ "console", @@ -2450,11 +2564,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "auth": { "Project": [] } @@ -2474,21 +2584,25 @@ "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "User ID.", + "x-example": "" }, "secret": { "type": "string", - "description": "Valid verification token.", + "description": "Valid reset token.", "x-example": "" + }, + "password": { + "type": "string", + "description": "New user password. Must be between 8 and 256 chars.", + "x-example": "password", + "format": "password" } }, "required": [ "userId", - "secret" + "secret", + "password" ] } } @@ -2496,22 +2610,21 @@ } } }, - "\/account\/sessions\/oauth2\/{provider}": { + "\/account\/sessions": { "get": { - "summary": "Create OAuth2 session", - "operationId": "accountCreateOAuth2Session", + "summary": "List sessions", + "operationId": "accountListSessions", "tags": [ "account" ], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", + "description": "Get the list of active sessions across different devices for the currently logged in user.", "responses": { - "301": { - "description": "No content", + "200": { + "description": "Sessions List", "content": { - "text\/html": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/sessionList" } } } @@ -2519,15 +2632,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOAuth2Session", + "method": "listSessions", "group": "sessions", "cookies": false, - "type": "webAuth", - "demo": "account\/create-o-auth-2-session.md", - "rate-limit": 50, + "type": "", + "demo": "account\/list-sessions.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "sessions.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "account", "platforms": [ "console", "client", @@ -2535,7 +2648,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "auth": { "Project": [] } @@ -2546,157 +2659,112 @@ "Session": [], "JWT": [] } + ] + }, + "delete": { + "summary": "Delete sessions", + "operationId": "accountDeleteSessions", + "tags": [ + "account" ], - "parameters": [ + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSessions", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", - "required": true, - "schema": { - "type": "string", - "x-example": "amazon", - "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ], - "x-enum-name": "OAuthProvider", - "x-enum-keys": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" - ] - }, - "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" - }, + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/account\/sessions\/anonymous": { + "post": { + "summary": "Create anonymous session", + "operationId": "accountCreateAnonymousSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#updateEmail) or create an [OAuth2 session](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#CreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAnonymousSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/create-anonymous-session.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "sessions.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "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" + "Project": [], + "Session": [], + "JWT": [] } ] } }, - "\/account\/sessions\/phone": { - "put": { - "summary": "Update phone session", - "operationId": "accountUpdatePhoneSession", + "\/account\/sessions\/email": { + "post": { + "summary": "Create email password session", + "operationId": "accountCreateEmailPasswordSession", "tags": [ "account" ], - "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -2709,16 +2777,16 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updatePhoneSession", + "method": "createEmailPasswordSession", "group": "sessions", "cookies": false, "type": "", - "demo": "account\/update-phone-session.md", + "demo": "account\/create-email-password-session.md", "rate-limit": 10, "rate-time": 3600, - "rate-key": "ip:{ip},userId:{param-userId}", + "rate-key": "url:{url},email:{param-email}", "scope": "sessions.write", "platforms": [ "console", @@ -2727,11 +2795,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", - "deprecated": { - "since": "1.6.0", - "replaceWith": "account.createSession" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "auth": { "Project": [] } @@ -2749,23 +2813,22 @@ "schema": { "type": "object", "properties": { - "userId": { + "email": { "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "User email.", + "x-example": "email@example.com", + "format": "email" }, - "secret": { + "password": { "type": "string", - "description": "Valid verification token.", - "x-example": "" + "description": "User password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" } }, "required": [ - "userId", - "secret" + "email", + "password" ] } } @@ -2773,10 +2836,10 @@ } } }, - "\/account\/sessions\/token": { - "post": { - "summary": "Create session", - "operationId": "accountCreateSession", + "\/account\/sessions\/magic-url": { + "put": { + "summary": "Update magic URL session", + "operationId": "accountUpdateMagicURLSession", "tags": [ "account" ], @@ -2793,13 +2856,13 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createSession", + "method": "updateMagicURLSession", "group": "sessions", "cookies": false, "type": "", - "demo": "account\/create-session.md", + "demo": "account\/update-magic-url-session.md", "rate-limit": 10, "rate-time": 3600, "rate-key": "ip:{ip},userId:{param-userId}", @@ -2812,6 +2875,10 @@ "packaging": false, "public": true, "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2839,7 +2906,7 @@ }, "secret": { "type": "string", - "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "description": "Valid verification token.", "x-example": "" } }, @@ -2853,21 +2920,22 @@ } } }, - "\/account\/sessions\/{sessionId}": { + "\/account\/sessions\/oauth2\/{provider}": { "get": { - "summary": "Get session", - "operationId": "accountGetSession", + "summary": "Create OAuth2 session", + "operationId": "accountCreateOAuth2Session", "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.", + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { - "200": { - "description": "Session", + "301": { + "description": "No content", "content": { - "application\/json": { + "text\/html": { "schema": { - "$ref": "#\/components\/schemas\/session" + "type": "string", + "format": "binary" } } } @@ -2875,15 +2943,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSession", + "method": "createOAuth2Session", "group": "sessions", "cookies": false, - "type": "", - "demo": "account\/get-session.md", - "rate-limit": 0, + "type": "webAuth", + "demo": "account\/create-o-auth-2-session.md", + "rate-limit": 50, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", + "rate-key": "ip:{ip}", + "scope": "sessions.write", "platforms": [ "console", "client", @@ -2891,7 +2959,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "auth": { "Project": [] } @@ -2905,47 +2973,179 @@ ], "parameters": [ { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update session", - "operationId": "accountUpdateSession", - "tags": [ - "account" - ], - "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", - "responses": { - "200": { - "description": "Session", - "content": { - "application\/json": { - "schema": { + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "appwrite", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "OAuthProvider", + "x-enum-keys": [ + "amazon", + "apple", + "appwrite", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ] + }, + "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": { + "put": { + "summary": "Update phone session", + "operationId": "accountUpdatePhoneSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", + "responses": { + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { "$ref": "#\/components\/schemas\/session" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateSession", + "method": "updatePhoneSession", "group": "sessions", "cookies": false, "type": "", - "demo": "account\/update-session.md", + "demo": "account\/update-phone-session.md", "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", "platforms": [ "console", "client", @@ -2953,7 +3153,11 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", + "deprecated": { + "since": "1.6.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2965,42 +3169,67 @@ "JWT": [] } ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } } - ] - }, - "delete": { - "summary": "Delete session", - "operationId": "accountDeleteSession", + } + } + }, + "\/account\/sessions\/token": { + "post": { + "summary": "Create session", + "operationId": "accountCreateSession", "tags": [ "account" ], - "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "description": "Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSession", + "method": "createSession", "group": "sessions", "cookies": false, "type": "", - "demo": "account\/delete-session.md", - "rate-limit": 100, + "demo": "account\/create-session.md", + "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", + "rate-key": "ip:{ip},userId:{param-userId}", + "scope": "sessions.write", "platforms": [ "console", "client", @@ -3008,7 +3237,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "auth": { "Project": [] } @@ -3020,24 +3249,221 @@ "JWT": [] } ], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/account\/status": { - "patch": { - "summary": "Update status", - "operationId": "accountUpdateStatus", + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "secret": { + "type": "string", + "description": "Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods.", + "x-example": "" + } + }, + "required": [ + "userId", + "secret" + ] + } + } + } + } + } + }, + "\/account\/sessions\/{sessionId}": { + "get": { + "summary": "Get session", + "operationId": "accountGetSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update session", + "operationId": "accountUpdateSession", + "tags": [ + "account" + ], + "description": "Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.", + "responses": { + "200": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete session", + "operationId": "accountDeleteSession", + "tags": [ + "account" + ], + "description": "Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#deleteSessions) instead.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "account\/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/status": { + "patch": { + "summary": "Update status", + "operationId": "accountUpdateStatus", "tags": [ "account" ], @@ -3545,7 +3971,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -3553,6 +3979,7 @@ "enum": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -3599,6 +4026,7 @@ "x-enum-keys": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -4176,13 +4604,13 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -4251,13 +4679,13 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4379,7 +4807,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "x-example": null, "items": { "type": "string" @@ -4387,7 +4815,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -4430,21 +4858,21 @@ } } }, - "\/apps\/{appId}": { + "\/apps\/scopes\/installations": { "get": { - "summary": "Get Application", - "operationId": "appsGet", + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", "tags": [ "apps" ], - "description": "Get an application by its unique ID.", + "description": "List scopes an application can request when installed on a team.", "responses": { "200": { - "description": "App", + "description": "App scopes list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/appScopeList" } } } @@ -4452,14 +4880,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "listInstallationScopes", + "group": "scopes", "cookies": false, "type": "", - "demo": "apps\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -4478,18 +4906,120 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "appId", - "description": "Application unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } + ] + } + }, + "\/apps\/scopes\/oauth2": { + "get": { + "summary": "List OAuth2 Scopes", + "operationId": "appsListOAuth2Scopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request during the OAuth2 flow.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Scopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-o-auth-2-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, + "\/apps\/{appId}": { + "get": { + "summary": "Get Application", + "operationId": "appsGet", + "tags": [ + "apps" + ], + "description": "Get an application by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/get.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID or HTTPS client ID metadata document URL.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } ] }, "put": { @@ -4514,13 +5044,13 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4652,7 +5182,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "default": [], "x-example": null, "items": { @@ -4661,7 +5191,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -4679,6 +5209,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -4704,13 +5250,13 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4747,21 +5293,21 @@ ] } }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/installations": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "List Installations", + "operationId": "appsListInstallations", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { "200": { - "description": "App secrets list", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -4769,15 +5315,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": null, + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -4832,21 +5381,23 @@ "in": "query" } ] - }, - "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", + } + }, + "\/apps\/{appId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "appsGetInstallation", "tags": [ "apps" ], - "description": "Create a new client secret for an application.", + "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { - "201": { - "description": "AppSecretPlaintext", + "200": { + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -4854,15 +5405,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSecret", - "group": null, + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/create-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -4891,41 +5445,42 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] - } - }, - "\/apps\/{appId}\/secrets\/{secretId}": { - "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + }, + "delete": { + "summary": "Delete Installation", + "operationId": "appsDeleteInstallation", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.", "responses": { - "200": { - "description": "AppSecret", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/appSecret" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": null, + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -4933,6 +5488,9 @@ ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -4956,40 +5514,52 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + } + }, + "\/apps\/{appId}\/installations\/{installationId}\/tokens": { + "post": { + "summary": "Create Installation Token", + "operationId": "appsCreateInstallationToken", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "OAuth2 Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Token" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": null, + "method": "createInstallationToken", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/create-installation-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.write", + "apps.tokens.write" + ], "platforms": [ "console", "client", @@ -4997,9 +5567,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [] } @@ -5023,33 +5590,33 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/apps\/{appId}\/team": { - "patch": { - "summary": "Update Team", - "operationId": "appsUpdateTeam", + "\/apps\/{appId}\/keys": { + "get": { + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "Transfer an application to another team by its unique ID.", + "description": "List app keys for an application.", "responses": { "200": { - "description": "App", + "description": "App keys list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/appKeyList" } } } @@ -5057,15 +5624,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", - "group": null, + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/list-keys.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5094,52 +5661,62 @@ "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer application to.", - "x-example": "" - } - }, - "required": [ - "teamId" - ] - } - } - } - } - } - }, - "\/apps\/{appId}\/tokens": { - "delete": { - "summary": "Delete Tokens", - "operationId": "appsDeleteTokens", + ] + }, + "post": { + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ "apps" ], - "description": "Revoke all tokens for an application by its unique ID.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTokens", - "group": null, + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-tokens.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "apps\/create-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -5148,9 +5725,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [] } @@ -5176,22 +5750,21 @@ ] } }, - "\/avatars\/browsers\/{code}": { + "\/apps\/{appId}\/keys\/{keyId}": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "Get App Key", + "operationId": "appsGetKey", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "Get an app key by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppKey", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -5199,15 +5772,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", - "group": null, + "method": "getKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-key.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5215,135 +5788,63 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Browser Code.", + "name": "appId", + "description": "Application unique ID.", "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)" - ] + "x-example": "" }, "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 keep existing image quality.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + }, + "delete": { + "summary": "Delete App Key", + "operationId": "appsDeleteKey", "tags": [ - "avatars" + "apps" ], - "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", + "description": "Delete an app key by its unique ID.", "responses": { - "200": { - "description": "Image", - "content": { - "image\/png": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", - "group": null, + "method": "deleteKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/delete-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -5351,125 +5852,144 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "produces": [ + "application\/json" + ], "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] + "x-example": "" }, "in": "path" }, { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", + "tags": [ + "apps" + ], + "description": "List client secrets for an application.", + "responses": { + "200": { + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSecrets", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "name": "queries", + "description": "Array of query strings generated using the Query 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": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] - } - }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "tags": [ - "avatars" + "apps" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "description": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "AppSecretPlaintext", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecretPlaintext" } } } @@ -5477,15 +5997,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", - "group": null, + "method": "createSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -5493,51 +6013,46 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/flags\/{code}": { + "\/apps\/{appId}\/secrets\/{secretId}": { "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", + "summary": "Get Secret", + "operationId": "appsGetSecret", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "description": "Get an application client secret by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppSecret", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecret" } } } @@ -5545,15 +6060,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFlag", - "group": null, + "method": "getSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5561,59 +6076,687 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", + "name": "appId", + "description": "Application unique ID.", "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", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer application to.", + "x-example": "" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTokens", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "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 keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "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", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getCreditCard", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "required": true, + "schema": { + "type": "string", + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] + }, + "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 keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "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", @@ -7332,209 +8475,1549 @@ "utc" ] }, - "in": "query" + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "100", + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ] + }, + "in": "query" + } + ] + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTransactions" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTransaction" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTransaction" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTransaction" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTransaction" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createOperations" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + }, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0 + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "" }, - "in": "query" + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" }, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "100", - "default": 0 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": "true", - "default": false + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", - "required": false, + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ] - }, - "x-example": "[\"geolocation\",\"notifications\"]", - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "name": "transactionId", + "description": "Transaction ID for staging the operation.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0 + "type": "string", + "x-example": "" }, "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" }, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", - "required": false, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "schema": { "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ] + "x-example": "" }, - "in": "query" + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } } }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "tags": [ "databases" ], - "description": "List transactions across all databases.", + "description": "Increment a specific attribute of a document by a given value.", "responses": { "200": { - "description": "Transaction List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/document" } } } @@ -7542,26 +10025,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "incrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console", + "client", "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listTransactions" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -7576,71 +10059,43 @@ ], "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).", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTransaction" + "in": "path" }, - "auth": { - "Project": [] - } - }, - "security": [ { - "Project": [], - "Session": [], - "JWT": [] + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -7649,12 +10104,25 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } } } @@ -7663,37 +10131,37 @@ } } }, - "\/databases\/transactions\/{transactionId}": { + "\/documentsdb\/transactions": { "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", + "summary": "List transactions", + "operationId": "documentsDBListTransactions", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a transaction by its unique ID.", + "description": "List transactions across all databases.", "responses": { "200": { - "description": "Transaction", + "description": "Transaction List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/transactionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getTransaction", + "method": "listTransactions", "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/get-transaction.md", + "demo": "documentsdb\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": "documents.read", "platforms": [ "console", "server", @@ -7701,11 +10169,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", "auth": { "Project": [] } @@ -7719,26 +10183,29 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Create a new transaction.", "responses": { - "200": { + "201": { "description": "Transaction", "content": { "application\/json": { @@ -7749,13 +10216,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateTransaction", + "method": "createTransaction", "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/update-transaction.md", + "demo": "documentsdb\/create-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -7767,11 +10234,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", "auth": { "Project": [] } @@ -7783,65 +10246,57 @@ "JWT": [] } ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" } } } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", + "method": "getTransaction", "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/delete-transaction.md", + "demo": "documentsdb\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "documents.read", "platforms": [ "console", "server", @@ -7849,11 +10304,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", "auth": { "Project": [] } @@ -7877,18 +10328,16 @@ "in": "path" } ] - } - }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { - "201": { + "200": { "description": "Transaction", "content": { "application\/json": { @@ -7899,13 +10348,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createOperations", + "method": "updateTransaction", "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/create-operations.md", + "demo": "documentsdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -7917,11 +10366,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createOperations" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", "auth": { "Project": [] } @@ -7951,65 +10396,55 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false } } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "Delete a transaction by its unique ID.", "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "deleteTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/list-documents.md", + "demo": "documentsdb\/delete-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "documents.write", "platforms": [ "console", - "client", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", "auth": { "Project": [] } @@ -8022,153 +10457,57 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, { "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, + "description": "Transaction ID.", + "required": true, "schema": { "type": "string", "x-example": "" }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" + "in": "path" } ] - }, + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create multiple operations in a single transaction.", "responses": { "201": { - "description": "Document", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createDocument", - "group": "documents", + "method": "createOperations", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, - "methods": [ - { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } - } + "platforms": [ + "server", + "client" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", "auth": { "Project": [] } @@ -8182,22 +10521,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -8208,44 +10537,14 @@ "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": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documents": { + "operations": { "type": "array", - "description": "Array of documents data as JSON objects.", + "description": "Array of staged operations.", "default": [], - "x-example": null, + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", "items": { "type": "object" } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true } } } @@ -8254,33 +10553,33 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", + "summary": "List documents", + "operationId": "documentsDBListDocuments", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "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": "Document", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/documentList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getDocument", + "method": "listDocuments", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/get-document.md", + "demo": "documentsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -8292,11 +10591,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [] } @@ -8329,16 +10624,6 @@ }, "in": "path" }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, { "name": "queries", "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", @@ -8361,175 +10646,41 @@ "x-example": "" }, "in": "query" - } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", - "tags": [ - "databases" - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "in": "query" }, { - "name": "documentId", - "description": "Document ID.", - "required": true, + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, "schema": { - "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } - } + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } - } + ] }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8540,13 +10691,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateDocument", + "method": "createDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-document.md", + "demo": "documentsdb\/create-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -8558,11 +10709,66 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], "auth": { "Project": [] } @@ -8587,23 +10793,13 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" } ], "requestBody": { @@ -8612,56 +10808,84 @@ "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "data": { "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - }, - "x-nullable": true + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } - } + }, + "required": [ + "documentId", + "data" + ] } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Delete a document by its unique ID.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteDocument", + "method": "getDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "documentsdb\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ "console", "client", @@ -8669,11 +10893,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -8716,9 +10936,22 @@ }, "in": "path" }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, { "name": "transactionId", - "description": "Transaction ID for staging the operation.", + "description": "Transaction ID to read uncommitted changes within the transaction.", "required": false, "schema": { "type": "string", @@ -8727,51 +10960,77 @@ "in": "query" } ] - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { "schema": { "$ref": "#\/components\/schemas\/document" } - } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "cookies": false, - "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "client", - "server", - "console" ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, "auth": { "Project": [] } @@ -8813,15 +11072,6 @@ "x-example": "" }, "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" } ], "requestBody": { @@ -8830,41 +11080,38 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + }, "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Increment a specific attribute of a document by a given value.", + "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", @@ -8877,29 +11124,25 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", + "method": "updateDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/increment-document-attribute.md", + "demo": "documentsdb\/update-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -8940,164 +11183,7 @@ "type": "string", "x-example": "" }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", - "tags": [ - "documentsDB" - ], - "description": "List transactions across all databases.", - "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTransactions", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "documentsdb\/list-transactions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] + "in": "path" } ], "requestBody": { @@ -9106,59 +11192,62 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" } } } } } } - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", "tags": [ "documentsDB" ], - "description": "Get a transaction by its unique ID.", + "description": "Delete a document by its unique ID.", "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "deleteDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } @@ -9172,31 +11261,63 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" } ] - }, + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", "tags": [ "documentsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Decrement a specific column of a row by a given value.", "responses": { "200": { - "description": "Transaction", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/document" } } } @@ -9204,23 +11325,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "decrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", + "client", "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", "auth": { "Project": [] } @@ -9234,12 +11355,41 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -9250,95 +11400,46 @@ "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", - "tags": [ - "documentsDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" + } + } + } + } } - ] + } } }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", "tags": [ "documentsDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Increment a specific column of a row by a given value.", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/document" } } } @@ -9346,22 +11447,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "incrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "documentsdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ + "client", "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", "auth": { "Project": [] } @@ -9375,12 +11477,41 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -9391,14 +11522,23 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "" } } } @@ -9407,21 +11547,21 @@ } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/functions\/{functionId}\/executions": { "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", + "summary": "List executions", + "operationId": "functionsListExecutions", "tags": [ - "documentsDB" + "functions" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "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": "Documents List", + "description": "Executions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/executionList" } } } @@ -9429,15 +11569,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "listExecutions", + "group": "executions", "cookies": false, "type": "", - "demo": "documentsdb\/list-documents.md", + "demo": "functions\/list-executions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", "client", @@ -9445,7 +11588,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [] } @@ -9459,28 +11601,18 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", "required": false, "schema": { "type": "array", @@ -9491,16 +11623,6 @@ }, "in": "query" }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -9511,118 +11633,49 @@ "default": true }, "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } ] }, "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", + "summary": "Create execution", + "operationId": "functionsCreateExecution", "tags": [ - "documentsDB" + "functions" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "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": "Document", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/execution" } } } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExecution", + "group": "executions", + "cookies": false, + "type": "", + "demo": "functions\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "executions.write", + "execution.write" + ], + "platforms": [ + "console", + "client", + "server" ], + "packaging": false, + "public": true, "auth": { "Project": [] } @@ -9636,22 +11689,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -9662,42 +11705,60 @@ "schema": { "type": "object", "properties": { - "documentId": { + "body": { "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.", + "description": "HTTP body of execution. Default value is empty string.", "default": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "x-example": "" }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + "async": { + "type": "boolean", + "description": "Execute code in the background. Default value is false.", + "default": false, + "x-example": false }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "path": { + "type": "string", + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "" }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", "default": [], - "x-example": null, - "items": { - "type": "object" - } + "x-example": "{}" }, - "transactionId": { + "scheduledAt": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "", + "x-nullable": true } } } @@ -9706,21 +11767,21 @@ } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/functions\/{functionId}\/executions\/{executionId}": { "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", + "summary": "Get execution", + "operationId": "functionsGetExecution", "tags": [ - "documentsDB" + "functions" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Get a function execution log by its unique ID.", "responses": { "200": { - "description": "Document", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/execution" } } } @@ -9728,15 +11789,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "getExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "documentsdb\/get-document.md", + "demo": "functions\/get-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", "client", @@ -9744,7 +11808,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -9758,130 +11821,67 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "executionId", + "description": "Execution ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", + } + }, + "\/graphql": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", "tags": [ - "documentsDB" + "graphql" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Execute a GraphQL mutation.", "responses": { - "201": { - "description": "Document", + "200": { + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "upsertDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/any" } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [] } @@ -9893,83 +11893,43 @@ "JWT": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "data": { + "query": { "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], + "description": "The query or queries to execute.", + "default": {}, "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" } - } + }, + "required": [ + "query" + ] } } } } - }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", + } + }, + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", "tags": [ - "documentsDB" + "graphql" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Execute a GraphQL mutation.", "responses": { "200": { - "description": "Document", + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/any" } } } @@ -9977,23 +11937,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "mutation", + "group": "graphql", "cookies": false, - "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", "platforms": [ "console", - "client", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [] } @@ -10005,92 +11965,59 @@ "JWT": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "data": { + "query": { "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], + "description": "The query or queries to execute.", + "default": {}, "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" } - } + }, + "required": [ + "query" + ] } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", "tags": [ - "documentsDB" + "locale" ], - "description": "Delete a document by its unique ID.", + "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": { - "204": { - "description": "No content" + "200": { + "description": "Locale", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/locale" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "locale\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", "platforms": [ "console", "client", @@ -10098,7 +12025,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "auth": { "Project": [] } @@ -10106,69 +12033,27 @@ "security": [ { "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" + "Session": [], + "JWT": [] } ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", "tags": [ - "documentsDB" + "locale" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", "responses": { "200": { - "description": "Document", + "description": "Locale codes list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/localeCodeList" } } } @@ -10176,23 +12061,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "listCodes", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [] } @@ -10203,94 +12088,24 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - } - } - } - } - } + ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", "tags": [ - "documentsDB" + "locale" ], - "description": "Increment a specific column of a row by a given value.", + "description": "List of all continents. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "Document", + "description": "Continents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/continentList" } } } @@ -10298,23 +12113,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "listContinents", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "locale\/list-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [] } @@ -10325,94 +12140,76 @@ "Session": [], "JWT": [] } + ] + } + }, + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", + "tags": [ + "locale" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } + "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" } } } } - } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountries", + "group": null, + "cookies": false, + "type": "", + "demo": "locale\/list-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] } }, - "\/functions\/{functionId}\/executions": { + "\/locale\/countries\/eu": { "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", + "summary": "List EU countries", + "operationId": "localeListCountriesEU", "tags": [ - "functions" + "locale" ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "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": "Executions List", + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/executionList" + "$ref": "#\/components\/schemas\/countryList" } } } @@ -10420,18 +12217,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listExecutions", - "group": "executions", + "method": "listCountriesEU", + "group": null, "cookies": false, "type": "", - "demo": "functions\/list-executions.md", + "demo": "locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -10439,6 +12233,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { "Project": [] } @@ -10449,58 +12244,24 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } ] - }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", "tags": [ - "functions" + "locale" ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "Execution", + "200": { + "description": "Phones List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/phoneList" } } } @@ -10508,18 +12269,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createExecution", - "group": "executions", + "method": "listCountriesPhones", + "group": null, "cookies": false, "type": "", - "demo": "functions\/create-execution.md", + "demo": "locale\/list-countries-phones.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -10527,6 +12285,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "auth": { "Project": [] } @@ -10537,102 +12296,24 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "" - }, - "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": "" - }, - "method": { - "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/functions\/{functionId}\/executions\/{executionId}": { + "\/locale\/currencies": { "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", + "summary": "List currencies", + "operationId": "localeListCurrencies", "tags": [ - "functions" + "locale" ], - "description": "Get a function execution log by its unique ID.", + "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": "Execution", + "description": "Currencies List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/currencyList" } } } @@ -10640,18 +12321,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getExecution", - "group": "executions", + "method": "listCurrencies", + "group": null, "cookies": false, "type": "", - "demo": "functions\/get-execution.md", + "demo": "locale\/list-currencies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "locale.read", "platforms": [ "console", "client", @@ -10659,6 +12337,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -10669,46 +12348,24 @@ "Session": [], "JWT": [] } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } ] } }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", "tags": [ - "graphql" + "locale" ], - "description": "Execute a GraphQL mutation.", + "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": "Any", + "description": "Languages List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/languageList" } } } @@ -10716,23 +12373,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "query", - "group": "graphql", + "method": "listLanguages", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "locale\/list-languages.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "locale.read", "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -10743,44 +12400,24 @@ "Session": [], "JWT": [] } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } - } - } + ] } }, - "\/graphql\/mutation": { + "\/messaging\/topics\/{topicId}\/subscribers": { "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", "tags": [ - "graphql" + "messaging" ], - "description": "Execute a GraphQL mutation.", + "description": "Create a new subscriber.", "responses": { - "200": { - "description": "Any", + "201": { + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -10788,23 +12425,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "mutation", - "group": "graphql", + "method": "createSubscriber", + "group": "subscribers", "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "messaging\/create-subscriber.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "subscribers.write", "platforms": [ - "console", "server", - "client" + "client", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [] } @@ -10812,8 +12449,20 @@ "security": [ { "Project": [], - "Session": [], - "JWT": [] + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -10822,15 +12471,23 @@ "schema": { "type": "object", "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" + "subscriberId": { + "type": "string", + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "" } }, "required": [ - "query" + "subscriberId", + "targetId" ] } } @@ -10838,45 +12495,38 @@ } } }, - "\/locale": { - "get": { - "summary": "Get user locale", - "operationId": "localeGet", + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "delete": { + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", "tags": [ - "locale" + "messaging" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Delete a subscriber by its unique ID.", "responses": { - "200": { - "description": "Locale", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/locale" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "locale\/get.md", + "demo": "messaging\/delete-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "subscribers.write", "platforms": [ - "console", + "server", "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [] } @@ -10884,27 +12534,49 @@ "security": [ { "Project": [], - "Session": [], - "JWT": [] + "JWT": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "subscriberId", + "description": "Subscriber ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } }, - "\/locale\/codes": { - "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "tags": [ - "locale" + "oauth2" ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Locale codes list", + "description": "OAuth2 Approve", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" + "$ref": "#\/components\/schemas\/oauth2Approve" } } } @@ -10912,15 +12584,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCodes", - "group": null, + "method": "approve", + "group": "authorization", "cookies": false, "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "oauth2\/approve.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", "client", @@ -10928,35 +12600,77 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } - ] + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "grant_id": { + "type": "string", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "" + }, + "authorization_details": { + "type": "string", + "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", + "default": "", + "x-example": "" + }, + "scope": { + "type": "string", + "description": "Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.", + "default": "", + "x-example": "" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, - "\/locale\/continents": { + "\/oauth2\/{project_id}\/authorize": { "get": { - "summary": "List continents", - "operationId": "localeListContinents", + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizeGet", "tags": [ - "locale" + "oauth2" ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Continents List", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/continentList" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -10964,15 +12678,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listContinents", - "group": null, + "method": "authorize", + "group": "authorization", "cookies": false, "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "platforms": [ "console", "client", @@ -10980,35 +12694,198 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "client_id", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "redirect_uri", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "response_type", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "scope", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "nonce", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "s256", + "default": "" + }, + "in": "query" + }, + { + "name": "prompt", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "max_age", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0 + }, + "in": "query" + }, + { + "name": "authorization_details", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "resource", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "required": false, + "schema": { + "type": "string", + "default": [] + }, + "in": "query" + }, + { + "name": "audience", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "request_uri", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } ] - } - }, - "\/locale\/countries": { - "get": { - "summary": "List countries", - "operationId": "localeListCountries", + }, + "post": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizePost", "tags": [ - "locale" + "oauth2" ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Countries List", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -11016,15 +12893,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountries", - "group": null, + "method": "authorizePost", + "group": "authorization", "cookies": false, "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "platforms": [ "console", "client", @@ -11032,35 +12909,143 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } - ] + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "type": "string", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "default": "", + "x-example": "" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "default": "", + "x-example": "" + }, + "state": { + "type": "string", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "default": "", + "x-example": "" + }, + "nonce": { + "type": "string", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "default": "", + "x-example": "" + }, + "code_challenge": { + "type": "string", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "default": "", + "x-example": "" + }, + "code_challenge_method": { + "type": "string", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "default": "", + "x-example": "s256" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "default": "", + "x-example": "" + }, + "max_age": { + "type": "integer", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "" + }, + "request_uri": { + "type": "string", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "default": "", + "x-example": "" + } + } + } + } + } + } } }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", + "\/oauth2\/{project_id}\/device_authorization": { + "post": { + "summary": "OAuth2 Device Authorization", + "operationId": "oauth2CreateDeviceAuthorization", "tags": [ - "locale" + "oauth2" ], - "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.", + "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", "responses": { "200": { - "description": "Countries List", + "description": "OAuth2 Device Authorization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" } } } @@ -11068,15 +13053,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesEU", - "group": null, + "method": "createDeviceAuthorization", + "group": "authorization", "cookies": false, "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-device-authorization.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "platforms": [ "console", "client", @@ -11084,35 +13069,87 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } - ] + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", + "default": "", + "x-example": "" + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "" + } + } + } + } + } + } } }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", "tags": [ - "locale" + "oauth2" ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", "responses": { - "200": { - "description": "Phones List", + "201": { + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/phoneList" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -11120,15 +13157,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesPhones", - "group": null, + "method": "createGrant", + "group": "grants", "cookies": false, "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", "client", @@ -11136,35 +13173,65 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } - ] + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "user_code": { + "type": "string", + "description": "User code displayed on the device.", + "x-example": "" + } + }, + "required": [ + "user_code" + ] + } + } + } + } } }, - "\/locale\/currencies": { + "\/oauth2\/{project_id}\/grants\/{grant_id}": { "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", "tags": [ - "locale" + "oauth2" ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", "responses": { "200": { - "description": "Currencies List", + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/currencyList" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -11172,15 +13239,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCurrencies", - "group": null, + "method": "getGrant", + "group": "grants", "cookies": false, "type": "", - "demo": "locale\/list-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "oauth2\/get-grant.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.read", "platforms": [ "console", "client", @@ -11188,130 +13255,214 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } ] } }, - "\/locale\/languages": { + "\/oauth2\/{project_id}\/logout": { "get": { - "summary": "List languages", - "operationId": "localeListLanguages", + "summary": "OAuth2 Logout", + "operationId": "oauth2LogoutGet", "tags": [ - "locale" + "oauth2" ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", "responses": { - "200": { - "description": "Languages List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/languageList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, - "x-appwrite": { - "method": "listLanguages", - "group": null, + "x-appwrite": { + "method": "logout", + "group": "tokens", "cookies": false, "type": "", - "demo": "locale\/list-languages.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "public", "platforms": [ "console", - "client", - "server" + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", + "produces": [ + "application\/json" + ], "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [] + "ProjectPath": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "id_token_hint", + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "logout_hint", + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "client_id", + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "post_logout_redirect_uri", + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "ui_locales", + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { + }, "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + "summary": "OAuth2 Logout", + "operationId": "oauth2LogoutPost", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new subscriber.", + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", "responses": { - "201": { - "description": "Subscriber", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriber" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "logoutPost", + "group": "tokens", "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "public", "platforms": [ - "server", - "client", - "console" + "console", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", + "produces": [ + "application\/json" + ], "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "JWT": [], + "ProjectPath": [], "Session": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -11322,112 +13473,163 @@ "schema": { "type": "object", "properties": { - "subscriberId": { + "id_token_hint": { "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "default": "", + "x-example": "" }, - "targetId": { + "logout_hint": { "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "" + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "default": "", + "x-example": "" + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", + "default": "", + "x-example": "" + }, + "post_logout_redirect_uri": { + "type": "string", + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "state": { + "type": "string", + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "default": "", + "x-example": "" + }, + "ui_locales": { + "type": "string", + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "default": "", + "x-example": "" } - }, - "required": [ - "subscriberId", - "targetId" - ] + } } } } } } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + "\/oauth2\/{project_id}\/organizations": { + "get": { + "summary": "OAuth2 List Accessible Organizations", + "operationId": "oauth2ListOrganizations", "tags": [ - "messaging" + "oauth2" ], - "description": "Delete a subscriber by its unique ID.", + "description": "List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2 accessible organizations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2OrganizationList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", + "method": "listOrganizations", + "group": "platform", "cookies": false, "type": "", - "demo": "messaging\/delete-subscriber.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-organizations.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "oauth2.organizations.read", "platforms": [ - "server", + "console", "client", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "JWT": [], - "Session": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, + "name": "limit", + "description": "Maximum number of organizations to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of organizations to skip before returning results. Used for pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" + "in": "query" } ] } }, - "\/oauth2\/{project_id}\/approve": { + "\/oauth2\/{project_id}\/par": { "post": { - "summary": "Approve OAuth2", - "operationId": "oauth2Approve", + "summary": "OAuth2 PAR", + "operationId": "oauth2CreatePAR", "tags": [ "oauth2" ], - "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.", "responses": { - "200": { - "description": "OAuth2 Approve", + "201": { + "description": "OAuth2 PAR", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Approve" + "$ref": "#\/components\/schemas\/oauth2PAR" } } } @@ -11435,15 +13637,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "approve", - "group": null, + "method": "createPAR", + "group": "authorization", "cookies": false, "type": "", - "demo": "oauth2\/approve.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-par.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "public", "platforms": [ "console", "client", @@ -11480,20 +13682,88 @@ "schema": { "type": "object", "properties": { - "grant_id": { + "client_id": { "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "" + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "x-example": "" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "type": "string", + "description": "OAuth2 \/ OIDC response type.", + "x-example": "code" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "default": "", + "x-example": "" + }, + "state": { + "type": "string", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "default": "", + "x-example": "" + }, + "nonce": { + "type": "string", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "default": "", + "x-example": "" + }, + "code_challenge": { + "type": "string", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "default": "", + "x-example": "" + }, + "code_challenge_method": { + "type": "string", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "default": "", + "x-example": "s256" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "default": "", + "x-example": "" + }, + "max_age": { + "type": "integer", + "description": "OIDC max_age parameter for customization of consent screen.", + "x-example": 0, + "format": "int32", + "x-nullable": true }, "authorization_details": { "type": "string", - "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", "default": "", "x-example": "" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "" } }, "required": [ - "grant_id" + "client_id", + "redirect_uri", + "response_type" ] } } @@ -11501,21 +13771,21 @@ } } }, - "\/oauth2\/{project_id}\/authorize": { + "\/oauth2\/{project_id}\/projects": { "get": { - "summary": "OAuth2 Authorize", - "operationId": "oauth2Authorize", + "summary": "OAuth2 List Accessible Projects", + "operationId": "oauth2ListProjects", "tags": [ "oauth2" ], - "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.", "responses": { "200": { - "description": "OAuth2 Authorize", + "description": "OAuth2 accessible projects list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Authorize" + "$ref": "#\/components\/schemas\/oauth2ProjectList" } } } @@ -11523,15 +13793,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "authorize", - "group": null, + "method": "listProjects", + "group": "platform", "cookies": false, "type": "", - "demo": "oauth2\/authorize.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-projects.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "oauth2.projects.read", "platforms": [ "console", "client", @@ -11553,7 +13823,7 @@ "parameters": [ { "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "description": "Project ID of the console project the OAuth2 access token was issued for.", "required": true, "schema": { "type": "string", @@ -11562,151 +13832,58 @@ "in": "path" }, { - "name": "client_id", - "description": "OAuth2 client ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "redirect_uri", - "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "response_type", - "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", - "required": true, - "schema": { - "type": "string", - "x-example": "code" - }, - "in": "query" - }, - { - "name": "scope", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "state", - "description": "OAuth2 state. You receive this back in the redirect URI.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "nonce", - "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge", - "description": "PKCE code challenge. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge_method", - "description": "PKCE code challenge method. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "s256", - "default": "" - }, - "in": "query" - }, - { - "name": "prompt", - "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "name": "limit", + "description": "Maximum number of projects to return. Between 1 and 5000.", "required": false, "schema": { - "type": "string", - "x-example": "", - "default": "" + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 }, "in": "query" }, { - "name": "max_age", - "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "name": "offset", + "description": "Number of projects to skip before returning results. Used for pagination.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": 0 + "x-example": 0, + "default": 0 }, "in": "query" }, { - "name": "authorization_details", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", "required": false, "schema": { "type": "string", - "x-example": "", + "x-example": "", "default": "" }, "in": "query" - }, - { - "name": "resource", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "required": false, - "schema": { - "type": "string", - "default": [] - }, - "in": "query" } ] } }, - "\/oauth2\/{project_id}\/device_authorization": { + "\/oauth2\/{project_id}\/reject": { "post": { - "summary": "OAuth2 Device Authorization", - "operationId": "oauth2CreateDeviceAuthorization", + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", "tags": [ "oauth2" ], - "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "OAuth2 Device Authorization", + "description": "OAuth2 Reject", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" + "$ref": "#\/components\/schemas\/oauth2Reject" } } } @@ -11714,15 +13891,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDeviceAuthorization", - "group": null, + "method": "reject", + "group": "authorization", "cookies": false, "type": "", - "demo": "oauth2\/create-device-authorization.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "demo": "oauth2\/reject.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", "client", @@ -11759,52 +13936,37 @@ "schema": { "type": "object", "properties": { - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "" - }, - "scope": { - "type": "string", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "default": "", - "x-example": "" - }, - "authorization_details": { - "type": "string", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", - "default": "", - "x-example": "" - }, - "resource": { + "grant_id": { "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "" } - } + }, + "required": [ + "grant_id" + ] } } } } } }, - "\/oauth2\/{project_id}\/grants": { + "\/oauth2\/{project_id}\/revoke": { "post": { - "summary": "Create OAuth2 Grant", - "operationId": "oauth2CreateGrant", + "summary": "OAuth2 Revoke", + "operationId": "oauth2Revoke", "tags": [ "oauth2" ], - "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", + "description": "Revoke an OAuth2 access token or refresh token.", "responses": { - "201": { - "description": "OAuth2 Grant", + "200": { + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" + "type": "string", + "format": "binary" } } } @@ -11812,15 +13974,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createGrant", - "group": null, + "method": "revoke", + "group": "tokens", "cookies": false, "type": "", - "demo": "oauth2\/create-grant.md", - "rate-limit": 10, + "demo": "oauth2\/revoke.md", + "rate-limit": 60, "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "oauth2.write", + "rate-key": "url:{url},ip:{ip}", + "scope": "public", "platforms": [ "console", "client", @@ -11857,14 +14019,32 @@ "schema": { "type": "object", "properties": { - "user_code": { + "token": { "type": "string", - "description": "User code displayed on the device.", - "x-example": "" + "description": "The access or refresh token to revoke.", + "x-example": "" + }, + "token_type_hint": { + "type": "string", + "description": "Type of token to revoke (access_token or refresh_token).", + "default": "", + "x-example": "access_token" + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "" + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", + "default": "", + "x-example": "" } }, "required": [ - "user_code" + "token" ] } } @@ -11872,21 +14052,21 @@ } } }, - "\/oauth2\/{project_id}\/grants\/{grant_id}": { - "get": { - "summary": "Get OAuth2 Grant", - "operationId": "oauth2GetGrant", + "\/oauth2\/{project_id}\/token": { + "post": { + "summary": "OAuth2 Token", + "operationId": "oauth2CreateToken", "tags": [ "oauth2" ], - "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", + "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", "responses": { "200": { - "description": "OAuth2 Grant", + "description": "OAuth2 Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" + "$ref": "#\/components\/schemas\/oauth2Token" } } } @@ -11894,15 +14074,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getGrant", - "group": null, + "method": "createToken", + "group": "tokens", "cookies": false, "type": "", - "demo": "oauth2\/get-grant.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-token.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "public", "platforms": [ "console", "client", @@ -11924,166 +14104,181 @@ "parameters": [ { "name": "project_id", - "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" - }, - { - "name": "grant_id", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "grant_type": { + "type": "string", + "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", + "x-example": "" + }, + "code": { + "type": "string", + "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", + "default": "", + "x-example": "" + }, + "refresh_token": { + "type": "string", + "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", + "default": "", + "x-example": "" + }, + "device_code": { + "type": "string", + "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", + "default": "", + "x-example": "" + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "" + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret. Required for confidential apps.", + "default": "", + "x-example": "" + }, + "code_verifier": { + "type": "string", + "description": "PKCE code verifier. Required for public apps.", + "default": "", + "x-example": "" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI. Required for `authorization_code` grant type.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "" + } + }, + "required": [ + "grant_type" + ] + } + } + } + } } }, - "\/oauth2\/{project_id}\/logout": { + "\/organization\/installations": { "get": { - "summary": "OAuth2 Logout", - "operationId": "oauth2Logout", + "summary": "List Installations", + "operationId": "organizationListInstallations", "tags": [ - "oauth2" + "organization" ], - "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", + "description": "List app installations on the organization. Any organization member can read installations.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "logout", - "group": null, + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "oauth2\/logout.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", "platforms": [ "console", - "client" + "client", + "server" ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [] + "Project": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "id_token_hint", - "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "logout_hint", - "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "client_id", - "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "post_logout_redirect_uri", - "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "state", - "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "name": "queries", + "description": "Array of query strings generated using the Query 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": "string", - "x-example": "", - "default": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, { - "name": "ui_locales", - "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "", - "default": "" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] - } - }, - "\/oauth2\/{project_id}\/reject": { + }, "post": { - "summary": "Reject OAuth2", - "operationId": "oauth2Reject", + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", "tags": [ - "oauth2" + "organization" ], - "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", "responses": { - "200": { - "description": "OAuth2 Reject", + "201": { + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Reject" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -12091,15 +14286,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "reject", - "group": null, + "method": "createInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "oauth2\/reject.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", "client", @@ -12108,42 +14303,36 @@ "packaging": false, "public": true, "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], + "Project": [], "Session": [], "JWT": [] } ], - "parameters": [ - { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "grant_id": { + "appId": { "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "" + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" } }, "required": [ - "grant_id" + "appId" ] } } @@ -12151,22 +14340,21 @@ } } }, - "\/oauth2\/{project_id}\/revoke": { - "post": { - "summary": "OAuth2 Revoke", - "operationId": "oauth2Revoke", + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", "tags": [ - "oauth2" + "organization" ], - "description": "Revoke an OAuth2 access token or refresh token.", + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", "responses": { "200": { - "description": "File", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -12174,15 +14362,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "revoke", - "group": null, + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "oauth2\/revoke.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", "platforms": [ "console", "client", @@ -12191,82 +14379,43 @@ "packaging": false, "public": true, "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], + "Project": [], "Session": [], "JWT": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The access or refresh token to revoke.", - "x-example": "" - }, - "token_type_hint": { - "type": "string", - "description": "Type of token to revoke (access_token or refresh_token).", - "default": "", - "x-example": "access_token" - }, - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "" - }, - "client_secret": { - "type": "string", - "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", - "default": "", - "x-example": "" - } - }, - "required": [ - "token" - ] - } - } - } - } - } - }, - "\/oauth2\/{project_id}\/token": { - "post": { - "summary": "OAuth2 Token", - "operationId": "oauth2CreateToken", + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", "tags": [ - "oauth2" + "organization" ], - "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { "200": { - "description": "OAuth2 Token", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Token" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -12274,15 +14423,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createToken", - "group": null, + "method": "updateInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "oauth2\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", "client", @@ -12291,24 +14440,24 @@ "packaging": false, "public": true, "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], + "Project": [], "Session": [], "JWT": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -12319,68 +14468,74 @@ "schema": { "type": "object", "properties": { - "grant_type": { - "type": "string", - "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", - "x-example": "" - }, - "code": { - "type": "string", - "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", - "default": "", - "x-example": "" - }, - "refresh_token": { - "type": "string", - "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", - "default": "", - "x-example": "" - }, - "device_code": { - "type": "string", - "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", - "default": "", - "x-example": "" - }, - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "" - }, - "client_secret": { - "type": "string", - "description": "OAuth2 client secret. Required for confidential apps.", - "default": "", - "x-example": "" - }, - "code_verifier": { - "type": "string", - "description": "PKCE code verifier. Required for public apps.", - "default": "", - "x-example": "" - }, - "redirect_uri": { - "type": "string", - "description": "Redirect URI. Required for `authorization_code` grant type.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "resource": { + "authorizationDetails": { "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "grant_type" - ] + } } } } - } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/ping": { @@ -12823,72 +14978,342 @@ }, "status": { "type": "string", - "description": "Presence status.", - "x-example": "" + "description": "Presence status.", + "x-example": "" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "purge": { + "type": "boolean", + "description": "When true, purge cached responses used by list presences endpoint.", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete presence", + "operationId": "presencesDelete", + "tags": [ + "presences" + ], + "description": "Delete a presence log by its unique ID.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "presences", + "cookies": false, + "type": "", + "demo": "presences\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "presences.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listFiles", + "group": "files", + "cookies": false, + "type": "", + "demo": "storage\/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, folder, 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": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", + "tags": [ + "storage" + ], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFile", + "group": "files", + "cookies": false, + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "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": "", + "x-upload-id": true, + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "expiresAt": { + "file": { "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": {}, - "x-example": "{}" + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", + "x-example": null, + "format": "binary" }, "permissions": { "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - } + }, + "x-nullable": true }, - "purge": { - "type": "boolean", - "description": "When true, purge cached responses used by list presences endpoint.", - "default": false, - "x-example": false + "folder": { + "type": "string", + "description": "Virtual folder to place the file in, for example \"photos\/2026\". Nest folders with `\/`. Defaults to the bucket root.", + "default": "", + "x-example": null } - } + }, + "required": [ + "fileId", + "file" + ] } } } } - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDelete", + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", "tags": [ - "presences" + "storage" ], - "description": "Delete a presence log by its unique ID.\n", + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "presences", + "method": "getFile", + "group": "files", "cookies": false, "type": "", - "demo": "presences\/delete.md", + "demo": "storage\/get-file.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.write", + "scope": "files.read", "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "auth": { "Project": [] } @@ -12902,33 +15327,41 @@ ], "parameters": [ { - "name": "presenceId", - "description": "Presence unique ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } ] - } - }, - "\/storage\/buckets\/{bucketId}\/files": { - "get": { - "summary": "List files", - "operationId": "storageListFiles", + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", "tags": [ "storage" ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", "responses": { "200": { - "description": "Files List", + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/fileList" + "$ref": "#\/components\/schemas\/file" } } } @@ -12936,15 +15369,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listFiles", + "method": "updateFile", "group": "files", "cookies": false, "type": "", - "demo": "storage\/list-files.md", + "demo": "storage\/update-file.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": "files.write", "platforms": [ "console", "client", @@ -12952,7 +15385,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "auth": { "Project": [] } @@ -12967,7 +15400,7 @@ "parameters": [ { "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "description": "Bucket unique ID.", "required": true, "schema": { "type": "string", @@ -12976,56 +15409,124 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, + "name": "fileId", + "description": "File ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" - }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "File name.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + } + } + } + } + }, + "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, "schema": { "type": "string", - "x-example": "", - "default": "" + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "fileId", + "description": "File ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - }, - "post": { - "summary": "Create file", - "operationId": "storageCreateFile", + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "get": { + "summary": "Get file for download", + "operationId": "storageGetFileDownload", "tags": [ "storage" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "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": { - "201": { + "200": { "description": "File", "content": { - "application\/json": { + "*\/*": { "schema": { - "$ref": "#\/components\/schemas\/file" + "type": "string", + "format": "binary" } } } @@ -13033,15 +15534,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createFile", + "method": "getFileDownload", "group": "files", "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", + "type": "location", + "demo": "storage\/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", "platforms": [ "console", "client", @@ -13049,86 +15550,71 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } - ], - "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": "", - "x-upload-id": true, - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "file": { - "type": "string", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "x-example": null, - "format": "binary" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - }, - "required": [ - "fileId", - "file" - ] - } - } - } - } + ] } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { "get": { - "summary": "Get file", - "operationId": "storageGetFile", + "summary": "Get file preview", + "operationId": "storageGetFilePreview", "tags": [ "storage" ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "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": "File", + "description": "Image", "content": { - "application\/json": { + "image\/*": { "schema": { - "$ref": "#\/components\/schemas\/file" + "type": "string", + "format": "binary" } } } @@ -13136,11 +15622,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFile", + "method": "getFilePreview", "group": "files", "cookies": false, - "type": "", - "demo": "storage\/get-file.md", + "type": "location", + "demo": "storage\/get-file-preview.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13152,55 +15638,238 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "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": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "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": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "jpg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ] }, - "in": "path" + "in": "query" }, { - "name": "fileId", - "description": "File ID.", - "required": true, + "name": "token", + "description": "File token for accessing this file.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" + "in": "query" } ] - }, - "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", "tags": [ "storage" ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "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", "content": { - "application\/json": { + "*\/*": { "schema": { - "$ref": "#\/components\/schemas\/file" + "type": "string", + "format": "binary" } } } @@ -13208,15 +15877,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateFile", + "method": "getFileView", "group": "files", "cookies": false, - "type": "", - "demo": "storage\/update-file.md", + "type": "location", + "demo": "storage\/get-file-view.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", + "scope": "files.read", "platforms": [ "console", "client", @@ -13224,22 +15893,24 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [] + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { "name": "bucketId", - "description": "Bucket unique ID.", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", @@ -13256,116 +15927,36 @@ "x-example": "" }, "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "File name.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - }, - "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" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteFile", - "group": "files", - "cookies": false, - "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" }, { - "name": "fileId", - "description": "File ID.", - "required": true, + "name": "token", + "description": "File token for accessing this file.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" + "in": "query" } ] } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "\/tablesdb\/transactions": { "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", + "summary": "List transactions", + "operationId": "tablesDBListTransactions", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "description": "List transactions across all databases.", "responses": { "200": { - "description": "File", + "description": "Transaction List", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/transactionList" } } } @@ -13373,87 +15964,67 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFileDownload", - "group": "files", + "method": "listTransactions", + "group": "transactions", "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", + "type": "", + "demo": "tablesdb\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "documents.read", + "rows.read" + ], "platforms": [ "console", - "client", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", "required": false, "schema": { - "type": "string", - "x-example": "", - "default": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" } ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "description": "Create a new transaction.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "Transaction", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -13461,254 +16032,137 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFilePreview", - "group": "files", + "method": "createTransaction", + "group": "transactions", "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", + "type": "", + "demo": "tablesdb\/create-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "client", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "default": "center" - }, - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "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" - }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/tablesdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", + "tags": [ + "tablesDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "tablesdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.read", + "rows.read" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "schema": { - "type": "string", - "x-example": "jpg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ] - }, - "in": "query" - }, + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ { - "name": "token", - "description": "File token for accessing this file.", - "required": false, + "name": "transactionId", + "description": "Transaction ID.", + "required": true, "schema": { "type": "string", - "x-example": "", - "default": "" + "x-example": "" }, - "in": "query" + "in": "path" } ] - } - }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", + }, + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "File", + "description": "Transaction", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -13716,86 +16170,234 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFileView", - "group": "files", + "method": "updateTransaction", + "group": "transactions", "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", + "type": "", + "demo": "tablesdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "client", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", "auth": { + "Project": [] + } + }, + "security": [ + { "Project": [], - "ImpersonateUserId": [] + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "tablesdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "auth": { + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, + } + ] + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", + "tags": [ + "tablesDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "tablesdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "documents.write", + "rows.write" + ], + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "fileId", - "description": "File ID.", + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"tableId\": \"\",\n\t \"rowId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } } }, - "\/tablesdb\/transactions": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", + "summary": "List rows", + "operationId": "tablesDBListRows", "tags": [ "tablesDB" ], - "description": "List transactions across all databases.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Transaction List", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/rowList" } } } @@ -13803,26 +16405,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "listRows", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/list-transactions.md", + "demo": "tablesdb\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.read", - "rows.read" + "rows.read", + "documents.read" ], "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", "auth": { "Project": [] } @@ -13835,9 +16437,29 @@ } ], "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "description": "Array of query strings generated using the Query 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", @@ -13847,23 +16469,56 @@ "default": [] }, "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] }, "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", + "summary": "Create row", + "operationId": "tablesDBCreateRow", "tags": [ "tablesDB" ], - "description": "Create a new transaction.", + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", "responses": { "201": { - "description": "Transaction", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/row" } } } @@ -13871,26 +16526,59 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "documents.write", - "rows.write" + "rows.write", + "documents.write" ], "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + } + ], "auth": { "Project": [] } @@ -13902,41 +16590,98 @@ "JWT": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } - } + }, + "required": [ + "rowId", + "data" + ] } } } } } }, - "\/tablesdb\/transactions\/{transactionId}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", + "summary": "Get row", + "operationId": "tablesDBGetRow", "tags": [ "tablesDB" ], - "description": "Get a transaction by its unique ID.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Transaction", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/row" } } } @@ -13944,26 +16689,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "getRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/get-transaction.md", + "demo": "tablesdb\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.read", - "rows.read" + "rows.read", + "documents.read" ], "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", "auth": { "Project": [] } @@ -13977,31 +16722,74 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" } ] }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", "tags": [ "tablesDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", "responses": { - "200": { - "description": "Transaction", + "201": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/row" } } } @@ -14009,26 +16797,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "upsertRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "documents.write", - "rows.write" + "rows.write", + "documents.write" ], "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], "auth": { "Project": [] } @@ -14042,12 +16862,32 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -14058,98 +16898,47 @@ "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", - "tags": [ - "tablesDB" - ], - "description": "Delete a transaction by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "documents.write", - "rows.write" - ], - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } } - ] - } - }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", "tags": [ "tablesDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/row" } } } @@ -14157,26 +16946,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "updateRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-operations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "documents.write", - "rows.write" + "rows.write", + "documents.write" ], "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", "auth": { "Project": [] } @@ -14190,12 +16979,32 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -14206,55 +17015,58 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"tableId\": \"\",\n\t \"rowId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "object" - } + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } } } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", "tags": [ "tablesDB" ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "description": "Delete a row by its unique ID.", "responses": { - "200": { - "description": "Rows List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/rowList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listRows", + "method": "deleteRow", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/list-rows.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "rows.read", - "documents.read" + "rows.write", + "documents.write" ], "platforms": [ "console", @@ -14263,7 +17075,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", "auth": { "Project": [] } @@ -14288,7 +17100,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -14297,62 +17109,38 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query 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, + "name": "rowId", + "description": "Row ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", + "description": "Transaction ID for staging the operation.", "required": false, "schema": { "type": "string", "x-example": "" }, "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } ] - }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", "tags": [ "tablesDB" ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "description": "Decrement a specific column of a row by a given value.", "responses": { - "201": { + "200": { "description": "Row", "content": { "application\/json": { @@ -14365,11 +17153,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRow", + "method": "decrementRowColumn", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-row.md", + "demo": "tablesdb\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14378,46 +17166,13 @@ "documents.write" ], "platforms": [ - "console", "client", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", "auth": { "Project": [] } @@ -14436,17 +17191,36 @@ "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -14457,38 +17231,19 @@ "schema": { "type": "object", "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", "x-example": null, - "items": { - "type": "object" - } + "format": "float", + "x-nullable": true }, "transactionId": { "type": "string", @@ -14503,14 +17258,14 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", "tags": [ "tablesDB" ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "description": "Increment a specific column of a row by a given value.", "responses": { "200": { "description": "Row", @@ -14525,26 +17280,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRow", + "method": "incrementRowColumn", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "rows.read", - "documents.read" + "rows.write", + "documents.write" ], "platforms": [ - "console", "client", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", "auth": { "Project": [] } @@ -14569,7 +17324,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14588,44 +17343,63 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query 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" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, + "name": "column", + "description": "Column key.", + "required": true, "schema": { - "type": "string", - "x-example": "" + "type": "string" }, - "in": "query" + "in": "path" } - ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", "tags": [ - "tablesDB" + "teams" ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "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": { - "201": { - "description": "Row", + "200": { + "description": "Teams List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/teamList" } } } @@ -14633,18 +17407,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertRow", - "group": "rows", + "method": "list", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", "platforms": [ "console", "client", @@ -14652,39 +17423,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [] } @@ -14698,83 +17437,56 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "tableId", - "description": "Table ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "rowId", - "description": "Row ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } - } + "in": "query" } - } + ] }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", + "post": { + "summary": "Create team", + "operationId": "teamsCreate", "tags": [ - "tablesDB" + "teams" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "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": { - "200": { - "description": "Row", + "201": { + "description": "Team", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/team" } } } @@ -14782,18 +17494,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRow", - "group": "rows", + "method": "create", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ "console", "client", @@ -14801,7 +17510,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "auth": { "Project": [] } @@ -14813,97 +17522,78 @@ "JWT": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "permissions": { + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "x-example": "" + }, + "roles": { "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], + "x-example": null, "items": { "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + } } - } + }, + "required": [ + "teamId", + "name" + ] } } } } - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", "tags": [ - "tablesDB" + "teams" ], - "description": "Delete a row by its unique ID.", + "description": "Get a team by its ID. All team members have read access for this resource.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteRow", - "group": "rows", + "method": "get", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", "platforms": [ "console", "client", @@ -14911,7 +17601,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "auth": { "Project": [] } @@ -14925,90 +17615,55 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", "tags": [ - "tablesDB" + "teams" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Update the team's name by its unique ID.", "responses": { "200": { - "description": "Row", + "description": "Team", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/team" } } } } }, "deprecated": false, - "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", - "cookies": false, - "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "x-appwrite": { + "method": "updateName", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "auth": { "Project": [] } @@ -15022,41 +17677,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } @@ -15067,75 +17693,51 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "description": "New team name. Max length: 128 chars.", + "x-example": "" } - } + }, + "required": [ + "name" + ] } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", "tags": [ - "tablesDB" + "teams" ], - "description": "Increment a specific column of a row by a given value.", + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", + "method": "delete", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "auth": { "Project": [] } @@ -15149,93 +17751,33 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/teams": { + "\/teams\/{teamId}\/installations": { "get": { - "summary": "List teams", - "operationId": "teamsList", + "summary": "List Installations", + "operationId": "teamsListInstallations", "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.", + "description": "List app installations on a team. Any team member can read installations.", "responses": { "200": { - "description": "Teams List", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/teamList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -15243,14 +17785,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "teams", + "method": "listInstallations", + "group": null, "cookies": false, "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.read", "platforms": [ "console", @@ -15259,7 +17801,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [] } @@ -15272,9 +17813,19 @@ } ], "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "description": "Array of query strings generated using the Query 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", @@ -15285,17 +17836,6 @@ }, "in": "query" }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -15310,19 +17850,19 @@ ] }, "post": { - "summary": "Create team", - "operationId": "teamsCreate", + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", "tags": [ "teams" ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", "responses": { "201": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -15330,14 +17870,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "teams", + "method": "createInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -15346,16 +17886,27 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [] + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -15364,34 +17915,20 @@ "schema": { "type": "object", "properties": { - "teamId": { + "appId": { "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Application unique ID.", + "x-example": "" }, - "name": { + "authorizationDetails": { "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" } }, "required": [ - "teamId", - "name" + "appId" ] } } @@ -15399,21 +17936,21 @@ } } }, - "\/teams\/{teamId}": { + "\/teams\/{teamId}\/installations\/{installationId}": { "get": { - "summary": "Get team", - "operationId": "teamsGet", + "summary": "Get Installation", + "operationId": "teamsGetInstallation", "tags": [ "teams" ], - "description": "Get a team by its ID. All team members have read access for this resource.", + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", "responses": { "200": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -15421,14 +17958,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "teams", + "method": "getInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.read", "platforms": [ "console", @@ -15437,7 +17974,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "auth": { "Project": [] } @@ -15459,23 +17995,33 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] }, "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", "tags": [ "teams" ], - "description": "Update the team's name by its unique ID.", + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { "200": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -15483,14 +18029,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateName", - "group": "teams", + "method": "updateInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -15499,7 +18045,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "auth": { "Project": [] } @@ -15521,6 +18066,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -15529,27 +18084,25 @@ "schema": { "type": "object", "properties": { - "name": { + "authorizationDetails": { "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "" + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "name" - ] + } } } } } }, "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", "tags": [ "teams" ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", "responses": { "204": { "description": "No content" @@ -15557,14 +18110,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "teams", + "method": "deleteInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -15573,7 +18126,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -15595,6 +18150,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } @@ -16947,7 +19512,6 @@ "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": "", "x-example": "", "x-appwrite": { "idGenerator": "ID.unique" @@ -16956,7 +19520,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "default": [], + "default": {}, "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" }, "permissions": { @@ -16981,6 +19545,122 @@ "description": "Transaction ID for staging the operation.", "x-example": "" } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createQuery", + "group": "documents", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-query.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "" + }, + "total": { + "type": "boolean", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "default": true, + "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" + } } } } @@ -17441,10 +20121,18 @@ } }, "tags": [ + { + "name": "ping", + "description": "" + }, { "name": "account", "description": "The Account service allows you to authenticate and manage a user account." }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, { "name": "avatars", "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." @@ -17454,16 +20142,52 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tablesdb", + "name": "tablesDB", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." + "name": "documentsDB", + "description": "" + }, + { + "name": "vectorsDB", + "description": "" + }, + { + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "apps", + "description": "The Apps service allows you to manage OAuth2 applications, their keys, secrets, scopes, and installations." + }, + { + "name": "oauth2", + "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." }, { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." }, { "name": "projects", @@ -17473,14 +20197,6 @@ "name": "project", "description": "The Project service allows you to manage all the projects in your Appwrite server." }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, { "name": "users", "description": "The Users service allows you to manage your project users." @@ -17489,18 +20205,10 @@ "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, { "name": "proxy", "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, { "name": "console", "description": "The Console service allows you to interact with console relevant information." @@ -17508,14 +20216,6 @@ { "name": "migrations", "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - }, - { - "name": "oauth2", - "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." } ], "components": { @@ -17526,755 +20226,1392 @@ "additionalProperties": true, "example": [] }, - "rowList": { - "description": "Rows List", + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of 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" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions 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" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities 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" + ], + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs 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" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files 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" + ], + "example": { + "total": 5, + "files": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams 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" + ], + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships 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" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "executionList": { + "description": "Executions List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of rows that matched your query.", + "description": "Total number of executions that matched your query.", "x-example": 5, "format": "int32" }, - "rows": { + "executions": { "type": "array", - "description": "List of rows.", + "description": "List of executions.", "items": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/execution" }, "x-example": "" } }, "required": [ "total", - "rows" + "executions" ], "example": { "total": 5, - "rows": "" + "executions": "" } }, - "documentList": { - "description": "Documents List", + "countryList": { + "description": "Countries List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents that matched your query.", + "description": "Total number of countries that matched your query.", "x-example": 5, "format": "int32" }, - "documents": { + "countries": { "type": "array", - "description": "List of documents.", + "description": "List of countries.", "items": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/country" }, "x-example": "" } }, "required": [ "total", - "documents" + "countries" ], "example": { "total": 5, - "documents": "" + "countries": "" } }, - "presenceList": { - "description": "Presences List", + "continentList": { + "description": "Continents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of presences that matched your query.", + "description": "Total number of continents that matched your query.", "x-example": 5, "format": "int32" }, - "presences": { + "continents": { "type": "array", - "description": "List of presences.", + "description": "List of continents.", "items": { - "$ref": "#\/components\/schemas\/presence" + "$ref": "#\/components\/schemas\/continent" }, "x-example": "" } }, "required": [ "total", - "presences" + "continents" ], "example": { "total": 5, - "presences": "" + "continents": "" } }, - "sessionList": { - "description": "Sessions List", + "languageList": { + "description": "Languages List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of sessions that matched your query.", + "description": "Total number of languages that matched your query.", "x-example": 5, "format": "int32" }, - "sessions": { + "languages": { "type": "array", - "description": "List of sessions.", + "description": "List of languages.", "items": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/language" }, "x-example": "" } }, "required": [ "total", - "sessions" + "languages" ], "example": { "total": 5, - "sessions": "" + "languages": "" } }, - "identityList": { - "description": "Identities List", + "currencyList": { + "description": "Currencies List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of identities that matched your query.", + "description": "Total number of currencies that matched your query.", "x-example": 5, "format": "int32" }, - "identities": { + "currencies": { "type": "array", - "description": "List of identities.", + "description": "List of currencies.", "items": { - "$ref": "#\/components\/schemas\/identity" + "$ref": "#\/components\/schemas\/currency" }, "x-example": "" } }, "required": [ "total", - "identities" + "currencies" ], "example": { "total": 5, - "identities": "" + "currencies": "" } }, - "logList": { - "description": "Logs List", + "phoneList": { + "description": "Phones List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of logs that matched your query.", + "description": "Total number of phones that matched your query.", "x-example": 5, "format": "int32" }, - "logs": { + "phones": { "type": "array", - "description": "List of logs.", + "description": "List of phones.", "items": { - "$ref": "#\/components\/schemas\/log" + "$ref": "#\/components\/schemas\/phone" }, "x-example": "" } }, "required": [ "total", - "logs" + "phones" ], "example": { "total": 5, - "logs": "" + "phones": "" } }, - "fileList": { - "description": "Files List", + "localeCodeList": { + "description": "Locale codes list", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of files that matched your query.", + "description": "Total number of localeCodes that matched your query.", "x-example": 5, "format": "int32" }, - "files": { + "localeCodes": { "type": "array", - "description": "List of files.", + "description": "List of localeCodes.", "items": { - "$ref": "#\/components\/schemas\/file" + "$ref": "#\/components\/schemas\/localeCode" }, "x-example": "" } }, "required": [ "total", - "files" + "localeCodes" ], "example": { "total": 5, - "files": "" + "localeCodes": "" } }, - "teamList": { - "description": "Teams List", + "transactionList": { + "description": "Transaction List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of teams that matched your query.", + "description": "Total number of transactions 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" - ], - "example": { - "total": 5, - "teams": "" - } - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "x-example": "" + } + }, + "required": [ + "total", + "transactions" + ], + "example": { + "total": 5, + "transactions": "" + } + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ] + } + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "string", + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true + }, + "$collectionId": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true + }, + "$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" }, - "memberships": { + "$permissions": { "type": "array", - "description": "List of memberships.", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { - "$ref": "#\/components\/schemas\/membership" + "type": "string" }, - "x-example": "" + "x-example": [ + "read(\"any\")" + ] } }, + "additionalProperties": true, "required": [ - "total", - "memberships" + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" ], "example": { - "total": 5, - "memberships": "" + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false } }, - "executionList": { - "description": "Executions List", + "presence": { + "description": "Presence", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" }, - "executions": { + "$createdAt": { + "type": "string", + "description": "Presence creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Presence update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { "type": "array", - "description": "List of executions.", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { - "$ref": "#\/components\/schemas\/execution" + "type": "string" }, - "x-example": "" + "x-example": [ + "read(\"any\")" + ] + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, "required": [ - "total", - "executions" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "userId", + "source" ], "example": { - "total": 5, - "executions": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, - "countryList": { - "description": "Countries List", + "log": { + "description": "Log", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, - "format": "int32" + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "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" }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "$ref": "#\/components\/schemas\/country" - }, - "x-example": "" + "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": [ - "total", - "countries" + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" ], "example": { - "total": 5, - "countries": "" + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" } }, - "continentList": { - "description": "Continents List", + "user": { + "description": "User", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, - "format": "int32" + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" }, - "continents": { + "$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": {}, + "allOf": [ + { + "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" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/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": "List of continents.", + "description": "Labels for the user.", "items": { - "$ref": "#\/components\/schemas\/continent" + "type": "string" }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, - "format": "int32" + "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 + }, + "emailCanonical": { + "type": "string", + "description": "Canonical form of the user email address.", + "x-example": "john@appwrite.io", + "nullable": true + }, + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "x-example": true, + "nullable": true + }, + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "x-example": false, + "nullable": true + }, + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "x-example": true, + "nullable": true + }, + "emailIsCanonical": { + "type": "boolean", + "description": "Whether the user email is in its canonical form.", + "x-example": true, + "nullable": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "x-example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "x-example": true }, - "languages": { + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + }, + "targets": { "type": "array", - "description": "List of languages.", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", "items": { - "$ref": "#\/components\/schemas\/language" + "$ref": "#\/components\/schemas\/target" }, - "x-example": "" + "x-example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", + "nullable": true } }, "required": [ - "total", - "languages" + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" ], "example": { - "total": 5, - "languages": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "emailCanonical": "john@appwrite.io", + "emailIsFree": true, + "emailIsDisposable": false, + "emailIsCorporate": true, + "emailIsCanonical": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" } }, - "currencyList": { - "description": "Currencies List", + "algoMd5": { + "description": "AlgoMD5", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "$ref": "#\/components\/schemas\/currency" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "md5" } }, "required": [ - "total", - "currencies" + "type" ], "example": { - "total": 5, - "currencies": "" + "type": "md5" } }, - "phoneList": { - "description": "Phones List", + "algoSha": { + "description": "AlgoSHA", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "$ref": "#\/components\/schemas\/phone" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "sha" } }, "required": [ - "total", - "phones" + "type" ], "example": { - "total": 5, - "phones": "" + "type": "sha" } }, - "localeCodeList": { - "description": "Locale codes list", + "algoPhpass": { + "description": "AlgoPHPass", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of localeCodes that matched your query.", - "x-example": 5, - "format": "int32" - }, - "localeCodes": { - "type": "array", - "description": "List of localeCodes.", - "items": { - "$ref": "#\/components\/schemas\/localeCode" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "phpass" } }, "required": [ - "total", - "localeCodes" + "type" ], "example": { - "total": 5, - "localeCodes": "" + "type": "phpass" } }, - "transactionList": { - "description": "Transaction List", + "algoBcrypt": { + "description": "AlgoBcrypt", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" - }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "$ref": "#\/components\/schemas\/transaction" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Algo type.", + "x-example": "bcrypt" } }, "required": [ - "total", - "transactions" + "type" ], "example": { - "total": 5, - "transactions": "" + "type": "bcrypt" } }, - "row": { - "description": "Row", + "algoScrypt": { + "description": "AlgoScrypt", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Row ID.", - "x-example": "5e5ea5c16897e" - }, - "$sequence": { - "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true - }, - "$tableId": { + "type": { "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Algo type.", + "x-example": "scrypt" }, - "$databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" }, - "$createdAt": { - "type": "string", - "description": "Row creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" }, - "$updatedAt": { - "type": "string", - "description": "Row update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" }, - "$permissions": { - "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" } }, - "additionalProperties": true, "required": [ - "$id", - "$sequence", - "$tableId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" + "type", + "costCpu", + "costMemory", + "costParallel", + "length" ], "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 } }, - "document": { - "description": "Document", + "algoScryptModified": { + "description": "AlgoScryptModified", "type": "object", "properties": { - "$id": { + "type": { "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" + "description": "Algo type.", + "x-example": "scryptMod" }, - "$sequence": { + "salt": { "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" }, - "$collectionId": { + "saltSeparator": { "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Separator used to compute hash.", + "x-example": "Bw==" }, - "$databaseId": { + "signerKey": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true - }, - "$createdAt": { + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { "type": "string", - "description": "Document creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Algo type.", + "x-example": "argon2" }, - "$updatedAt": { - "type": "string", - "description": "Document update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "x-example": 65536, + "format": "int32" }, - "$permissions": { - "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] + "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" } }, - "additionalProperties": true, "required": [ - "$id", - "$sequence", - "$collectionId", - "$databaseId", - "$createdAt", - "$updatedAt", - "$permissions" + "type", + "memoryCost", + "timeCost", + "threads" ], "example": { - "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 } }, - "presence": { - "description": "Presence", + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", "type": "object", "properties": { "$id": { "type": "string", - "description": "Presence ID.", + "description": "Session ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Presence creation date in ISO 8601 format.", + "description": "Session creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Presence update date in ISO 8601 format.", + "description": "Session update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, "userId": { "type": "string", "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "x-example": "5e5bb8c16897e" }, - "metadata": { - "type": "object", - "additionalProperties": true, - "description": "Presence metadata.", - "x-example": { - "key": "value" - } - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "userId", - "source" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00", - "metadata": { - "key": "value" - } - } - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { + "expire": { "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userId": { + "provider": { "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" + "description": "Session Provider.", + "x-example": "email" }, - "userEmail": { + "providerUid": { "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" + "description": "Session Provider User ID.", + "x-example": "user@example.com" }, - "userName": { + "providerAccessToken": { "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" }, - "mode": { + "providerAccessTokenExpiry": { "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" + "description": "The date of when the access token expires in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userType": { + "providerRefreshToken": { "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" }, "ip": { "type": "string", - "description": "IP session in use when the session was created.", + "description": "IP 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).", @@ -18344,17 +21681,45 @@ "type": "string", "description": "Country name.", "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + }, + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] + }, + "secret": { + "type": "string", + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" + }, + "mfaUpdatedAt": { + "type": "string", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "event", + "$id", + "$createdAt", + "$updatedAt", "userId", - "userEmail", - "userName", - "mode", - "userType", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", "ip", - "time", "osCode", "osName", "osVersion", @@ -18368,17 +21733,24 @@ "deviceBrand", "deviceModel", "countryCode", - "countryName" + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" ], "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", "osName": "Mac", "osVersion": "Mac", @@ -18392,740 +21764,606 @@ "deviceBrand": "Google", "deviceModel": "Nexus 5", "countryCode": "US", - "countryName": "United States" + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" } }, - "user": { - "description": "User", + "identity": { + "description": "Identity", "type": "object", "properties": { "$id": { "type": "string", - "description": "User ID.", + "description": "Identity ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "User creation date in ISO 8601 format.", + "description": "Identity 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": {}, - "allOf": [ - { - "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" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/components\/schemas\/algoArgon2", - "scrypt": "#\/components\/schemas\/algoScrypt", - "scryptMod": "#\/components\/schemas\/algoScryptModified", - "bcrypt": "#\/components\/schemas\/algoBcrypt", - "phpass": "#\/components\/schemas\/algoPhpass", - "sha": "#\/components\/schemas\/algoSha", - "md5": "#\/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.", + "description": "Identity update date 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 - }, - "emailCanonical": { + "userId": { "type": "string", - "description": "Canonical form of the user email address.", - "x-example": "john@appwrite.io", - "nullable": true - }, - "emailIsFree": { - "type": "boolean", - "description": "Whether the user email is from a free email provider.", - "x-example": true, - "nullable": true - }, - "emailIsDisposable": { - "type": "boolean", - "description": "Whether the user email is from a disposable email provider.", - "x-example": false, - "nullable": true - }, - "emailIsCorporate": { - "type": "boolean", - "description": "Whether the user email is from a corporate domain.", - "x-example": true, - "nullable": true - }, - "emailIsCanonical": { - "type": "boolean", - "description": "Whether the user email is in its canonical form.", - "x-example": true, - "nullable": true - }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true + "description": "User ID.", + "x-example": "5e5bb8c16897e" }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/preferences" - } - ] + "provider": { + "type": "string", + "description": "Identity Provider.", + "x-example": "email" }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": [] + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" }, - "accessedAt": { + "providerEmail": { "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" + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "nullable": true + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" }, - "impersonatorUserId": { + "providerAccessTokenExpiry": { "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "nullable": true + "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", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "emailCanonical": "john@appwrite.io", - "emailIsFree": true, - "emailIsDisposable": false, - "emailIsCorporate": true, - "emailIsCanonical": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" } }, - "algoMd5": { - "description": "AlgoMD5", + "token": { + "description": "Token", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "$createdAt": { "type": "string", - "description": "Algo type.", - "x-example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "userId": { "type": "string", - "description": "Algo type.", - "x-example": "phpass" + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "phrase": { + "type": "string", + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" } }, "required": [ - "type" + "$id", + "$createdAt", + "userId", + "secret", + "expire", + "phrase" ], "example": { - "type": "phpass" + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" } }, - "algoBcrypt": { - "description": "AlgoBcrypt", + "jwt": { + "description": "JWT", "type": "object", "properties": { - "type": { + "jwt": { "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" } }, "required": [ - "type" + "jwt" ], "example": { - "type": "bcrypt" + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" } }, - "algoScrypt": { - "description": "AlgoScrypt", + "locale": { + "description": "Locale", "type": "object", "properties": { - "type": { + "ip": { "type": "string", - "description": "Algo type.", - "x-example": "scrypt" + "description": "User IP address.", + "x-example": "127.0.0.1" }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" + "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" + }, + "city": { + "type": "string", + "description": "City", + "x-example": "Kathmandu", + "nullable": true + }, + "timeZone": { + "type": "string", + "description": "Name of timezone", + "x-example": "Asia\/Kathmandu", + "nullable": true + }, + "postalCode": { + "type": "string", + "description": "Postal code", + "x-example": "44600", + "nullable": true + }, + "latitude": { + "type": "number", + "description": "Latitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN) of the IP", + "x-example": "15169", + "nullable": true }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization that owns the ASN", + "x-example": "GOOGLE", + "nullable": true }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { + "isp": { "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" + "description": "Internet service provider of the IP", + "x-example": "Google", + "nullable": true }, - "salt": { + "connectionType": { "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" + "description": "Connection type of the IP (e.g. cable, cellular, corporate)", + "x-example": "cable", + "nullable": true }, - "saltSeparator": { + "connectionUsageType": { "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" + "description": "User type classification of the IP (e.g. residential, business, hosting)", + "x-example": "residential", + "nullable": true }, - "signerKey": { + "connectionOrganization": { "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + "description": "Registered organization of the IP", + "x-example": "Google LLC", + "nullable": true } }, "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" ], "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD", + "city": "Kathmandu", + "timeZone": "Asia\/Kathmandu", + "postalCode": "44600", + "latitude": "82.345", + "longitude": "82.345", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "isp": "Google", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC" } }, - "algoArgon2": { - "description": "AlgoArgon2", + "localeCode": { + "description": "LocaleCode", "type": "object", "properties": { - "type": { + "code": { "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" + "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", + "x-example": "en-us" }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" + "name": { + "type": "string", + "description": "Locale name", + "x-example": "US" } }, "required": [ - "type", - "memoryCost", - "timeCost", - "threads" + "code", + "name" ], "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true + "code": "en-us", + "name": "US" } }, - "session": { - "description": "Session", + "file": { + "description": "File", "type": "object", "properties": { "$id": { "type": "string", - "description": "Session ID.", + "description": "File ID.", "x-example": "5e5ea5c16897e" }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { + "bucketId": { "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" }, - "expire": { + "$createdAt": { "type": "string", - "description": "Session expiration date in ISO 8601 format.", + "description": "File creation 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": { + "$updatedAt": { "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", + "description": "File update date 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" + "$permissions": { + "type": "array", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] }, - "osCode": { + "name": { "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" + "description": "File name.", + "x-example": "Pink.png" }, - "osName": { + "folder": { "type": "string", - "description": "Operating system name.", - "x-example": "Mac" + "description": "Virtual folder containing the file, with a trailing slash. Empty for the bucket root.", + "x-example": "photos\/2026\/" }, - "osVersion": { + "key": { "type": "string", - "description": "Operating system version.", - "x-example": "Mac" + "description": "Full virtual path of the file: the folder followed by the file name.", + "x-example": "photos\/2026\/Pink.png" }, - "clientType": { + "signature": { "type": "string", - "description": "Client type.", - "x-example": "browser" + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" }, - "clientCode": { + "mimeType": { "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" + "description": "File mime type.", + "x-example": "image\/png" }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" + "sizeActual": { + "type": "integer", + "description": "File actual stored size in bytes after compression and\/or encryption.", + "x-example": 12345, + "format": "int32" }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" + "encryption": { + "type": "boolean", + "description": "Whether file contents are encrypted at rest.", + "x-example": true }, - "deviceBrand": { + "compression": { "type": "string", - "description": "Device brand name.", - "x-example": "Google" + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "folder", + "key", + "signature", + "mimeType", + "sizeOriginal", + "sizeActual", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "folder": "photos\/2026\/", + "key": "photos\/2026\/Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "sizeActual": 12345, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "deviceModel": { + "$createdAt": { "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" + "description": "Team creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "countryCode": { + "$updatedAt": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Team update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "countryName": { + "name": { "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "Team name.", + "x-example": "VIP" }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" }, - "x-example": [ - "email" + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } ] - }, - "secret": { - "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" - }, - "mfaUpdatedAt": { - "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" + "name", + "total", + "prefs" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } } }, - "identity": { - "description": "Identity", + "membership": { + "description": "Membership", "type": "object", "properties": { "$id": { "type": "string", - "description": "Identity ID.", + "description": "Membership ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Identity creation date in ISO 8601 format.", + "description": "Membership 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.", + "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": "5e5bb8c16897e" + "x-example": "5e5ea5c16897e" }, - "provider": { + "userName": { "type": "string", - "description": "Identity Provider.", - "x-example": "email" + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" }, - "providerUid": { + "userEmail": { "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" }, - "providerEmail": { + "userPhone": { "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" }, - "providerAccessToken": { + "teamId": { "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "providerAccessTokenExpiry": { + "teamName": { "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", + "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" }, - "providerRefreshToken": { + "joined": { "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "userAccessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] } }, "required": [ @@ -19133,1652 +22371,1822 @@ "$createdAt", "$updatedAt", "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "userAccessedAt", + "roles" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", + "roles": [ + "owner" + ] } }, - "token": { - "description": "Token", + "execution": { + "description": "Execution", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Token creation date in ISO 8601 format.", + "description": "Execution creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userId": { + "$updatedAt": { "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" + "description": "Execution update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "secret": { + "$permissions": { + "type": "array", + "description": "Execution roles.", + "items": { + "type": "string" + }, + "x-example": [ + "any" + ] + }, + "functionId": { "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.", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed", + "scheduled" + ] + }, + "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 request 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": "" }, - "expire": { + "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": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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": "" }, - "phrase": { + "errors": { "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" + "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": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", "$createdAt", - "userId", - "secret", - "expire", - "phrase" + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" ], "example": { - "$id": "bb8ea5c16897e", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" } }, - "jwt": { - "description": "JWT", + "country": { + "description": "Country", "type": "object", "properties": { - "jwt": { + "name": { "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" } }, "required": [ - "jwt" + "name", + "code" ], "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "name": "United States", + "code": "US" } }, - "locale": { - "description": "Locale", + "continent": { + "description": "Continent", "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 + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" }, - "currency": { + "code": { "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" + "description": "Continent two letter code.", + "x-example": "EU" } }, "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" + "name", + "code" ], "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" + "name": "Europe", + "code": "EU" } }, - "localeCode": { - "description": "LocaleCode", + "language": { + "description": "Language", "type": "object", "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, "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" + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" }, - "name": { + "nativeName": { "type": "string", - "description": "Locale name", - "x-example": "US" + "description": "Language native name.", + "x-example": "Italiano" } }, "required": [ + "name", "code", - "name" + "nativeName" ], "example": { - "code": "en-us", - "name": "US" + "name": "Italian", + "code": "it", + "nativeName": "Italiano" } }, - "file": { - "description": "File", + "currency": { + "description": "Currency", "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": { + "symbol": { "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] + "description": "Currency symbol.", + "x-example": "$" }, "name": { "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" + "description": "Currency name.", + "x-example": "US dollar" }, - "mimeType": { + "symbolNative": { "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "sizeActual": { - "type": "integer", - "description": "File actual stored size in bytes after compression and\/or encryption.", - "x-example": 12345, - "format": "int32" + "description": "Currency native symbol.", + "x-example": "$" }, - "chunksTotal": { + "decimalDigits": { "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, + "description": "Number of decimal digits.", + "x-example": 2, "format": "int32" }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" }, - "encryption": { - "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", + "x-example": "USD" }, - "compression": { + "namePlural": { "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" + "description": "Currency plural name", + "x-example": "US dollars" } }, "required": [ - "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", + "symbol", "name", - "signature", - "mimeType", - "sizeOriginal", - "sizeActual", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" ], "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "sizeActual": 12345, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" } }, - "team": { - "description": "Team", + "phone": { + "description": "Phone", "type": "object", "properties": { - "$id": { + "code": { "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "description": "Phone code.", + "x-example": "+1" }, - "$createdAt": { + "countryCode": { "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" }, - "$updatedAt": { + "countryName": { "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { "name": { "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" + "description": "Header name.", + "x-example": "Content-Type" }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/preferences" - } - ] + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", "name", - "total", - "prefs" + "value" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } + "name": "Content-Type", + "value": "application\/json" } }, - "membership": { - "description": "Membership", + "mfaChallenge": { + "description": "MFA Challenge", "type": "object", "properties": { "$id": { "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" + "description": "Token ID.", + "x-example": "bb8ea5c16897e" }, "$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.", + "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": "5e5ea5c16897e" - }, - "userName": { - "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" - }, - "userEmail": { - "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { - "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "teamName": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "invited": { - "type": "string", - "description": "Date, the user has been invited to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "joined": { - "type": "string", - "description": "Date, the user has accepted the invitation to join the team in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false + "x-example": "5e5ea5c168bb8" }, - "userAccessedAt": { + "expire": { "type": "string", - "description": "Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.", + "description": "Token expiration date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "roles": { + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { "type": "array", - "description": "User list of roles", + "description": "Recovery codes.", "items": { "type": "string" }, "x-example": [ - "owner" + "a3kf0-s0cl2", + "s0co1-as98s" ] } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "userAccessedAt", - "roles" + "recoveryCodes" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "userAccessedAt": "2020-10-15T06:38:00.000+00:00", - "roles": [ - "owner" + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" ] } }, - "execution": { - "description": "Execution", + "mfaType": { + "description": "MFAType", + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" + }, + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true + }, + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true + }, + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true + }, + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "transaction": { + "description": "Transaction", "type": "object", "properties": { "$id": { "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" + "description": "Transaction ID.", + "x-example": "259125845563242502" }, "$createdAt": { "type": "string", - "description": "Execution creation date in ISO 8601 format.", + "description": "Transaction creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Execution update date in ISO 8601 format.", + "description": "Transaction update 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": { + "status": { "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" }, - "trigger": { + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] + "description": "Subscriber ID.", + "x-example": "259125845563242502" }, - "status": { + "$createdAt": { "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "requestMethod": { + "$updatedAt": { "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "requestPath": { + "targetId": { "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" + "description": "Target ID.", + "x-example": "259125845563242502" }, - "requestHeaders": { - "type": "array", - "description": "HTTP request 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" + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" }, - "x-example": [ + "allOf": [ { - "Content-Type": "application\/json" + "$ref": "#\/components\/schemas\/target" } ] }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" - }, - "responseBody": { + "userId": { "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" - }, - "responseHeaders": { - "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", - "items": { - "$ref": "#\/components\/schemas\/headers" - }, - "x-example": [ - { - "Content-Type": "application\/json" - } - ] + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" }, - "logs": { + "userName": { "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": "" + "description": "User Name.", + "x-example": "Aegon Targaryen" }, - "errors": { + "topicId": { "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": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" + "description": "Topic ID.", + "x-example": "259125845563242502" }, - "scheduledAt": { + "providerType": { "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "259125845563242502", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" } }, - "country": { - "description": "Country", + "target": { + "description": "Target", "type": "object", "properties": { - "name": { + "$id": { "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "Target ID.", + "x-example": "259125845563242502" }, - "code": { + "$createdAt": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "United States", - "code": "US" - } - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "name": { "type": "string", - "description": "Continent name.", - "x-example": "Europe" + "description": "Target Name.", + "x-example": "Apple iPhone 12" }, - "code": { + "userId": { "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { "type": "string", - "description": "Language name.", - "x-example": "Italian" + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true }, - "code": { + "providerType": { "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" }, - "nativeName": { + "identifier": { "type": "string", - "description": "Language native name.", - "x-example": "Italiano" + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "name", - "code", - "nativeName" + "userId", + "providerType", + "identifier", + "expired" ], "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false } }, - "currency": { - "description": "Currency", + "app": { + "description": "App", "type": "object", "properties": { - "symbol": { + "$id": { "type": "string", - "description": "Currency symbol.", - "x-example": "$" + "description": "App ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, "name": { "type": "string", - "description": "Currency name.", - "x-example": "US dollar" + "description": "Application name.", + "x-example": "My Application" }, - "symbolNative": { + "description": { "type": "string", - "description": "Currency native symbol.", - "x-example": "$" + "description": "Application description shown to users during OAuth2 consent.", + "x-example": "Connect your workspace to My Application." }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" + "clientUri": { + "type": "string", + "description": "Application homepage URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com" }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" + "logoUri": { + "type": "string", + "description": "Application logo URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/logo.png" }, - "code": { + "privacyPolicyUrl": { "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/privacy" }, - "namePlural": { + "termsUrl": { "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ], - "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" - } - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/terms" + }, + "contacts": { + "type": "array", + "description": "Application support or security contact emails.", + "items": { + "type": "string" + }, + "x-example": [ + "support@example.com" + ] + }, + "tagline": { "type": "string", - "description": "Phone code.", - "x-example": "+1" + "description": "Application tagline shown to users during OAuth2 consent.", + "x-example": "Automate your workspace." }, - "countryCode": { + "tags": { + "type": "array", + "description": "Application tags shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "x-example": [ + "productivity", + "automation" + ] + }, + "labels": { + "type": "array", + "description": "Application labels. Read-only for clients; only a server SDK using a project API key can update them.", + "items": { + "type": "string" + }, + "x-example": [ + "featured" + ] + }, + "images": { + "type": "array", + "description": "Application image URLs shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/screenshot.png" + ] + }, + "supportUrl": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Application support URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/support" }, - "countryName": { + "dataDeletionUrl": { "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "code", - "countryCode", - "countryName" - ], - "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" - } - }, - "headers": { - "description": "Headers", - "type": "object", - "properties": { - "name": { + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/data-deletion" + }, + "redirectUris": { + "type": "array", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/callback" + ] + }, + "postLogoutRedirectUris": { + "type": "array", + "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/logged-out" + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "x-example": true + }, + "type": { "type": "string", - "description": "Header name.", - "x-example": "Content-Type" + "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", + "x-example": "confidential" }, - "value": { + "deviceFlow": { + "type": "boolean", + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "x-example": false + }, + "teamId": { "type": "string", - "description": "Header value.", - "x-example": "application\/json" + "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", + "x-example": "5e5ea5c16897e" + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "name", - "value" + "description", + "clientUri", + "logoUri", + "privacyPolicyUrl", + "termsUrl", + "contacts", + "tagline", + "tags", + "labels", + "images", + "supportUrl", + "dataDeletionUrl", + "redirectUris", + "postLogoutRedirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "installationScopes", + "installationRedirectUrl", + "secrets" ], "example": { - "name": "Content-Type", - "value": "application\/json" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "description": "Connect your workspace to My Application.", + "clientUri": "https:\/\/example.com", + "logoUri": "https:\/\/example.com\/logo.png", + "privacyPolicyUrl": "https:\/\/example.com\/privacy", + "termsUrl": "https:\/\/example.com\/terms", + "contacts": [ + "support@example.com" + ], + "tagline": "Automate your workspace.", + "tags": [ + "productivity", + "automation" + ], + "labels": [ + "featured" + ], + "images": [ + "https:\/\/example.com\/screenshot.png" + ], + "supportUrl": "https:\/\/example.com\/support", + "dataDeletionUrl": "https:\/\/example.com\/data-deletion", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "postLogoutRedirectUris": [ + "https:\/\/example.com\/logged-out" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", + "secrets": [] } }, - "mfaChallenge": { - "description": "MFA Challenge", + "appSecret": { + "description": "AppSecret", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Token creation date in ISO 8601 format.", + "description": "Secret creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userId": { + "$updatedAt": { "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" + "description": "Secret update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "expire": { + "appId": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "Always empty. The application client secret is returned only once, in the response of the createSecret method.", + "x-example": "" + }, + "hint": { + "type": "string", + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", "$createdAt", - "userId", - "expire" + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "$id": "bb8ea5c16897e", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "mfaType": { - "description": "MFAType", + "appSecretPlaintext": { + "description": "AppSecretPlaintext", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Secret creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Secret update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" + }, "secret": { "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" + "description": "Application client secret. Returned only when the secret is created; subsequent reads always return an empty value.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "uri": { + "hint": { "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "required": [ - "secret", - "uri" - ], - "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" - } - }, - "mfaFactors": { - "description": "MFAFactors", - "type": "object", - "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true + "createdById": { + "type": "string", + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "x-example": "Walter White" }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ - "totp", - "phone", - "email", - "recoveryCode" + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "transaction": { - "description": "Transaction", + "appScope": { + "description": "AppScope", "type": "object", "properties": { - "$id": { + "value": { "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" + "description": "Scope value as requested by apps.", + "x-example": "organization:organization.read" }, - "$createdAt": { + "description": { "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Human-readable description of what the scope grants.", + "x-example": "Access to read the organization" }, - "$updatedAt": { + "type": { "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable.", + "x-example": "organization" }, - "status": { + "category": { "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" - }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" + "description": "Scope category, used to group scopes on consent and installation screens.", + "x-example": "Organization" }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "deprecated": { + "type": "boolean", + "description": "Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants.", + "x-example": false } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" + "value", + "description", + "type", + "category", + "deprecated" ], "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" + "value": "organization:organization.read", + "description": "Access to read the organization", + "type": "organization", + "category": "Organization", + "deprecated": false } }, - "subscriber": { - "description": "Subscriber", + "appInstallation": { + "description": "AppInstallation", "type": "object", "properties": { "$id": { "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" + "description": "Installation ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", + "description": "Installation creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Subscriber update date in ISO 8601 format.", + "description": "Installation update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "targetId": { + "appId": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "ID of the installed application.", + "x-example": "5e5ea5c16897e" }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" + "teamId": { + "type": "string", + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" }, - "allOf": [ + "x-example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ { - "$ref": "#\/components\/schemas\/target" + "type": "project", + "identifiers": [ + "*" + ] } ] }, - "userId": { + "createdById": { "type": "string", - "description": "Topic ID.", + "description": "ID of the user who created the installation.", "x-example": "5e5ea5c16897e" }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" - }, - "topicId": { + "createdByName": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "Name of the user who created the installation.", + "x-example": "Walter White" }, - "providerType": { + "lastAccessedAt": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" ], "example": { - "$id": "259125845563242502", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "target": { - "description": "Target", + "appKey": { + "description": "AppKey", "type": "object", "properties": { "$id": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "App key ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Target creation time in ISO 8601 format.", + "description": "App key creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Target update date in ISO 8601 format.", + "description": "App key update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { + "appId": { "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" }, - "userId": { + "secret": { "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "providerId": { + "hint": { "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" }, - "providerType": { + "createdById": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" }, - "identifier": { + "createdByName": { "type": "string", - "description": "The target identifier.", - "x-example": "token" + "description": "Name of the user who created the app key.", + "x-example": "Walter White" }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false + "lastAccessedAt": { + "type": "string", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2Authorize": { + "description": "OAuth2 Authorize", + "type": "object", + "properties": { + "grantId": { + "type": "string", + "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", + "x-example": "5e5ea5c16897e" + }, + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "grantId", + "redirectUrl" + ], + "example": { + "grantId": "5e5ea5c16897e", + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Approve": { + "description": "OAuth2 Approve", + "type": "object", + "properties": { + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "redirectUrl" + ], + "example": { + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Reject": { + "description": "OAuth2 Reject", + "type": "object", + "properties": { + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", + "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + } + }, + "required": [ + "redirectUrl" ], "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false + "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" } }, - "app": { - "description": "App", + "oauth2Grant": { + "description": "OAuth2 Grant", "type": "object", "properties": { "$id": { "type": "string", - "description": "App ID.", + "description": "Grant ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "App creation time in ISO 8601 format.", + "description": "Grant creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "App update date in ISO 8601 format.", + "description": "Grant update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { - "type": "string", - "description": "Application name.", - "x-example": "My Application" - }, - "description": { - "type": "string", - "description": "Application description shown to users during OAuth2 consent.", - "x-example": "Connect your workspace to My Application." - }, - "clientUri": { - "type": "string", - "description": "Application homepage URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com" - }, - "logoUri": { - "type": "string", - "description": "Application logo URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/logo.png" - }, - "privacyPolicyUrl": { - "type": "string", - "description": "Application privacy policy URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/privacy" - }, - "termsUrl": { + "userId": { "type": "string", - "description": "Application terms of service URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/terms" - }, - "contacts": { - "type": "array", - "description": "Application support or security contact emails.", - "items": { - "type": "string" - }, - "x-example": [ - "support@example.com" - ] + "description": "ID of the user the grant belongs to.", + "x-example": "5e5ea5c16897e" }, - "tagline": { + "appId": { "type": "string", - "description": "Application tagline shown to users during OAuth2 consent.", - "x-example": "Automate your workspace." + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "x-example": "5e5ea5c16897e" }, - "tags": { + "scopes": { "type": "array", - "description": "Application tags shown to users during OAuth2 consent.", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", "items": { "type": "string" }, "x-example": [ - "productivity", - "automation" + "openid", + "email", + "profile" ] }, - "images": { + "resources": { "type": "array", - "description": "Application image URLs shown to users during OAuth2 consent.", + "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", "items": { "type": "string" }, "x-example": [ - "https:\/\/example.com\/screenshot.png" + "https:\/\/api.example.com\/" ] }, - "supportUrl": { + "authorizationDetails": { "type": "string", - "description": "Application support URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/support" + "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "dataDeletionUrl": { + "prompt": { "type": "string", - "description": "Application data deletion URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/data-deletion" - }, - "redirectUris": { - "type": "array", - "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/callback" - ] - }, - "postLogoutRedirectUris": { - "type": "array", - "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/logged-out" - ] - }, - "enabled": { - "type": "boolean", - "description": "Whether the app is enabled or not.", - "x-example": true + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "x-example": "login" }, - "type": { + "redirectUri": { "type": "string", - "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", - "x-example": "confidential" - }, - "deviceFlow": { - "type": "boolean", - "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", - "x-example": false + "description": "Redirect URI the user will be sent to after the flow completes.", + "x-example": "https:\/\/example.com\/callback" }, - "teamId": { - "type": "string", - "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", - "x-example": "5e5ea5c16897e" + "authTime": { + "type": "integer", + "description": "Unix timestamp of when the user last authenticated.", + "x-example": 1592981250, + "format": "int32" }, - "userId": { + "expire": { "type": "string", - "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", - "x-example": "5e5ea5c16897e" - }, - "secrets": { - "type": "array", - "description": "List of application secrets.", - "items": { - "$ref": "#\/components\/schemas\/appSecret" - }, - "x-example": [] + "description": "Grant expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "name", - "description", - "clientUri", - "logoUri", - "privacyPolicyUrl", - "termsUrl", - "contacts", - "tagline", - "tags", - "images", - "supportUrl", - "dataDeletionUrl", - "redirectUris", - "postLogoutRedirectUris", - "enabled", - "type", - "deviceFlow", - "teamId", "userId", - "secrets" + "appId", + "scopes", + "resources", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Application", - "description": "Connect your workspace to My Application.", - "clientUri": "https:\/\/example.com", - "logoUri": "https:\/\/example.com\/logo.png", - "privacyPolicyUrl": "https:\/\/example.com\/privacy", - "termsUrl": "https:\/\/example.com\/terms", - "contacts": [ - "support@example.com" - ], - "tagline": "Automate your workspace.", - "tags": [ - "productivity", - "automation" - ], - "images": [ - "https:\/\/example.com\/screenshot.png" - ], - "supportUrl": "https:\/\/example.com\/support", - "dataDeletionUrl": "https:\/\/example.com\/data-deletion", - "redirectUris": [ - "https:\/\/example.com\/callback" + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" ], - "postLogoutRedirectUris": [ - "https:\/\/example.com\/logged-out" + "resources": [ + "https:\/\/api.example.com\/" ], - "enabled": true, - "type": "confidential", - "deviceFlow": false, - "teamId": "5e5ea5c16897e", - "userId": "5e5ea5c16897e", - "secrets": [] + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "prompt": "login", + "redirectUri": "https:\/\/example.com\/callback", + "authTime": 1592981250, + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2DeviceAuthorization": { + "description": "OAuth2 Device Authorization", + "type": "object", + "properties": { + "device_code": { + "type": "string", + "description": "Device verification code used by the client to poll the token endpoint.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "user_code": { + "type": "string", + "description": "Short code the end user enters on the verification page.", + "x-example": "ABCD-EFGH" + }, + "verification_uri": { + "type": "string", + "description": "URL where the end user enters the user code.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" + }, + "verification_uri_complete": { + "type": "string", + "description": "Verification URL with the user code prefilled as a query parameter.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" + }, + "expires_in": { + "type": "integer", + "description": "Lifetime of the device code and user code in seconds.", + "x-example": 900, + "format": "int32" + }, + "interval": { + "type": "integer", + "description": "Minimum polling interval for the token endpoint in seconds.", + "x-example": 5, + "format": "int32" + } + }, + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "example": { + "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "user_code": "ABCD-EFGH", + "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", + "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", + "expires_in": 900, + "interval": 5 } }, - "appSecret": { - "description": "AppSecret", + "oauth2PAR": { + "description": "OAuth2 PAR", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Secret ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { + "request_uri": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Authorization request handle to pass to the authorize endpoint.", + "x-example": "urn:appwrite:oauth2:request:5e5ea5c16897e" }, - "$updatedAt": { + "expires_in": { + "type": "integer", + "description": "Lifetime of the authorization request handle in seconds.", + "x-example": 600, + "format": "int32" + } + }, + "required": [ + "request_uri", + "expires_in" + ], + "example": { + "request_uri": "urn:appwrite:oauth2:request:5e5ea5c16897e", + "expires_in": 600 + } + }, + "oauth2Token": { + "description": "OAuth2 Token", + "type": "object", + "properties": { + "access_token": { "type": "string", - "description": "Secret update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "OAuth2 access token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." }, - "appId": { + "token_type": { "type": "string", - "description": "Application ID this secret belongs to.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 token type.", + "x-example": "Bearer" }, - "secret": { - "type": "string", - "description": "Hashed application client secret.", - "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + "expires_in": { + "type": "integer", + "description": "Access token lifetime in seconds.", + "x-example": 3600, + "format": "int32" }, - "hint": { + "refresh_token": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "OAuth2 refresh token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, - "createdById": { + "scope": { "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "description": "Space-separated scopes granted to the access token.", + "x-example": "openid email profile" }, - "createdByName": { + "authorization_details": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Granted RFC 9396 authorization details as a JSON string.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "nullable": true }, - "lastAccessedAt": { + "id_token": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", + "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", "nullable": true } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "appId", - "secret", - "hint", - "createdById", - "createdByName" + "access_token", + "token_type", + "expires_in", + "refresh_token", + "scope" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "secret": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "token_type": "Bearer", + "expires_in": 3600, + "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", + "scope": "openid email profile", + "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } }, - "appSecretPlaintext": { - "description": "AppSecretPlaintext", + "oauth2Consent": { + "description": "OAuth2 Consent", "type": "object", "properties": { "$id": { "type": "string", - "description": "Secret ID.", + "description": "Consent ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", + "description": "Consent creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Secret update time in ISO 8601 format.", + "description": "Consent update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appId": { + "userId": { "type": "string", - "description": "Application ID this secret belongs to.", + "description": "ID of the user the consent belongs to.", "x-example": "5e5ea5c16897e" }, - "secret": { + "appId": { "type": "string", - "description": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked value.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + "description": "ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients.", + "x-example": "5e5ea5c16897e" }, - "hint": { + "cimdUrl": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "Client ID metadata document URL of the client the consent was given to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" }, - "createdById": { - "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "scopes": { + "type": "array", + "description": "OAuth2 scopes the user consented to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] }, - "createdByName": { + "resources": { + "type": "array", + "description": "RFC 8707 resource indicators the user consented to.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/api.example.com\/" + ] + }, + "authorizationDetails": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "lastAccessedAt": { + "expire": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", "$createdAt", "$updatedAt", + "userId", "appId", - "secret", - "hint", - "createdById", - "createdByName" + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", "appId": "5e5ea5c16897e", - "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oauth2Authorize": { - "description": "OAuth2 Authorize", - "type": "object", - "properties": { - "grantId": { - "type": "string", - "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", - "x-example": "5e5ea5c16897e" - }, - "redirectUrl": { - "type": "string", - "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" - } - }, - "required": [ - "grantId", - "redirectUrl" - ], - "example": { - "grantId": "5e5ea5c16897e", - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" - } - }, - "oauth2Approve": { - "description": "OAuth2 Approve", - "type": "object", - "properties": { - "redirectUrl": { - "type": "string", - "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" - } - }, - "required": [ - "redirectUrl" - ], - "example": { - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" - } - }, - "oauth2Reject": { - "description": "OAuth2 Reject", - "type": "object", - "properties": { - "redirectUrl": { - "type": "string", - "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", - "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" - } - }, - "required": [ - "redirectUrl" - ], - "example": { - "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" } }, - "oauth2Grant": { - "description": "OAuth2 Grant", + "oauth2ConsentToken": { + "description": "OAuth2 Consent Token", "type": "object", "properties": { "$id": { "type": "string", - "description": "Grant ID.", + "description": "Token family ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Grant creation time in ISO 8601 format.", + "description": "Token creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Grant update date in ISO 8601 format.", + "description": "Token update date in ISO 8601 format. Refreshing the token family updates this.", "x-example": "2020-10-15T06:38:00.000+00:00" }, + "consentId": { + "type": "string", + "description": "ID of the consent the token family was issued under.", + "x-example": "5e5ea5c16897e" + }, "userId": { "type": "string", - "description": "ID of the user the grant belongs to.", + "description": "ID of the user the token family belongs to.", "x-example": "5e5ea5c16897e" }, "appId": { "type": "string", - "description": "ID of the OAuth2 client (app) the grant was requested for.", + "description": "ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients.", "x-example": "5e5ea5c16897e" }, + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the token family was issued to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" + }, "scopes": { "type": "array", - "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "description": "OAuth2 scopes granted on the token family.", "items": { "type": "string" }, @@ -20790,7 +24198,7 @@ }, "resources": { "type": "array", - "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", + "description": "RFC 8707 resource indicators granted on the token family.", "items": { "type": "string" }, @@ -20800,28 +24208,12 @@ }, "authorizationDetails": { "type": "string", - "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "description": "Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields.", "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "prompt": { - "type": "string", - "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", - "x-example": "login" - }, - "redirectUri": { - "type": "string", - "description": "Redirect URI the user will be sent to after the flow completes.", - "x-example": "https:\/\/example.com\/callback" - }, - "authTime": { - "type": "integer", - "description": "Unix timestamp of when the user last authenticated.", - "x-example": 1592981250, - "format": "int32" - }, "expire": { "type": "string", - "description": "Grant expiration time in ISO 8601 format.", + "description": "Expiration time of the current access token of this family in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" } }, @@ -20829,22 +24221,23 @@ "$id", "$createdAt", "$updatedAt", + "consentId", "userId", "appId", + "cimdUrl", "scopes", "resources", "authorizationDetails", - "prompt", - "redirectUri", - "authTime", "expire" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "consentId": "5e5ea5c16897e", "userId": "5e5ea5c16897e", "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", "scopes": [ "openid", "email", @@ -20854,124 +24247,167 @@ "https:\/\/api.example.com\/" ], "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", - "prompt": "login", - "redirectUri": "https:\/\/example.com\/callback", - "authTime": 1592981250, "expire": "2020-10-15T06:38:00.000+00:00" } }, - "oauth2DeviceAuthorization": { - "description": "OAuth2 Device Authorization", + "oauth2Project": { + "description": "OAuth2 Project", "type": "object", "properties": { - "device_code": { + "$id": { "type": "string", - "description": "Device verification code used by the client to poll the token endpoint.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" }, - "user_code": { + "region": { "type": "string", - "description": "Short code the end user enters on the verification page.", - "x-example": "ABCD-EFGH" + "description": "Region ID the project is deployed in.", + "x-example": "fra" }, - "verification_uri": { + "endpoint": { "type": "string", - "description": "URL where the end user enters the user code.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" - }, - "verification_uri_complete": { + "description": "API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured.", + "x-example": "https:\/\/fra.cloud.appwrite.io\/v1" + } + }, + "required": [ + "$id", + "region", + "endpoint" + ], + "example": { + "$id": "5e5ea5c16897e", + "region": "fra", + "endpoint": "https:\/\/fra.cloud.appwrite.io\/v1" + } + }, + "oauth2Organization": { + "description": "OAuth2 Organization", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Verification URL with the user code prefilled as a query parameter.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" - }, - "expires_in": { + "description": "Organization ID.", + "x-example": "5e5ea5c16897e" + } + }, + "required": [ + "$id" + ], + "example": { + "$id": "5e5ea5c16897e" + } + }, + "oauth2ProjectList": { + "description": "OAuth2 accessible projects list", + "type": "object", + "properties": { + "total": { "type": "integer", - "description": "Lifetime of the device code and user code in seconds.", - "x-example": 900, + "description": "Total number of projects that matched your query.", + "x-example": 5, "format": "int32" }, - "interval": { + "projects": { + "type": "array", + "description": "List of projects.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Project" + }, + "x-example": "" + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "oauth2OrganizationList": { + "description": "OAuth2 accessible organizations list", + "type": "object", + "properties": { + "total": { "type": "integer", - "description": "Minimum polling interval for the token endpoint in seconds.", + "description": "Total number of organizations that matched your query.", "x-example": 5, "format": "int32" + }, + "organizations": { + "type": "array", + "description": "List of organizations.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Organization" + }, + "x-example": "" } }, "required": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" + "total", + "organizations" ], "example": { - "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "user_code": "ABCD-EFGH", - "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", - "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", - "expires_in": 900, - "interval": 5 + "total": 5, + "organizations": "" } }, - "oauth2Token": { - "description": "OAuth2 Token", + "oauth2ConsentList": { + "description": "OAuth2 consents list", "type": "object", "properties": { - "access_token": { - "type": "string", - "description": "OAuth2 access token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." - }, - "token_type": { - "type": "string", - "description": "OAuth2 token type.", - "x-example": "Bearer" - }, - "expires_in": { + "total": { "type": "integer", - "description": "Access token lifetime in seconds.", - "x-example": 3600, + "description": "Total number of consents that matched your query.", + "x-example": 5, "format": "int32" }, - "refresh_token": { - "type": "string", - "description": "OAuth2 refresh token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." - }, - "scope": { - "type": "string", - "description": "Space-separated scopes granted to the access token.", - "x-example": "openid email profile" - }, - "authorization_details": { - "type": "string", - "description": "Granted RFC 9396 authorization details as a JSON string.", - "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "nullable": true + "consents": { + "type": "array", + "description": "List of consents.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Consent" + }, + "x-example": "" + } + }, + "required": [ + "total", + "consents" + ], + "example": { + "total": 5, + "consents": "" + } + }, + "oauth2ConsentTokenList": { + "description": "OAuth2 consent tokens list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" }, - "id_token": { - "type": "string", - "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "nullable": true + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + }, + "x-example": "" } }, "required": [ - "access_token", - "token_type", - "expires_in", - "refresh_token", - "scope" + "total", + "tokens" ], "example": { - "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "token_type": "Bearer", - "expires_in": 3600, - "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", - "scope": "openid email profile", - "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + "total": 5, + "tokens": "" } }, "appsList": { @@ -21029,6 +24465,90 @@ "total": 5, "secrets": "" } + }, + "appScopeList": { + "description": "App scopes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of scopes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "scopes": { + "type": "array", + "description": "List of scopes.", + "items": { + "$ref": "#\/components\/schemas\/appScope" + }, + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": { @@ -21061,6 +24581,12 @@ "demo": "" } }, + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "The OAuth access token to authenticate with" + }, "Locale": { "type": "apiKey", "name": "X-Appwrite-Locale", diff --git a/specs/latest/open-api3-latest-console.json b/specs/latest/open-api3-latest-console.json index a0c69a0f..0d099d8c 100644 --- a/specs/latest/open-api3-latest-console.json +++ b/specs/latest/open-api3-latest-console.json @@ -594,6 +594,430 @@ ] } }, + "\/account\/consents": { + "get": { + "summary": "List consents", + "operationId": "accountListConsents", + "tags": [ + "account" + ], + "description": "Get a list of the OAuth2 consents the current user has given to third-party apps.", + "responses": { + "200": { + "description": "OAuth2 consents list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listConsents", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/list-consents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}": { + "get": { + "summary": "Get consent", + "operationId": "accountGetConsent", + "tags": [ + "account" + ], + "description": "Get an OAuth2 consent the current user has given to a third-party app by its unique ID.", + "responses": { + "200": { + "description": "OAuth2 Consent", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Consent" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getConsent", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/get-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent", + "operationId": "accountDeleteConsent", + "tags": [ + "account" + ], + "description": "Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteConsent", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/delete-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens": { + "get": { + "summary": "List consent tokens", + "operationId": "accountListConsentTokens", + "tags": [ + "account" + ], + "description": "Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 consent tokens list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listConsentTokens", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/list-consent-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens\/{tokenId}": { + "get": { + "summary": "Get consent token", + "operationId": "accountGetConsentToken", + "tags": [ + "account" + ], + "description": "Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 Consent Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getConsentToken", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/get-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent token", + "operationId": "accountDeleteConsentToken", + "tags": [ + "account" + ], + "description": "Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteConsentToken", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/delete-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/account\/coupons\/{couponId}": { "get": { "summary": "Get coupon details", @@ -1117,7 +1541,7 @@ }, "scopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { "type": "string", @@ -1279,7 +1703,7 @@ }, "scopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { "type": "string", @@ -3921,7 +4345,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -3929,6 +4353,7 @@ "enum": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -3975,6 +4400,7 @@ "x-enum-keys": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -4916,7 +5342,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -4924,6 +5350,7 @@ "enum": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -4970,6 +5397,7 @@ "x-enum-keys": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -5578,7 +6006,10 @@ "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 attributes such as userId, teamId, etc.", "required": false, "schema": { - "type": "string", + "type": "array", + "items": { + "type": "string" + }, "default": [] }, "in": "query" @@ -5671,13 +6102,13 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -5747,13 +6178,13 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -5876,7 +6307,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "x-example": null, "items": { "type": "string" @@ -5884,7 +6315,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -5927,6 +6358,110 @@ } } }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallationScopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/apps\/scopes\/oauth2": { + "get": { + "summary": "List OAuth2 Scopes", + "operationId": "appsListOAuth2Scopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request during the OAuth2 flow.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Scopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-o-auth-2-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, "\/apps\/{appId}": { "get": { "summary": "Get Application", @@ -5950,13 +6485,13 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -5980,7 +6515,7 @@ "parameters": [ { "name": "appId", - "description": "Application unique ID.", + "description": "Application unique ID or HTTPS client ID metadata document URL.", "required": true, "schema": { "type": "string", @@ -6012,13 +6547,13 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -6151,7 +6686,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "default": [], "x-example": null, "items": { @@ -6160,7 +6695,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -6178,6 +6713,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -6203,13 +6754,13 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -6247,21 +6798,21 @@ ] } }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/installations": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "List Installations", + "operationId": "appsListInstallations", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { "200": { - "description": "App secrets list", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -6269,15 +6820,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": null, + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -6333,85 +6887,23 @@ "in": "query" } ] - }, - "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", - "tags": [ - "apps" - ], - "description": "Create a new client secret for an application.", - "responses": { - "201": { - "description": "AppSecretPlaintext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSecret", - "group": null, - "cookies": false, - "type": "", - "demo": "apps\/create-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "appId", - "description": "Application unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] } }, - "\/apps\/{appId}\/secrets\/{secretId}": { + "\/apps\/{appId}\/installations\/{installationId}": { "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + "summary": "Get Installation", + "operationId": "appsGetInstallation", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { "200": { - "description": "AppSecret", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecret" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -6419,15 +6911,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": null, + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -6459,24 +6954,24 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] }, "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + "summary": "Delete Installation", + "operationId": "appsDeleteInstallation", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.", "responses": { "204": { "description": "No content" @@ -6484,14 +6979,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": null, + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "apps\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -6527,33 +7022,33 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/apps\/{appId}\/team": { - "patch": { - "summary": "Update Team", - "operationId": "appsUpdateTeam", + "\/apps\/{appId}\/installations\/{installationId}\/tokens": { + "post": { + "summary": "Create Installation Token", + "operationId": "appsCreateInstallationToken", "tags": [ "apps" ], - "description": "Transfer an application to another team by its unique ID.", + "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.", "responses": { - "200": { - "description": "App", + "201": { + "description": "OAuth2 Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/oauth2Token" } } } @@ -6561,15 +7056,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", - "group": null, + "method": "createInstallationToken", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/create-installation-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.write", + "apps.tokens.write" + ], "platforms": [ "console", "client", @@ -6599,53 +7097,51 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer application to.", - "x-example": "" - } - }, - "required": [ - "teamId" - ] - } - } - } - } + ] } }, - "\/apps\/{appId}\/tokens": { - "delete": { - "summary": "Delete Tokens", - "operationId": "appsDeleteTokens", + "\/apps\/{appId}\/keys": { + "get": { + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "Revoke all tokens for an application by its unique ID.", + "description": "List app keys for an application.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "App keys list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKeyList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTokens", - "group": null, + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-tokens.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/list-keys.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -6653,9 +7149,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [] } @@ -6678,26 +7171,47 @@ "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] - } - }, - "\/avatars\/browsers\/{code}": { - "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + }, + "post": { + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "AppKey", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -6705,15 +7219,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", - "group": null, + "method": "createKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/create-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -6721,10 +7235,8 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ @@ -6732,109 +7244,38 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Browser Code.", + "name": "appId", + "description": "Application unique ID.", "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)" - ] + "x-example": "" }, "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 keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "in": "query" } ] } }, - "\/avatars\/credit-cards\/{code}": { + "\/apps\/{appId}\/keys\/{keyId}": { "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + "summary": "Get App Key", + "operationId": "appsGetKey", "tags": [ - "avatars" + "apps" ], - "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", + "description": "Get an app key by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppKey", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -6842,15 +7283,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", - "group": null, + "method": "getKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-key.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -6858,10 +7299,8 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ @@ -6869,115 +7308,116 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] + "x-example": "" }, "in": "path" }, { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "string", + "x-example": "" }, - "in": "query" - }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete App Key", + "operationId": "appsDeleteKey", + "tags": [ + "apps" + ], + "description": "Delete an app key by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "cookies": false, + "type": "", + "demo": "apps\/delete-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + "\/apps\/{appId}\/labels": { + "put": { + "summary": "Update Application Labels", + "operationId": "appsUpdateLabels", "tags": [ - "avatars" + "apps" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", "responses": { "200": { - "description": "Image", + "description": "App", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/app" } } } @@ -6985,68 +7425,82 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", - "group": null, + "method": "updateLabels", + "group": "apps", "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/update-labels.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" + "x-example": "" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } } }, - "\/avatars\/flags\/{code}": { + "\/apps\/{appId}\/secrets": { "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", + "summary": "List Secrets", + "operationId": "appsListSecrets", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "description": "List client secrets for an application.", "responses": { "200": { - "description": "Image", + "description": "App secrets list", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecretList" } } } @@ -7054,15 +7508,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFlag", - "group": null, + "method": "listSecrets", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -7070,10 +7524,8 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ @@ -7081,471 +7533,60 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] + "x-example": "" }, "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.", + "name": "queries", + "description": "Array of query strings generated using the Query 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": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "tags": [ - "avatars" + "apps" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "description": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "AppSecretPlaintext", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecretPlaintext" } } } @@ -7553,15 +7594,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getImage", - "group": null, + "method": "createSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -7569,10 +7610,8 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ @@ -7580,57 +7619,316 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "url", - "description": "Image URL which you want to crop.", + "name": "appId", + "description": "Application unique ID.", "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 + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/initials": { + "\/apps\/{appId}\/secrets\/{secretId}": { "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", - "tags": [ + "summary": "Get Secret", + "operationId": "appsGetSecret", + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecret" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer application to.", + "x-example": "" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTokens", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "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", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image", @@ -7646,11 +7944,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInitials", + "method": "getBrowser", "group": null, "cookies": false, "type": "location", - "demo": "avatars\/get-initials.md", + "demo": "avatars\/get-browser.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -7662,7 +7960,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [], "ImpersonateUserId": [] @@ -7679,15 +7977,47 @@ ], "parameters": [ { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, + "name": "code", + "description": "Browser Code.", + "required": true, "schema": { "type": "string", - "x-example": "", - "default": "" + "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": "query" + "in": "path" }, { "name": "width", @@ -7697,7 +8027,7 @@ "type": "integer", "format": "int32", "x-example": 0, - "default": 500 + "default": 100 }, "in": "query" }, @@ -7709,31 +8039,33 @@ "type": "integer", "format": "int32", "x-example": 0, - "default": 500 + "default": 100 }, "in": "query" }, { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", "required": false, "schema": { - "type": "string", - "default": "" + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 }, "in": "query" } ] } }, - "\/avatars\/qr": { + "\/avatars\/credit-cards\/{code}": { "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", "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", + "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", @@ -7749,11 +8081,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQR", + "method": "getCreditCard", "group": null, "cookies": false, "type": "location", - "demo": "avatars\/get-qr.md", + "demo": "avatars\/get-credit-card.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -7765,7 +8097,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [], "ImpersonateUserId": [] @@ -7782,66 +8114,106 @@ ], "parameters": [ { - "name": "text", - "description": "Plain text to be converted to QR code image.", + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] }, - "in": "query" + "in": "path" }, { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": 1, - "default": 400 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "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": 1 + "default": 100 }, "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.", + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": false + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 }, "in": "query" } ] } }, - "\/avatars\/screenshots": { + "\/avatars\/favicon": { "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", "tags": [ "avatars" ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", "responses": { "200": { "description": "Image", "content": { - "image\/png": { + "image\/*": { "schema": { "type": "string", "format": "binary" @@ -7852,12 +8224,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getScreenshot", + "method": "getFavicon", "group": null, "cookies": false, "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "avatars.read", @@ -7868,7 +8240,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [], "ImpersonateUserId": [] @@ -7886,7 +8258,7 @@ "parameters": [ { "name": "url", - "description": "Website URL which you want to capture.", + "description": "Website URL which you want to fetch the favicon from.", "required": true, "schema": { "type": "string", @@ -7894,64 +8266,931 @@ "x-example": "https:\/\/example.com" }, "in": "query" - }, + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "schema": { - "type": "object", - "default": [], - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}" + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] }, - "in": "query" + "in": "path" }, { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": "1920", - "default": 1280 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": "1080", - "default": 720 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", "required": false, "schema": { - "type": "number", - "format": "float", - "x-example": "2", - "default": 1 + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 }, "in": "query" - }, + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, "schema": { "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" + "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", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500 + }, + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "schema": { + "type": "string", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/avatars\/qr": { + "get": { + "summary": "Get QR code", + "operationId": "avatarsGetQR", + "tags": [ + "avatars" + ], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 400 + }, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1 + }, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "default": [], + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}" + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "2", + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" ], "x-enum-name": "BrowserTheme", "x-enum-keys": [ @@ -9747,7 +10986,7 @@ "tags": [ "backups" ], - "description": "Create and trigger a new restoration for a backup on a project.", + "description": "Create and trigger a new restoration for a backup on a project.\n\nFor a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.\n\nThe restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.\n\nTo list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.\n\nWhen restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.\n", "responses": { "201": { "description": "Restoration", @@ -9828,7 +11067,7 @@ }, "newResourceId": { "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.", + "description": "Destination resource ID. Omit to restore the archived resource in place, or pass a different ID to restore alongside it as a new resource. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "default": "", "x-example": "", "x-appwrite": { @@ -9979,21 +11218,88 @@ ] } }, - "\/compute\/databases": { - "get": { - "summary": "List dedicated databases.", - "operationId": "computeListDatabases", + "\/console\/assistant": { + "post": { + "summary": "Create assistant query", + "operationId": "assistantChat", "tags": [ - "compute" + "assistant" ], - "description": "List all dedicated databases. Results support pagination.", + "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", "responses": { "200": { - "description": "Dedicated databases list", + "description": "Text", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "chat", + "group": "console", + "cookies": false, + "type": "", + "demo": "assistant\/chat.md", + "rate-limit": 15, + "rate-time": 3600, + "rate-key": "userId:{userId}", + "scope": "assistant.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", + "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": "" + } + }, + "required": [ + "prompt" + ] + } + } + } + } + } + }, + "\/console\/campaigns\/{campaignId}": { + "get": { + "summary": "Get campaign details", + "operationId": "consoleGetCampaign", + "tags": [ + "console" + ], + "description": "Receive the details of a campaign using its ID.", + "responses": { + "201": { + "description": "Campaign", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseList" + "$ref": "#\/components\/schemas\/campaign" } } } @@ -10001,20 +11307,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabases", - "group": "databases", + "method": "getCampaign", + "group": null, "cookies": false, "type": "", - "demo": "compute\/list-databases.md", + "demo": "console\/get-campaign.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "public", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-campaign.md", "auth": { "Project": [] } @@ -10026,34 +11333,33 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings.", - "required": false, + "name": "campaignId", + "description": "ID of the campaign", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - }, - "post": { - "summary": "Create a dedicated database.", - "operationId": "computeCreateDatabase", + } + }, + "\/console\/coupons\/{couponId}": { + "get": { + "summary": "Get coupon details", + "operationId": "consoleGetCoupon", "tags": [ - "compute" + "console" ], - "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "description": "Get the details of a coupon using it's coupon ID.", "responses": { "201": { - "description": "DedicatedDatabase", + "description": "Coupon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/coupon" } } } @@ -10061,20 +11367,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatabase", - "group": "databases", + "method": "getCoupon", + "group": null, "cookies": false, "type": "", - "demo": "compute\/create-database.md", - "rate-limit": 0, + "demo": "console\/get-coupon.md", + "rate-limit": 50, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "public", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-coupon.md", "auth": { "Project": [] } @@ -10084,228 +11391,120 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "databaseId": { - "type": "string", - "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Database display name. Max length: 128 chars.", - "x-example": "" - }, - "database": { - "type": "string", - "description": "Physical database\/catalog name. Defaults to databaseId.", - "default": "", - "x-example": "" - }, - "engine": { - "type": "string", - "description": "Database engine: postgres, mysql, mariadb, or mongodb.", - "default": "postgres", - "x-example": "postgres" - }, - "version": { - "type": "string", - "description": "Database engine version. Defaults to latest for selected engine.", - "x-example": "17", - "x-nullable": true - }, - "specification": { - "type": "string", - "description": "Specification identifier.", - "default": "s-1vcpu-1gb", - "x-example": "" - }, - "backend": { - "type": "string", - "description": "Database backend provider: prisma, or edge.", - "default": "edge", - "x-example": "prisma" - }, - "cpu": { - "type": "integer", - "description": "CPU in millicores (125-16000).", - "default": 1000, - "x-example": 125, - "format": "int32" - }, - "memory": { - "type": "integer", - "description": "Memory in MB to allocate (128-65536).", - "default": 1024, - "x-example": 128, - "format": "int32" - }, - "storage": { - "type": "integer", - "description": "Storage in GB to allocate (1-16384).", - "default": 10, - "x-example": 1, - "format": "int32" - }, - "storageClass": { - "type": "string", - "description": "Storage class. Allowed values: ssd. DigitalOcean exposes a single block-storage class, so only 'ssd' is offered today.", - "default": "ssd", - "x-example": "ssd" - }, - "storageMaxGb": { - "type": "integer", - "description": "Maximum storage limit in GB. 0 uses system default.", - "default": 0, - "x-example": 0, - "format": "int32" - }, - "replicas": { - "type": "integer", - "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", - "default": 0, - "x-example": 0, - "format": "int32" - }, - "highAvailabilitySyncMode": { - "type": "string", - "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", - "x-example": "async", - "x-nullable": true - }, - "networkMaxConnections": { - "type": "integer", - "description": "Maximum concurrent connections.", - "default": 100, - "x-example": 10, - "format": "int32" - }, - "networkIdleTimeoutSeconds": { - "type": "integer", - "description": "Connection idle timeout in seconds.", - "default": 900, - "x-example": 60, - "format": "int32" - }, - "networkIPAllowlist": { - "type": "array", - "description": "IP addresses\/CIDR ranges allowed to connect.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "idleTimeoutMinutes": { - "type": "integer", - "description": "Minutes of inactivity before container scales to zero.", - "default": 15, - "x-example": 5, - "format": "int32" - }, - "backupEnabled": { - "type": "boolean", - "description": "Enable automatic backups.", - "default": true, - "x-example": false - }, - "backupPitr": { - "type": "boolean", - "description": "Enable point-in-time recovery.", - "default": true, - "x-example": false - }, - "backupCron": { - "type": "string", - "description": "Backup schedule in cron format.", - "default": "0 3 * * *", - "x-example": null - }, - "backupRetentionDays": { - "type": "integer", - "description": "Number of days to retain backups.", - "default": 14, - "x-example": 1, - "format": "int32" - }, - "pitrRetentionDays": { - "type": "integer", - "description": "Number of days to retain PITR data.", - "default": 7, - "x-example": 1, - "format": "int32" - }, - "storageAutoscaling": { - "type": "boolean", - "description": "Enable automatic storage expansion when usage exceeds threshold.", - "default": false, - "x-example": false - }, - "storageAutoscalingThresholdPercent": { - "type": "integer", - "description": "Storage usage percentage (50-95) that triggers automatic expansion.", - "default": 85, - "x-example": 50, - "format": "int32" - }, - "storageAutoscalingMaxGb": { - "type": "integer", - "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", - "default": 0, - "x-example": 0, - "format": "int32" - }, - "metricsEnabled": { - "type": "boolean", - "description": "Enable metrics collection. Enabled by default; pass false to opt out.", - "default": true, - "x-example": false - }, - "poolerEnabled": { - "type": "boolean", - "description": "Enable connection pooler on provision.", - "default": true, - "x-example": false - }, - "api": { - "type": "string", - "description": "Product API that owns this database: compute (raw, direct-access), tablesdb, documentsdb, or vectorsdb. tablesdb\/documentsdb\/vectorsdb computes are reached only through their product APIs.", - "default": "compute", - "x-example": "compute" - } - }, - "required": [ - "databaseId", - "name" - ] + "parameters": [ + { + "name": "couponId", + "description": "ID of the coupon", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/console\/databases": { + "get": { + "summary": "List databases", + "operationId": "consoleListDatabases", + "tags": [ + "console" + ], + "description": "Get a list of all the project's databases. You can use the query params to filter your results. This returns every database across all types and product APIs in a single call.\n", + "responses": { + "200": { + "description": "Databases List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseList" + } } } } - } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDatabases", + "group": null, + "cookies": false, + "type": "", + "demo": "console\/list-databases.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/list-databases.md", + "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", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] } }, - "\/compute\/databases\/specifications": { + "\/console\/oauth2-providers": { "get": { - "summary": "List dedicated database specifications.", - "operationId": "computeListDatabaseSpecifications", + "summary": "List OAuth2 providers", + "operationId": "consoleListOAuth2Providers", "tags": [ - "compute" + "console" ], - "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", + "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", "responses": { "200": { - "description": "SpecificationList", + "description": "Console OAuth2 Providers List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderList" } } } @@ -10313,15 +11512,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseSpecifications", - "group": "databases", + "method": "listOAuth2Providers", + "group": "console", "cookies": false, "type": "", - "demo": "compute\/list-database-specifications.md", + "demo": "console\/list-o-auth-2-providers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "public", "platforms": [ "console" ], @@ -10338,21 +11537,21 @@ ] } }, - "\/compute\/databases\/{databaseId}": { + "\/console\/plans": { "get": { - "summary": "Get dedicated database.", - "operationId": "computeGetDatabase", + "summary": "Get plans", + "operationId": "consoleGetPlans", "tags": [ - "compute" + "console" ], - "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "description": "Return a list of all available plans.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "Billing plan list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/billingPlanList" } } } @@ -10360,20 +11559,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDatabase", - "group": "databases", + "method": "getPlans", + "group": null, "cookies": false, "type": "", - "demo": "compute\/get-database.md", + "demo": "console\/get-plans.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-plans.md", "auth": { "Project": [] } @@ -10385,31 +11585,43 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "platform", + "description": "Platform type", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "appwrite", + "enum": [ + "appwrite", + "imagine" + ], + "x-enum-name": "Platform", + "x-enum-keys": [ + "appwrite", + "imagine" + ], + "default": "appwrite" }, - "in": "path" + "in": "query" } ] - }, - "patch": { - "summary": "Update dedicated database.", - "operationId": "computeUpdateDatabase", + } + }, + "\/console\/plans\/{planId}": { + "get": { + "summary": "Get plan", + "operationId": "consoleGetPlan", "tags": [ - "compute" + "console" ], - "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Resource changes (cpu, memory) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", + "description": "Get the details of a plan using its plan ID.", "responses": { "200": { - "description": "DedicatedDatabase", + "description": "billingPlan", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/billingPlan" } } } @@ -10417,20 +11629,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDatabase", - "group": "databases", + "method": "getPlan", + "group": null, "cookies": false, "type": "", - "demo": "compute\/update-database.md", + "demo": "console\/get-plan.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-plan.md", "auth": { "Project": [] } @@ -10442,261 +11655,55 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "planId", + "description": "Plan id", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } + ] + } + }, + "\/console\/postgres-extensions": { + "get": { + "summary": "List Postgres extensions", + "operationId": "consoleListPostgresExtensions", + "tags": [ + "console" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Database display name.", - "x-example": "", - "x-nullable": true - }, - "status": { - "type": "string", - "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", - "x-example": "ready", - "x-nullable": true - }, - "specification": { - "type": "string", - "description": "Specification. Changes cpu, memory, and node pool based on specification config.", - "x-example": "", - "x-nullable": true - }, - "cpu": { - "type": "number", - "description": "CPU cores to allocate (125-16000).", - "x-example": 125, - "format": "float", - "x-nullable": true - }, - "memory": { - "type": "integer", - "description": "Memory in MB to allocate (128-65536).", - "x-example": 128, - "format": "int32", - "x-nullable": true - }, - "storage": { - "type": "integer", - "description": "Storage in GB to allocate (1-16384).", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "storageClass": { - "type": "string", - "description": "Storage class. Allowed values: ssd.", - "x-example": "ssd", - "x-nullable": true - }, - "replicas": { - "type": "integer", - "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", - "x-example": 0, - "format": "int32", - "x-nullable": true - }, - "highAvailabilitySyncMode": { - "type": "string", - "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", - "x-example": "async", - "x-nullable": true - }, - "networkMaxConnections": { - "type": "integer", - "description": "Maximum concurrent connections.", - "x-example": 10, - "format": "int32", - "x-nullable": true - }, - "networkIdleTimeoutSeconds": { - "type": "integer", - "description": "Connection idle timeout in seconds (60-86400).", - "x-example": 60, - "format": "int32", - "x-nullable": true - }, - "networkIPAllowlist": { - "type": "array", - "description": "IP addresses\/CIDR ranges allowed to connect.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "idleTimeoutMinutes": { - "type": "integer", - "description": "Minutes before container scales to zero.", - "x-example": 5, - "format": "int32", - "x-nullable": true - }, - "backupEnabled": { - "type": "boolean", - "description": "Enable automatic backups.", - "x-example": false, - "x-nullable": true - }, - "backupPitr": { - "type": "boolean", - "description": "Enable point-in-time recovery.", - "x-example": false, - "x-nullable": true - }, - "backupCron": { - "type": "string", - "description": "Backup schedule in cron format.", - "x-example": null, - "x-nullable": true - }, - "backupRetentionDays": { - "type": "integer", - "description": "Days to retain backups.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "pitrRetentionDays": { - "type": "integer", - "description": "Days to retain PITR data.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "storageAutoscaling": { - "type": "boolean", - "description": "Enable automatic storage expansion when usage exceeds threshold.", - "x-example": false, - "x-nullable": true - }, - "storageAutoscalingThresholdPercent": { - "type": "integer", - "description": "Storage usage percentage (50-95) that triggers automatic expansion.", - "x-example": 50, - "format": "int32", - "x-nullable": true - }, - "storageAutoscalingMaxGb": { - "type": "integer", - "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", - "x-example": 0, - "format": "int32", - "x-nullable": true - }, - "poolerEnabled": { - "type": "boolean", - "description": "Attach or detach the connection pooler sidecar. Set to true to add the sidecar (no-op if already attached) or false to remove it.", - "x-example": false, - "x-nullable": true - }, - "metricsEnabled": { - "type": "boolean", - "description": "Enable or disable the metrics-agent sidecar.", - "x-example": false, - "x-nullable": true - }, - "metricsTraceSampleRate": { - "type": "number", - "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "metricsSlowQueryLogThresholdMs": { - "type": "integer", - "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", - "x-example": 0, - "format": "int32", - "x-nullable": true - }, - "sqlApiEnabled": { - "type": "boolean", - "description": "Enable the SQL API sidecar for this database.", - "x-example": false, - "x-nullable": true - }, - "sqlApiAllowedStatements": { - "type": "array", - "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "sqlApiMaxRows": { - "type": "integer", - "description": "Maximum rows returned per SQL API execution (1-1000000).", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "sqlApiMaxBytes": { - "type": "integer", - "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", - "x-example": 1024, - "format": "int32", - "x-nullable": true - }, - "sqlApiTimeoutSeconds": { - "type": "integer", - "description": "Per-call SQL API execution timeout in seconds (1-300).", - "x-example": 1, - "format": "int32", - "x-nullable": true - } + "description": "Get the catalog of Postgres extensions that can be installed on a dedicated Postgres database.\n", + "responses": { + "200": { + "description": "Postgres extensions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/postgresExtensionList" } } } } - } - }, - "delete": { - "summary": "Delete dedicated database.", - "operationId": "computeDeleteDatabase", - "tags": [ - "compute" - ], - "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", - "responses": { - "204": { - "description": "No content" - } }, "deprecated": false, "x-appwrite": { - "method": "deleteDatabase", - "group": "databases", + "method": "listPostgresExtensions", + "group": null, "cookies": false, "type": "", - "demo": "compute\/delete-database.md", - "rate-limit": 0, + "demo": "console\/list-postgres-extensions.md", + "rate-limit": 100, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "rate-key": "ip:{ip}", + "scope": "public", "platforms": [ "console" ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/list-postgres-extensions.md", "auth": { "Project": [] } @@ -10705,36 +11712,24 @@ { "Project": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } ] } }, - "\/compute\/databases\/{databaseId}\/backups": { + "\/console\/programs\/{programId}": { "get": { - "summary": "List database backups.", - "operationId": "computeListDatabaseBackups", + "summary": "Get program details", + "operationId": "consoleGetProgram", "tags": [ - "compute" + "console" ], - "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "description": "Receive the details of a program using its ID.", "responses": { - "200": { - "description": "BackupList", + "201": { + "description": "Program", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + "$ref": "#\/components\/schemas\/program" } } } @@ -10742,20 +11737,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseBackups", - "group": "databases", + "method": "getProgram", + "group": null, "cookies": false, "type": "", - "demo": "compute\/list-database-backups.md", + "demo": "console\/get-program.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-program.md", "auth": { "Project": [] } @@ -10767,44 +11763,33 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "programId", + "description": "ID of the program", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" } ] - }, + } + }, + "\/console\/programs\/{programId}\/memberships": { "post": { - "summary": "Create a database backup.", - "operationId": "computeCreateDatabaseBackup", + "summary": "Create program membership", + "operationId": "consoleCreateProgramMembership", "tags": [ - "compute" + "console" ], - "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", + "description": "Create a new membership for an account to a program.", "responses": { - "202": { - "description": "Backup", + "200": { + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + "$ref": "#\/components\/schemas\/organization" } } } @@ -10812,20 +11797,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseBackup", - "group": "databases", + "method": "createProgramMembership", + "group": null, "cookies": false, "type": "", - "demo": "compute\/create-database-backup.md", - "rate-limit": 0, + "demo": "console\/create-program-membership.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "teams.write", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/create-program-membership.md", "auth": { "Project": [] } @@ -10837,50 +11823,33 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "programId", + "description": "ID of the program", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Backup type: full or incremental.", - "default": "full", - "x-example": "full" - } - } - } - } - } - } + ] } }, - "\/compute\/databases\/{databaseId}\/backups\/policies": { + "\/console\/regions": { "get": { - "summary": "List database backup policies.", - "operationId": "computeListDatabaseBackupPolicies", + "summary": "List Regions", + "operationId": "consoleListRegions", "tags": [ - "compute" + "console" ], - "description": "List scheduled backup policies for a dedicated database.", + "description": "Get all available regions for the console.", "responses": { "200": { - "description": "Backup policy list", + "description": "Regions list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupPolicyList" + "$ref": "#\/components\/schemas\/consoleRegionList" } } } @@ -10888,20 +11857,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseBackupPolicies", - "group": "databases", + "method": "listRegions", + "group": null, "cookies": false, "type": "", - "demo": "compute\/list-database-backup-policies.md", + "demo": "console\/list-regions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/list-regions.md", "auth": { "Project": [] } @@ -10910,63 +11880,33 @@ { "Project": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } ] - }, - "post": { - "summary": "Create a database backup policy.", - "operationId": "computeCreateDatabaseBackupPolicy", + } + }, + "\/console\/resources": { + "get": { + "summary": "Check resource ID availability", + "operationId": "consoleGetResource", "tags": [ - "compute" + "console" ], - "description": "Create a scheduled backup policy for a dedicated database.", + "description": "Check if a resource ID is available.", "responses": { - "201": { - "description": "backup", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/backupPolicy" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseBackupPolicy", - "group": "databases", + "method": "getResource", + "group": null, "cookies": false, "type": "", - "demo": "compute\/create-database-backup-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "demo": "console\/get-resource.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.read", "platforms": [ "console" ], @@ -10983,86 +11923,50 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "value", + "description": "Resource value.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "policyId": { - "type": "string", - "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Policy name. Max length: 128 chars.", - "x-example": "" - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null - }, - "retention": { - "type": "integer", - "description": "Days to keep backups before deletion.", - "x-example": 1, - "format": "int32" - }, - "type": { - "type": "string", - "description": "Backup type: full or incremental.", - "default": "full", - "x-example": "full" - }, - "enabled": { - "type": "boolean", - "description": "Is policy enabled? When disabled, no backups will be taken.", - "default": true, - "x-example": false - } - }, - "required": [ - "policyId", - "name", - "schedule", - "retention" - ] - } - } + "in": "query" + }, + { + "name": "type", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "x-example": "rules", + "enum": [ + "rules" + ], + "x-enum-name": "ConsoleResourceType", + "x-enum-keys": [ + "rules" + ] + }, + "in": "query" } - } + ] } }, - "\/compute\/databases\/{databaseId}\/backups\/storage": { - "put": { - "summary": "Update database backup storage.", - "operationId": "computeUpdateDatabaseBackupStorage", + "\/console\/scopes\/organization": { + "get": { + "summary": "List organization scopes", + "operationId": "consoleListOrganizationScopes", "tags": [ - "compute" + "console" ], - "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", + "description": "List all scopes available for organization API keys, along with a description for each scope.", "responses": { "200": { - "description": "BackupStorageConfig", + "description": "Console Key Scopes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" + "$ref": "#\/components\/schemas\/consoleKeyScopeList" } } } @@ -11070,15 +11974,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDatabaseBackupStorage", - "group": "databases", + "method": "listOrganizationScopes", + "group": "console", "cookies": false, "type": "", - "demo": "compute\/update-database-backup-storage.md", + "demo": "console\/list-organization-scopes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "public", "platforms": [ "console" ], @@ -11092,91 +11996,24 @@ { "Project": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", - "x-example": "s3" - }, - "bucket": { - "type": "string", - "description": "Storage bucket or container name.", - "x-example": "" - }, - "region": { - "type": "string", - "description": "Storage region.", - "default": "", - "x-example": "" - }, - "prefix": { - "type": "string", - "description": "Object key prefix for backups.", - "default": "backups\/", - "x-example": "" - }, - "endpoint": { - "type": "string", - "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", - "default": "", - "x-example": "" - }, - "accessKey": { - "type": "string", - "description": "Access key or client ID for authentication.", - "x-example": "" - }, - "secretKey": { - "type": "string", - "description": "Secret key or service account JSON for authentication.", - "x-example": "" - } - }, - "required": [ - "provider", - "bucket", - "accessKey", - "secretKey" - ] - } - } - } - } + ] } }, - "\/compute\/databases\/{databaseId}\/backups\/{backupId}": { + "\/console\/scopes\/project": { "get": { - "summary": "Get a database backup.", - "operationId": "computeGetDatabaseBackup", + "summary": "List project scopes", + "operationId": "consoleListProjectScopes", "tags": [ - "compute" + "console" ], - "description": "Get details of a specific database backup including its status, size, and timestamps.", + "description": "List all scopes available for project API keys, along with a description for each scope.", "responses": { "200": { - "description": "Backup", + "description": "Console Key Scopes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + "$ref": "#\/components\/schemas\/consoleKeyScopeList" } } } @@ -11184,15 +12021,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseBackup", - "group": "databases", + "method": "listProjectScopes", + "group": "console", "cookies": false, "type": "", - "demo": "compute\/get-database-backup.md", + "demo": "console\/list-project-scopes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "public", "platforms": [ "console" ], @@ -11206,166 +12043,24 @@ { "Project": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "backupId", - "description": "Backup ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete a database backup.", - "operationId": "computeDeleteDatabaseBackup", - "tags": [ - "compute" - ], - "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDatabaseBackup", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/delete-database-backup.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "produces": [ - "application\/json" - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "backupId", - "description": "Backup ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } ] } }, - "\/compute\/databases\/{databaseId}\/branches": { - "get": { - "summary": "List database branches.", - "operationId": "computeListDatabaseBranches", - "tags": [ - "compute" - ], - "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", - "responses": { - "200": { - "description": "BranchList", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDatabaseBranches", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/list-database-branches.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, + "\/console\/sources": { "post": { - "summary": "Create a database branch.", - "operationId": "computeCreateDatabaseBranch", + "summary": "Create source", + "operationId": "consoleCreateSource", "tags": [ - "compute" + "console" ], - "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "description": "Create a new source.", "responses": { - "202": { - "description": "DedicatedDatabase", + "201": { + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/any" } } } @@ -11373,20 +12068,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseBranch", - "group": "databases", + "method": "createSource", + "group": null, "cookies": false, "type": "", - "demo": "compute\/create-database-branch.md", - "rate-limit": 0, + "demo": "console\/create-source.md", + "rate-limit": 50, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "public", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/create-source.md", "auth": { "Project": [] } @@ -11396,39 +12092,42 @@ "Project": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "branchId": { + "ref": { "type": "string", - "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Ref param", + "x-example": "", + "x-nullable": true }, - "ttl": { - "type": "integer", - "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", - "default": 86400, - "x-example": 300, - "format": "int32" + "referrer": { + "type": "string", + "description": "Referrer", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "utmSource": { + "type": "string", + "description": "Utm source", + "x-example": "", + "x-nullable": true + }, + "utmCampaign": { + "type": "string", + "description": "Utm campaign", + "x-example": "", + "x-nullable": true + }, + "utmMedium": { + "type": "string", + "description": "Utm medium", + "x-example": "", + "x-nullable": true } } } @@ -11437,21 +12136,21 @@ } } }, - "\/compute\/databases\/{databaseId}\/branches\/{branchId}": { - "delete": { - "summary": "Delete a database branch.", - "operationId": "computeDeleteDatabaseBranch", + "\/console\/suggestions\/columns": { + "get": { + "summary": "Get column suggestions with size limits for a table, using database context and an optional user provided context", + "operationId": "consoleSuggestColumns", "tags": [ - "compute" + "console" ], - "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", + "description": "Suggests column names and their size limits based on the provided table name. The API will also analyze other tables in the same database to provide context-aware suggestions, ensuring consistency across schema design. Users may optionally provide custom context to further refine the suggestions.", "responses": { - "202": { - "description": "DedicatedDatabase", + "200": { + "description": "Columns List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/columnList" } } } @@ -11459,20 +12158,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDatabaseBranch", - "group": "databases", + "method": "suggestColumns", + "group": null, "cookies": false, "type": "", - "demo": "compute\/delete-database-branch.md", - "rate-limit": 0, + "demo": "console\/suggest-columns.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-columns.md", "auth": { "Project": [] } @@ -11491,36 +12191,70 @@ "type": "string", "x-example": "" }, - "in": "path" + "in": "query" }, { - "name": "branchId", - "description": "Branch ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" + "in": "query" + }, + { + "name": "context", + "description": "Optional user provided context to refine suggestions.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "min", + "description": "Minimum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 3 + }, + "in": "query" + }, + { + "name": "max", + "description": "Maximum number of suggestions to generate.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 7 + }, + "in": "query" } ] } }, - "\/compute\/databases\/{databaseId}\/connections": { + "\/console\/suggestions\/indexes": { "get": { - "summary": "List database connections.", - "operationId": "computeListDatabaseConnections", + "summary": "Get index suggestions for table columns, using database context", + "operationId": "consoleSuggestIndexes", "tags": [ - "compute" + "console" ], - "description": "List all database connection users\/roles for a dedicated database.", + "description": "Suggests database indexes for table columns based on the provided table structure and existing columns. The API will also analyze the table's column types, names, and patterns to recommend optimal indexes that improve query performance for common database operations like filtering, sorting, and searching.", "responses": { "200": { - "description": "Dedicated database connections list", + "description": "Column Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseConnectionList" + "$ref": "#\/components\/schemas\/columnIndexList" } } } @@ -11528,12 +12262,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDatabaseConnections", - "group": "databases", + "method": "suggestIndexes", + "group": null, "cookies": false, "type": "", - "demo": "compute\/list-database-connections.md", - "rate-limit": 0, + "demo": "console\/suggest-indexes.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.read", @@ -11542,6 +12276,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-indexes.md", "auth": { "Project": [] } @@ -11560,173 +12295,60 @@ "type": "string", "x-example": "" }, - "in": "path" - } - ] - }, - "post": { - "summary": "Create a database connection user.", - "operationId": "computeCreateDatabaseConnection", - "tags": [ - "compute" - ], - "description": "Create a new database connection user\/role. Returns the connection details including the generated credentials.", - "responses": { - "201": { - "description": "Connection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseConnection" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ + "in": "query" + }, { - "name": "databaseId", - "description": "Database ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Connection username.", - "x-example": "" - }, - "role": { - "type": "string", - "description": "Connection role for the new user. Common values: readonly (read-only access), readwrite (full read and write access).", - "default": "readwrite", - "x-example": "" - } - }, - "required": [ - "username" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/connections\/{connectionId}": { - "delete": { - "summary": "Delete a database connection.", - "operationId": "computeDeleteDatabaseConnection", - "tags": [ - "compute" - ], - "description": "Delete a database connection user\/role. The connection will be terminated immediately.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDatabaseConnection", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/delete-database-connection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "produces": [ - "application\/json" - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ + "in": "query" + }, { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "min", + "description": "Minimum number of suggestions to generate.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 1 }, - "in": "path" + "in": "query" }, { - "name": "connectionId", - "description": "Connection ID.", - "required": true, + "name": "max", + "description": "Maximum number of suggestions to generate.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 4 }, - "in": "path" + "in": "query" } ] } }, - "\/compute\/databases\/{databaseId}\/credentials": { + "\/console\/suggestions\/queries": { "get": { - "summary": "Get database credentials.", - "operationId": "computeGetDatabaseCredentials", + "summary": "Get query suggestions for a list resource from free-text intent", + "operationId": "consoleSuggestQueries", "tags": [ - "compute" + "console" ], - "description": "Get connection credentials for a dedicated database. Returns the hostname, port, username, password, database name, and full connection string.", + "description": "Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` \u2014 for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.\n", "responses": { "200": { - "description": "Credentials", + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseCredentials" + "$ref": "#\/components\/schemas\/any" } } } @@ -11734,12 +12356,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDatabaseCredentials", - "group": "databases", + "method": "suggestQueries", + "group": null, "cookies": false, "type": "", - "demo": "compute\/get-database-credentials.md", - "rate-limit": 0, + "demo": "console\/suggest-queries.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.read", @@ -11748,6 +12370,7 @@ ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-queries.md", "auth": { "Project": [] } @@ -11759,401 +12382,256 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, - "patch": { - "summary": "Update database credentials.", - "operationId": "computeUpdateDatabaseCredentials", - "tags": [ - "compute" - ], - "description": "Rotate the primary credentials for a dedicated database. Generates a new password and updates the database. Previous credentials will stop working immediately.", - "responses": { - "200": { - "description": "Credentials", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseCredentials" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateDatabaseCredentials", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/update-database-credentials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", + "name": "resource", + "description": "Resource to generate queries for.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/executions": { - "post": { - "summary": "Execute a SQL statement against a dedicated database.", - "operationId": "computeCreateDatabaseExecution", - "tags": [ - "compute" - ], - "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", - "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseExecution", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" + "x-example": "activities", + "enum": [ + "activities", + "activityevents", + "archives", + "credits", + "dnsrecords", + "domains", + "invoices", + "paymentmethods", + "policies", + "projects", + "restorations", + "teamaggregations", + "teams", + "databases", + "tables", + "rows", + "schedules", + "platforms", + "keys", + "devkeys", + "webhooks", + "notifications", + "certificates", + "realtime", + "rules", + "installations", + "repositories", + "vcscomments", + "vcscommentlocks", + "reports", + "insights", + "users", + "cache", + "tokens", + "authenticators", + "challenges", + "sessions", + "identities", + "memberships", + "buckets", + "providers", + "messages", + "topics", + "subscribers", + "targets", + "presencelogs", + "companies", + "billingaddresses", + "billingaggregations", + "billingaggregationresources", + "billingteamprojectaggregations", + "billingteamaggregations_v2", + "billingteamaggregationresources", + "billinginvoices_v2", + "billingaddons", + "alerts", + "payments", + "billingdiscounts", + "sources", + "deals", + "blocks", + "threats", + "feedbacks", + "disputes", + "wafrules", + "sh_installations", + "migrationdatabases", + "migrationprojects", + "apps", + "appsecrets", + "appinstallations", + "appkeys", + "oauth2grants", + "oauth2consents", + "oauth2tokens", + "attributes", + "indexes", + "functions", + "sites", + "deployments", + "variables", + "migrations", + "resourcetokens", + "transactions", + "transactionlogs", + "stats", + "executions", + "dedicateddatabases", + "dedicateddatabaseconfigs", + "dedicateddatabaseruntimes", + "dedicateddatabaseoperations", + "dedicateddatabasebackups", + "dedicateddatabaserestorations", + "dedicateddatabasebranches" + ], + "x-enum-name": "QuerySuggestionResource", + "x-enum-keys": [ + "activities", + "activity_events", + "archives", + "credits", + "dns_records", + "domains", + "invoices", + "payment_methods", + "policies", + "projects", + "restorations", + "team_aggregations", + "teams", + "databases", + "tables", + "rows", + "schedules", + "platforms", + "keys", + "dev_keys", + "webhooks", + "notifications", + "certificates", + "realtime", + "rules", + "installations", + "repositories", + "vcs_comments", + "vcs_comment_locks", + "reports", + "insights", + "users", + "cache", + "tokens", + "authenticators", + "challenges", + "sessions", + "identities", + "memberships", + "buckets", + "providers", + "messages", + "topics", + "subscribers", + "targets", + "presence_logs", + "companies", + "billing_addresses", + "billing_aggregations", + "billing_aggregation_resources", + "billing_team_project_aggregations", + "billing_team_aggregations_v2", + "billing_team_aggregation_resources", + "billing_invoices_v2", + "billing_addons", + "alerts", + "payments", + "billing_discounts", + "sources", + "deals", + "blocks", + "threats", + "feedbacks", + "disputes", + "waf_rules", + "sh_installations", + "migration_databases", + "migration_projects", + "apps", + "app_secrets", + "app_installations", + "app_keys", + "oauth2_grants", + "oauth2_consents", + "oauth2_tokens", + "attributes", + "indexes", + "functions", + "sites", + "deployments", + "variables", + "migrations", + "resource_tokens", + "transactions", + "transaction_logs", + "stats", + "executions", + "dedicated_databases", + "dedicated_database_configs", + "dedicated_database_runtimes", + "dedicated_database_operations", + "dedicated_database_backups", + "dedicated_database_restorations", + "dedicated_database_branches" + ] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "sql": { - "type": "string", - "description": "SQL statement to execute. Exactly one statement per request.", - "x-example": "" - }, - "bindings": { - "type": "object", - "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "timeoutSeconds": { - "type": "integer", - "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "sql" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/explanation": { - "post": { - "summary": "Explain query execution plan.", - "operationId": "computeCreateDatabaseQueryExplanation", - "tags": [ - "compute" - ], - "description": "Run EXPLAIN on a query against a dedicated database. Available for SQL-compatible engines. Returns the query execution plan including scan types, estimated cost, and resource usage. Optionally run EXPLAIN ANALYZE to get actual execution statistics.", - "responses": { - "200": { - "description": "QueryExplanation", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseQueryExplanation" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseQueryExplanation", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-query-explanation.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ + "in": "query" + }, { - "name": "databaseId", - "description": "Database ID.", + "name": "input", + "description": "Natural language query intent used to generate filters\/sorting\/pagination.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "description": "Query to explain. Must be a valid query for the database engine.", - "x-example": "" - }, - "analyze": { - "type": "boolean", - "description": "Run EXPLAIN ANALYZE to get actual execution statistics. This executes the query.", - "default": false, - "x-example": false - } - }, - "required": [ - "query" - ] - } - } - } - } - } - }, - "\/compute\/databases\/{databaseId}\/extensions": { - "get": { - "summary": "List database extensions.", - "operationId": "computeListDatabaseExtensions", - "tags": [ - "compute" - ], - "description": "List installed and available extensions for a PostgreSQL database.", - "responses": { - "200": { - "description": "Extensions", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseExtensions" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listDatabaseExtensions", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/list-database-extensions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ + "in": "query" + }, { "name": "databaseId", - "description": "Database ID.", - "required": true, + "description": "Database ID. Required when resource is `tables` or `rows`.", + "required": false, "schema": { "type": "string", "x-example": "" }, - "in": "path" - } - ] - }, - "post": { - "summary": "Install a database extension.", - "operationId": "computeCreateDatabaseExtension", - "tags": [ - "compute" - ], - "description": "Install a database extension. Only available for PostgreSQL databases. The install runs asynchronously; poll the extensions list endpoint for status.", - "responses": { - "202": { - "description": "DedicatedDatabase", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDatabaseExtension", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/create-database-extension.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ + "in": "query" + }, { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "tableId", + "description": "Table ID. Required when resource is `rows`.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Extension name (e.g., pgvector, postgis, uuid-ossp).", - "x-example": "" - } - }, - "required": [ - "name" - ] - } - } + "in": "query" } - } + ] } }, - "\/compute\/databases\/{databaseId}\/extensions\/{extensionName}": { - "delete": { - "summary": "Uninstall a database extension.", - "operationId": "computeDeleteDatabaseExtension", + "\/console\/templates\/email\/{templateId}": { + "get": { + "summary": "Get email template", + "operationId": "consoleGetEmailTemplate", "tags": [ - "compute" + "console" ], - "description": "Uninstall a database extension from a PostgreSQL database. The uninstall runs asynchronously; poll the extensions list endpoint for status.", + "description": "Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.", "responses": { - "202": { - "description": "DedicatedDatabase", + "200": { + "description": "EmailTemplate", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/emailTemplate" } } } @@ -12161,15 +12639,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDatabaseExtension", - "group": "databases", + "method": "getEmailTemplate", + "group": null, "cookies": false, "type": "", - "demo": "compute\/delete-database-extension.md", + "demo": "console\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "public", "platforms": [ "console" ], @@ -12186,102 +12664,329 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "templateId", + "description": "Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "ProjectEmailTemplateId", + "x-enum-keys": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ] }, "in": "path" }, { - "name": "extensionName", - "description": "Extension name to uninstall.", - "required": true, + "name": "locale", + "description": "Template locale. If left empty, the fallback locale (en) will be used.", + "required": false, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - } - }, - "\/compute\/databases\/{databaseId}\/ha": { - "get": { - "summary": "Get HA status.", - "operationId": "computeGetDatabaseHAStatus", - "tags": [ - "compute" - ], - "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", - "responses": { - "200": { - "description": "HAStatus", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseHAStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDatabaseHAStatus", - "group": "databases", - "cookies": false, - "type": "", - "demo": "compute\/get-database-ha-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" + "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": "ProjectEmailTemplateLocale", + "x-enum-keys": [ + "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" + ] }, - "in": "path" + "in": "query" } ] } }, - "\/compute\/databases\/{databaseId}\/ha\/failovers": { - "post": { - "summary": "Trigger manual failover.", - "operationId": "computeCreateDatabaseFailover", + "\/console\/variables": { + "get": { + "summary": "Get variables", + "operationId": "consoleVariables", "tags": [ - "compute" + "console" ], - "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.", + "description": "Get all Environment Variables that are relevant for the console.", "responses": { - "202": { - "description": "DedicatedDatabase", + "200": { + "description": "Console Variables", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/consoleVariables" } } } @@ -12289,15 +12994,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatabaseFailover", - "group": "databases", + "method": "variables", + "group": "console", "cookies": false, "type": "", - "demo": "compute\/create-database-failover.md", + "demo": "console\/variables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "projects.read", "platforms": [ "console" ], @@ -12311,200 +13016,240 @@ { "Project": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetReplicaId": { - "type": "string", - "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/compute\/databases\/{databaseId}\/maintenance": { - "patch": { - "summary": "Update database maintenance window.", - "operationId": "computeUpdateDatabaseMaintenanceWindow", + "\/databases": { + "get": { + "summary": "List databases", + "operationId": "databasesList", "tags": [ - "compute" + "databases" ], - "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "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": "DedicatedDatabase", + "description": "Databases List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/databaseList" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateDatabaseMaintenanceWindow", + "method": "list", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/update-database-maintenance-window.md", + "demo": "databases\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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": "" + "x-example": "", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "day": { - "type": "string", - "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", - "x-example": "sun" - }, - "hourUtc": { - "type": "integer", - "description": "Hour in UTC (0-23) for maintenance window start.", - "x-example": 0, - "format": "int32" - } - }, - "required": [ - "day", - "hourUtc" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/compute\/databases\/{databaseId}\/migrations": { + ] + }, "post": { - "summary": "Migrate database between shared and dedicated.", - "operationId": "computeCreateDatabaseMigration", + "summary": "Create database", + "operationId": "databasesCreate", "tags": [ - "compute" + "databases" ], - "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", + "description": "Create a new Database.\n", "responses": { - "200": { - "description": "DedicatedDatabase", + "201": { + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createDatabaseMigration", + "method": "create", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/create-database-migration.md", + "demo": "databases\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { "schema": { "type": "object", "properties": { - "targetType": { + "databaseId": { "type": "string", - "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", - "x-example": "shared" + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "specification": { + "name": { "type": "string", - "description": "Target compute specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", - "x-example": "", - "x-nullable": true + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false } }, "required": [ - "targetType" + "databaseId", + "name" ] } } @@ -12512,175 +13257,281 @@ } } }, - "\/compute\/databases\/{databaseId}\/pitr": { + "\/databases\/transactions": { "get": { - "summary": "Get PITR recovery windows.", - "operationId": "computeGetDatabasePITRWindows", + "summary": "List transactions", + "operationId": "databasesListTransactions", "tags": [ - "compute" + "databases" ], - "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", + "description": "List transactions across all databases.", "responses": { "200": { - "description": "PITRWindows", + "description": "Transaction List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" + "$ref": "#\/components\/schemas\/transactionList" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getDatabasePITRWindows", - "group": "databases", + "method": "listTransactions", + "group": "transactions", "cookies": false, "type": "", - "demo": "compute\/get-database-pitr-windows.md", + "demo": "databases\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "rows.read", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTransactions" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTransaction" + }, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } } }, - "\/compute\/databases\/{databaseId}\/pooler": { + "\/databases\/transactions\/{transactionId}": { "get": { - "summary": "Get connection pooler configuration.", - "operationId": "computeGetDatabasePooler", + "summary": "Get transaction", + "operationId": "databasesGetTransaction", "tags": [ - "compute" + "databases" ], - "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", + "description": "Get a transaction by its unique ID.", "responses": { "200": { - "description": "PoolerConfig", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getDatabasePooler", - "group": "databases", + "method": "getTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "compute\/get-database-pooler.md", + "demo": "databases\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "rows.read", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTransaction" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] }, "patch": { - "summary": "Update connection pooler configuration.", - "operationId": "computeUpdateDatabasePooler", + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", "tags": [ - "compute" + "databases" ], - "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "PoolerConfig", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateDatabasePooler", - "group": "databases", + "method": "updateTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "compute\/update-database-pooler.md", + "demo": "databases\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTransaction" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -12691,217 +13542,148 @@ "schema": { "type": "object", "properties": { - "mode": { - "type": "string", - "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", - "x-example": "transaction", - "x-nullable": true - }, - "maxConnections": { - "type": "integer", - "description": "Maximum pooled connections.", - "x-example": 10, - "format": "int32", - "x-nullable": true - }, - "defaultPoolSize": { - "type": "integer", - "description": "Default pool size per user.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "readWriteSplitting": { + "commit": { "type": "boolean", - "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", - "x-example": false, - "x-nullable": true - }, - "poolerCpuRequest": { - "type": "string", - "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", - "x-example": "", - "x-nullable": true - }, - "poolerCpuLimit": { - "type": "string", - "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", - "x-example": "", - "x-nullable": true - }, - "poolerMemoryRequest": { - "type": "string", - "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", - "x-example": "", - "x-nullable": true + "description": "Commit transaction?", + "default": false, + "x-example": false }, - "poolerMemoryLimit": { - "type": "string", - "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", - "x-example": "", - "x-nullable": true + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false } } } } } } - } - }, - "\/compute\/databases\/{databaseId}\/restorations": { - "get": { - "summary": "List database restorations.", - "operationId": "computeListDatabaseRestorations", + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", "tags": [ - "compute" + "databases" ], - "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", + "description": "Delete a transaction by its unique ID.", "responses": { - "200": { - "description": "Dedicated database restorations list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listDatabaseRestorations", - "group": "databases", + "method": "deleteTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "compute\/list-database-restorations.md", + "demo": "databases\/delete-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTransaction" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "status", - "description": "Filter by restoration status.", - "required": false, - "schema": { - "type": "string", - "x-example": "pending" - }, - "in": "query" - }, - { - "name": "type", - "description": "Filter by restoration type.", - "required": false, - "schema": { - "type": "string", - "x-example": "backup" - }, - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of restorations to return.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25 - }, - "in": "query" - }, - { - "name": "offset", - "description": "Number of restorations to skip.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } ] - }, + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { "post": { - "summary": "Create a database restoration.", - "operationId": "computeCreateDatabaseRestoration", + "summary": "Create operations", + "operationId": "databasesCreateOperations", "tags": [ - "compute" + "databases" ], - "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", + "description": "Create multiple operations in a single transaction.", "responses": { - "202": { - "description": "Restoration", + "201": { + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createDatabaseRestoration", - "group": "databases", + "method": "createOperations", + "group": "transactions", "cookies": false, "type": "", - "demo": "compute\/create-database-restoration.md", + "demo": "databases\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createOperations" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -12912,24 +13694,14 @@ "schema": { "type": "object", "properties": { - "type": { - "type": "string", - "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", - "default": "backup", - "x-example": "backup" - }, - "backupId": { - "type": "string", - "description": "Backup ID to restore from (required for backup type).", - "x-example": "", - "x-nullable": true - }, - "targetTime": { - "type": "integer", - "description": "Target time for PITR as Unix timestamp (required for pitr type).", - "x-example": null, - "format": "int32", - "x-nullable": true + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } } } } @@ -12938,53 +13710,89 @@ } } }, - "\/compute\/databases\/{databaseId}\/restorations\/{restorationId}": { + "\/databases\/{databaseId}": { "get": { - "summary": "Get a database restoration.", - "operationId": "computeGetDatabaseRestoration", + "summary": "Get database", + "operationId": "databasesGet", "tags": [ - "compute" + "databases" ], - "description": "Get details of a specific database restoration including its status, type, and timestamps.", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "Restoration", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getDatabaseRestoration", + "method": "get", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-restoration.md", + "demo": "databases\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { "name": "databaseId", "description": "Database ID.", "required": true, @@ -12993,63 +13801,89 @@ "x-example": "" }, "in": "path" - }, - { - "name": "restorationId", - "description": "Restoration ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" } ] - } - }, - "\/compute\/databases\/{databaseId}\/slow-queries": { - "get": { - "summary": "List slow queries.", - "operationId": "computeListDatabaseQueries", + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", "tags": [ - "compute" + "databases" ], - "description": "List slow queries for a dedicated database. Returns queries that exceeded the specified threshold.", + "description": "Update a database by its unique ID.", "responses": { "200": { - "description": "Dedicated database slow queries list", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSlowQueryList" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listDatabaseQueries", + "method": "update", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/list-database-queries.md", + "demo": "databases\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -13062,77 +13896,101 @@ "x-example": "" }, "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of queries to return.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 100 - }, - "in": "query" - }, - { - "name": "thresholdMs", - "description": "Minimum query duration in milliseconds.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } - ] - } - }, - "\/compute\/databases\/{databaseId}\/status": { - "get": { - "summary": "Get database status.", - "operationId": "computeGetDatabaseStatus", - "tags": [ - "compute" ], - "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", - "responses": { - "200": { - "description": "Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/databaseStatus" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } } } } } + } + }, + "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" + } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getDatabaseStatus", + "method": "delete", "group": "databases", "cookies": false, "type": "", - "demo": "compute\/get-database-status.md", + "demo": "databases\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -13149,49 +14007,56 @@ ] } }, - "\/compute\/databases\/{databaseId}\/upgrades": { - "post": { - "summary": "Upgrade database version.", - "operationId": "computeCreateDatabaseUpgrade", + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", "tags": [ - "compute" + "databases" ], - "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", + "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": "DedicatedDatabase", + "description": "Collections List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dedicatedDatabase" + "$ref": "#\/components\/schemas\/collectionList" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createDatabaseUpgrade", - "group": "databases", + "method": "listCollections", + "group": "collections", "cookies": false, "type": "", - "demo": "compute\/create-database-upgrade.md", + "demo": "databases\/list-collections.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "collections.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -13204,73 +14069,105 @@ "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "targetVersion": { - "type": "string", - "description": "Target engine version to upgrade to.", - "x-example": "" - } - }, - "required": [ - "targetVersion" - ] - } - } - } - } - } - }, - "\/console\/assistant": { + ] + }, "post": { - "summary": "Create assistant query", - "operationId": "assistantChat", + "summary": "Create collections", + "operationId": "databasesCreateCollection", "tags": [ - "assistant" + "databases" ], - "description": "Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. ", + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "Text", + "201": { + "description": "Collection", "content": { - "text\/plain": { + "application\/json": { "schema": { - "type": "string" + "$ref": "#\/components\/schemas\/collection" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "chat", - "group": "console", + "method": "createCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "assistant\/chat.md", - "rate-limit": 15, + "demo": "databases\/create-collection.md", + "rate-limit": 0, "rate-time": 3600, - "rate-key": "userId:{userId}", - "scope": "assistant.read", + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -13279,14 +14176,62 @@ "schema": { "type": "object", "properties": { - "prompt": { + "collectionId": { "type": "string", - "description": "Prompt. A string containing questions asked to the AI assistant.", - "x-example": "" + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ - "prompt" + "collectionId", + "name" ] } } @@ -13294,678 +14239,1051 @@ } } }, - "\/console\/campaigns\/{campaignId}": { + "\/databases\/{databaseId}\/collections\/{collectionId}": { "get": { - "summary": "Get campaign details", - "operationId": "consoleGetCampaign", + "summary": "Get collection", + "operationId": "databasesGetCollection", "tags": [ - "console" + "databases" ], - "description": "Receive the details of a campaign using its ID.", + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", "responses": { - "201": { - "description": "Campaign", + "200": { + "description": "Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/campaign" + "$ref": "#\/components\/schemas\/collection" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getCampaign", - "group": null, + "method": "getCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "console\/get-campaign.md", + "demo": "databases\/get-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-campaign.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "campaignId", - "description": "ID of the campaign", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } ] - } - }, - "\/console\/coupons\/{couponId}": { - "get": { - "summary": "Get coupon details", - "operationId": "consoleGetCoupon", + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", "tags": [ - "console" + "databases" ], - "description": "Get the details of a coupon using it's coupon ID.", + "description": "Update a collection by its unique ID.", "responses": { - "201": { - "description": "Coupon", + "200": { + "description": "Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/coupon" + "$ref": "#\/components\/schemas\/collection" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getCoupon", - "group": null, + "method": "updateCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "console\/get-coupon.md", - "rate-limit": 50, + "demo": "databases\/update-collection.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-coupon.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "couponId", - "description": "ID of the coupon", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] - } - }, - "\/console\/oauth2-providers": { - "get": { - "summary": "List OAuth2 providers", - "operationId": "consoleListOAuth2Providers", - "tags": [ - "console" ], - "description": "List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.", - "responses": { - "200": { - "description": "Console OAuth2 Providers List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/consoleOAuth2ProviderList" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } } } } } + } + }, + "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" + } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listOAuth2Providers", - "group": "console", + "method": "deleteCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "console\/list-o-auth-2-providers.md", + "demo": "databases\/delete-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } }, - "\/console\/plans": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { "get": { - "summary": "Get plans", - "operationId": "consoleGetPlans", + "summary": "List attributes", + "operationId": "databasesListAttributes", "tags": [ - "console" + "databases" ], - "description": "Return a list of all available plans.", + "description": "List attributes in the collection.", "responses": { "200": { - "description": "Billing plan list", + "description": "Attributes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/billingPlanList" + "$ref": "#\/components\/schemas\/attributeList" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getPlans", - "group": null, + "method": "listAttributes", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/get-plans.md", + "demo": "databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "collections.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-plans.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "platform", - "description": "Platform type", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "appwrite", - "enum": [ - "appwrite", - "imagine" - ], - "x-enum-name": "Platform", - "x-enum-keys": [ - "appwrite", - "imagine" - ], - "default": "appwrite" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] } }, - "\/console\/plans\/{planId}": { - "get": { - "summary": "Get plan", - "operationId": "consoleGetPlan", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint": { + "post": { + "summary": "Create bigint attribute", + "operationId": "databasesCreateBigIntAttribute", "tags": [ - "console" + "databases" ], - "description": "Get the details of a plan using its plan ID.", + "description": "Create a bigint attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { - "200": { - "description": "billingPlan", + "202": { + "description": "AttributeBigInt", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/billingPlan" + "$ref": "#\/components\/schemas\/attributeBigint" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getPlan", - "group": null, + "method": "createBigIntAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/get-plan.md", + "demo": "databases\/create-big-int-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-bigint-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBigIntColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "planId", - "description": "Plan id", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/console\/programs\/{programId}": { - "get": { - "summary": "Get program details", - "operationId": "consoleGetProgram", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint\/{key}": { + "patch": { + "summary": "Update bigint attribute", + "operationId": "databasesUpdateBigIntAttribute", "tags": [ - "console" + "databases" ], - "description": "Receive the details of a program using its ID.", + "description": "Update a bigint attribute. Changing the `default` value will not update already existing documents.\n", "responses": { - "201": { - "description": "Program", + "200": { + "description": "AttributeBigInt", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/program" + "$ref": "#\/components\/schemas\/attributeBigint" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getProgram", - "group": null, + "method": "updateBigIntAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/get-program.md", + "demo": "databases\/update-big-int-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/get-program.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-bigint-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBigIntColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "programId", - "description": "ID of the program", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/console\/programs\/{programId}\/memberships": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { "post": { - "summary": "Create program membership", - "operationId": "consoleCreateProgramMembership", + "summary": "Create boolean attribute", + "operationId": "databasesCreateBooleanAttribute", "tags": [ - "console" + "databases" ], - "description": "Create a new membership for an account to a program.", + "description": "Create a boolean attribute.\n", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "AttributeBoolean", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/attributeBoolean" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createProgramMembership", - "group": null, + "method": "createBooleanAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/create-program-membership.md", - "rate-limit": 10, + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/create-program-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "programId", - "description": "ID of the program", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] - } - }, - "\/console\/regions": { - "get": { - "summary": "List Regions", - "operationId": "consoleListRegions", + ], + "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, + "x-nullable": true + }, + "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", "tags": [ - "console" + "databases" ], - "description": "Get all available regions for the console.", + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", "responses": { "200": { - "description": "Regions list", + "description": "AttributeBoolean", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/consoleRegionList" + "$ref": "#\/components\/schemas\/attributeBoolean" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listRegions", - "group": null, + "method": "updateBooleanAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/list-regions.md", + "demo": "databases\/update-boolean-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/list-regions.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ] - } - }, - "\/console\/resources": { - "get": { - "summary": "Check resource ID availability", - "operationId": "consoleGetResource", - "tags": [ - "console" - ], - "description": "Check if a resource ID is available.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getResource", - "group": null, - "cookies": false, - "type": "", - "demo": "console\/get-resource.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "value", - "description": "Resource value.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "type", - "description": "Resource type.", + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", - "x-example": "rules", - "enum": [ - "rules" - ], - "x-enum-name": "ConsoleResourceType", - "x-enum-keys": [ - "rules" - ] + "x-example": "" }, - "in": "query" + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/console\/scopes\/organization": { - "get": { - "summary": "List organization scopes", - "operationId": "consoleListOrganizationScopes", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", "tags": [ - "console" + "databases" ], - "description": "List all scopes available for organization API keys, along with a description for each scope.", + "description": "Create a date time attribute according to the ISO 8601 standard.", "responses": { - "200": { - "description": "Console Key Scopes List", + "202": { + "description": "AttributeDatetime", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/consoleKeyScopeList" + "$ref": "#\/components\/schemas\/attributeDatetime" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listOrganizationScopes", - "group": "console", + "method": "createDatetimeAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/list-organization-scopes.md", + "demo": "databases\/create-datetime-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/console\/scopes\/project": { - "get": { - "summary": "List project scopes", - "operationId": "consoleListProjectScopes", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "patch": { + "summary": "Update datetime attribute", + "operationId": "databasesUpdateDatetimeAttribute", "tags": [ - "console" + "databases" ], - "description": "List all scopes available for project API keys, along with a description for each scope.", + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", "responses": { "200": { - "description": "Console Key Scopes List", + "description": "AttributeDatetime", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/consoleKeyScopeList" + "$ref": "#\/components\/schemas\/attributeDatetime" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listProjectScopes", - "group": "console", + "method": "updateDatetimeAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/list-project-scopes.md", + "demo": "databases\/update-datetime-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } - ] - } - }, - "\/console\/sources": { - "post": { - "summary": "Create source", - "operationId": "consoleCreateSource", - "tags": [ - "console" ], - "description": "Create a new source.", - "responses": { - "201": { - "description": "Any", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/any" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSource", - "group": null, - "cookies": false, - "type": "", - "demo": "console\/create-source.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/create-source.md", - "auth": { - "Project": [] - } - }, - "security": [ + "parameters": [ { - "Project": [] + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -13974,88 +15292,85 @@ "schema": { "type": "object", "properties": { - "ref": { - "type": "string", - "description": "Ref param", - "x-example": "", - "x-nullable": true - }, - "referrer": { - "type": "string", - "description": "Referrer", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "utmSource": { - "type": "string", - "description": "Utm source", - "x-example": "", - "x-nullable": true + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false }, - "utmCampaign": { + "default": { "type": "string", - "description": "Utm campaign", - "x-example": "", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true }, - "utmMedium": { + "newKey": { "type": "string", - "description": "Utm medium", - "x-example": "", + "description": "New attribute key.", + "x-example": null, "x-nullable": true } - } + }, + "required": [ + "required", + "default" + ] } } } } } }, - "\/console\/suggestions\/columns": { - "get": { - "summary": "Get column suggestions with size limits for a table, using database context and an optional user provided context", - "operationId": "consoleSuggestColumns", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "post": { + "summary": "Create email attribute", + "operationId": "databasesCreateEmailAttribute", "tags": [ - "console" + "databases" ], - "description": "Suggests column names and their size limits based on the provided table name. The API will also analyze other tables in the same database to provide context-aware suggestions, ensuring consistency across schema design. Users may optionally provide custom context to further refine the suggestions.", + "description": "Create an email attribute.\n", "responses": { - "200": { - "description": "Columns List", + "202": { + "description": "AttributeEmail", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnList" + "$ref": "#\/components\/schemas\/attributeEmail" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "suggestColumns", - "group": null, + "method": "createEmailAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/suggest-columns.md", - "rate-limit": 10, + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -14067,99 +15382,109 @@ "type": "string", "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "context", - "description": "Optional user provided context to refine suggestions.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "min", - "description": "Minimum number of suggestions to generate.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 3 + "x-example": "" }, - "in": "query" - }, - { - "name": "max", - "description": "Maximum number of suggestions to generate.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 7 - }, - "in": "query" + "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", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/console\/suggestions\/indexes": { - "get": { - "summary": "Get index suggestions for table columns, using database context", - "operationId": "consoleSuggestIndexes", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "patch": { + "summary": "Update email attribute", + "operationId": "databasesUpdateEmailAttribute", "tags": [ - "console" + "databases" ], - "description": "Suggests database indexes for table columns based on the provided table structure and existing columns. The API will also analyze the table's column types, names, and patterns to recommend optimal indexes that improve query performance for common database operations like filtering, sorting, and searching.", + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "Column Indexes List", + "description": "AttributeEmail", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" + "$ref": "#\/components\/schemas\/attributeEmail" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "suggestIndexes", - "group": null, + "method": "updateEmailAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/suggest-indexes.md", - "rate-limit": 10, + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -14171,727 +15496,454 @@ "type": "string", "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "min", - "description": "Minimum number of suggestions to generate.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 1 + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "max", - "description": "Maximum number of suggestions to generate.", - "required": false, + "name": "key", + "description": "Attribute Key.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 4 + "type": "string" }, - "in": "query" + "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", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/console\/suggestions\/queries": { - "get": { - "summary": "Get query suggestions for a list resource from free-text intent", - "operationId": "consoleSuggestQueries", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", "tags": [ - "console" + "databases" ], - "description": "Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` \u2014 for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.\n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { - "200": { - "description": "Any", + "202": { + "description": "AttributeEnum", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/attributeEnum" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "suggestQueries", - "group": null, + "method": "createEnumAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/suggest-queries.md", - "rate-limit": 10, + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/console\/suggest-queries.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ - { - "name": "resource", - "description": "Resource to generate queries for.", - "required": true, - "schema": { - "type": "string", - "x-example": "activities", - "enum": [ - "activities", - "activityevents", - "archives", - "credits", - "dnsrecords", - "domains", - "invoices", - "paymentmethods", - "policies", - "projects", - "restorations", - "teamaggregations", - "teams", - "databases", - "tables", - "rows", - "schedules", - "platforms", - "keys", - "devkeys", - "webhooks", - "certificates", - "realtime", - "rules", - "installations", - "repositories", - "vcscomments", - "vcscommentlocks", - "reports", - "insights", - "users", - "cache", - "tokens", - "authenticators", - "challenges", - "sessions", - "identities", - "memberships", - "buckets", - "providers", - "messages", - "topics", - "subscribers", - "targets", - "presencelogs", - "companies", - "billingaddresses", - "billingaggregations", - "billingaggregationresources", - "billingteamprojectaggregations", - "billingteamaggregations_v2", - "billingteamaggregationresources", - "billinginvoices_v2", - "billingaddons", - "alerts", - "payments", - "billingdiscounts", - "sources", - "deals", - "blocks", - "threats", - "feedbacks", - "disputes", - "sh_installations", - "apps", - "appsecrets", - "oauth2grants", - "attributes", - "indexes", - "functions", - "sites", - "deployments", - "executions", - "variables", - "migrations", - "resourcetokens", - "transactions", - "transactionlogs", - "stats", - "dedicateddatabases", - "dedicateddatabaseconfigs", - "dedicateddatabaseruntimes", - "dedicateddatabaseoperations", - "dedicateddatabasebackups", - "dedicateddatabaserestorations" - ], - "x-enum-name": "QuerySuggestionResource", - "x-enum-keys": [ - "activities", - "activity_events", - "archives", - "credits", - "dns_records", - "domains", - "invoices", - "payment_methods", - "policies", - "projects", - "restorations", - "team_aggregations", - "teams", - "databases", - "tables", - "rows", - "schedules", - "platforms", - "keys", - "dev_keys", - "webhooks", - "certificates", - "realtime", - "rules", - "installations", - "repositories", - "vcs_comments", - "vcs_comment_locks", - "reports", - "insights", - "users", - "cache", - "tokens", - "authenticators", - "challenges", - "sessions", - "identities", - "memberships", - "buckets", - "providers", - "messages", - "topics", - "subscribers", - "targets", - "presence_logs", - "companies", - "billing_addresses", - "billing_aggregations", - "billing_aggregation_resources", - "billing_team_project_aggregations", - "billing_team_aggregations_v2", - "billing_team_aggregation_resources", - "billing_invoices_v2", - "billing_addons", - "alerts", - "payments", - "billing_discounts", - "sources", - "deals", - "blocks", - "threats", - "feedbacks", - "disputes", - "sh_installations", - "apps", - "app_secrets", - "oauth2_grants", - "attributes", - "indexes", - "functions", - "sites", - "deployments", - "executions", - "variables", - "migrations", - "resource_tokens", - "transactions", - "transaction_logs", - "stats", - "dedicated_databases", - "dedicated_database_configs", - "dedicated_database_runtimes", - "dedicated_database_operations", - "dedicated_database_backups", - "dedicated_database_restorations" - ] - }, - "in": "query" - }, - { - "name": "input", - "description": "Natural language query intent used to generate filters\/sorting\/pagination.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, { "name": "databaseId", - "description": "Database ID. Required when resource is `tables` or `rows`.", - "required": false, + "description": "Database ID.", + "required": true, "schema": { "type": "string", "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "tableId", - "description": "Table ID. Required when resource is `rows`.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "query" + "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 enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } } }, - "\/console\/templates\/email\/{templateId}": { - "get": { - "summary": "Get email template", - "operationId": "consoleGetEmailTemplate", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { + "patch": { + "summary": "Update enum attribute", + "operationId": "databasesUpdateEnumAttribute", "tags": [ - "console" + "databases" ], - "description": "Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.", + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "EmailTemplate", + "description": "AttributeEnum", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" + "$ref": "#\/components\/schemas\/attributeEnum" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getEmailTemplate", - "group": null, + "method": "updateEnumAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/get-email-template.md", + "demo": "databases\/update-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "templateId", - "description": "Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "ProjectEmailTemplateId", - "x-enum-keys": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ] + "x-example": "" }, "in": "path" }, { - "name": "locale", - "description": "Template locale. If left empty, the fallback locale (en) will be used.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "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": "ProjectEmailTemplateLocale", - "x-enum-keys": [ - "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-example": "" }, - "in": "query" + "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": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } } }, - "\/console\/variables": { - "get": { - "summary": "Get variables", - "operationId": "consoleVariables", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "post": { + "summary": "Create float attribute", + "operationId": "databasesCreateFloatAttribute", "tags": [ - "console" + "databases" ], - "description": "Get all Environment Variables that are relevant for the console.", + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { - "200": { - "description": "Console Variables", + "202": { + "description": "AttributeFloat", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/consoleVariables" + "$ref": "#\/components\/schemas\/attributeFloat" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "variables", - "group": "console", + "method": "createFloatAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "console\/variables.md", + "demo": "databases\/create-float-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { + "patch": { + "summary": "Update float attribute", + "operationId": "databasesUpdateFloatAttribute", "tags": [ "databases" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "Databases List", + "description": "AttributeFloat", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/attributeFloat" } } } @@ -14899,55 +15951,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "list", - "group": "databases", + "method": "updateFloatAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/list.md", + "demo": "databases\/update-float-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.list" + "replaceWith": "tablesDB.updateFloatColumn" }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], "auth": { "Project": [] } @@ -14960,56 +15983,99 @@ ], "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, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { "type": "string", - "x-example": "", - "default": "" + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "key", + "description": "Attribute Key.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string" }, - "in": "query" + "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.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { "post": { - "summary": "Create database", - "operationId": "databasesCreate", + "summary": "Create integer attribute", + "operationId": "databasesCreateIntegerAttribute", "tags": [ "databases" ], - "description": "Create a new Database.\n", + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", "responses": { - "201": { - "description": "Database", + "202": { + "description": "AttributeInteger", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/attributeInteger" } } } @@ -15017,58 +16083,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "create", - "group": "databases", + "method": "createIntegerAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create.md", + "demo": "databases\/create-integer-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.create" + "replaceWith": "tablesDB.createIntegerColumn" }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - } - } - ], "auth": { "Project": [] } @@ -15079,35 +16113,75 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "databaseId": { + "key": { "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Attribute Key.", + "x-example": null }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false }, - "enabled": { + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { "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, + "description": "Is attribute an array?", + "default": false, "x-example": false } }, "required": [ - "databaseId", - "name" + "key", + "required" ] } } @@ -15115,21 +16189,21 @@ } } }, - "\/databases\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + "patch": { + "summary": "Update integer attribute", + "operationId": "databasesUpdateIntegerAttribute", "tags": [ "databases" ], - "description": "List transactions across all databases.", + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "Transaction List", + "description": "AttributeInteger", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/attributeInteger" } } } @@ -15137,26 +16211,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "updateIntegerAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/list-transactions.md", + "demo": "databases\/update-integer-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listTransactions" + "replaceWith": "tablesDB.updateIntegerColumn" }, "auth": { "Project": [] @@ -15165,79 +16238,38 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "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).", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", - "tags": [ - "databases" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "databases\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTransaction" + "in": "path" }, - "auth": { - "Project": [] - } - }, - "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -15246,35 +16278,64 @@ "schema": { "type": "object", "properties": { - "ttl": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "min": { "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true } - } + }, + "required": [ + "required", + "default" + ] } } } } } }, - "\/databases\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { + "post": { + "summary": "Create IP address attribute", + "operationId": "databasesCreateIpAttribute", "tags": [ "databases" ], - "description": "Get a transaction by its unique ID.", + "description": "Create IP address attribute.\n", "responses": { - "200": { - "description": "Transaction", + "202": { + "description": "AttributeIP", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/attributeIp" } } } @@ -15282,26 +16343,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "createIpAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/get-transaction.md", + "demo": "databases\/create-ip-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.getTransaction" + "replaceWith": "tablesDB.createIpColumn" }, "auth": { "Project": [] @@ -15310,38 +16370,85 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "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 transaction", - "operationId": "databasesUpdateTransaction", + "summary": "Update IP address attribute", + "operationId": "databasesUpdateIpAttribute", "tags": [ "databases" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "Transaction", + "description": "AttributeIP", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/attributeIp" } } } @@ -15349,26 +16456,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "updateIpAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-transaction.md", + "demo": "databases\/update-ip-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateTransaction" + "replaceWith": "tablesDB.updateIpColumn" }, "auth": { "Project": [] @@ -15377,81 +16483,115 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { "type": "boolean", - "description": "Rollback transaction?", - "default": false, + "description": "Is attribute required?", "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true } - } + }, + "required": [ + "required", + "default" + ] } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", "tags": [ "databases" ], - "description": "Delete a transaction by its unique ID.", + "description": "Create a geometric line attribute.", "responses": { - "204": { - "description": "No content" + "202": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } } }, "deprecated": true, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "createLineAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/delete-transaction.md", + "demo": "databases\/create-line-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.deleteTransaction" + "replaceWith": "tablesDB.createLineColumn" }, "auth": { "Project": [] @@ -15460,40 +16600,86 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/databases\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", "tags": [ "databases" ], - "description": "Create multiple operations in a single transaction.", + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "AttributeLine", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/attributeLine" } } } @@ -15501,26 +16687,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "updateLineAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-operations.md", + "demo": "databases\/update-line-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createOperations" + "replaceWith": "tablesDB.updateLineColumn" }, "auth": { "Project": [] @@ -15529,19 +16714,36 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } @@ -15552,37 +16754,55 @@ "schema": { "type": "object", "properties": { - "operations": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"collectionId\": \"\",\n\t \"documentId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { - "type": "object" - } + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true } - } + }, + "required": [ + "required" + ] } } } } } }, - "\/databases\/usage": { - "get": { - "summary": "Get databases usage stats", - "operationId": "databasesListUsage", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", "tags": [ "databases" ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Create a longtext attribute.\n", "responses": { - "200": { - "description": "UsageDatabases", + "202": { + "description": "AttributeLongtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" + "$ref": "#\/components\/schemas\/attributeLongtext" } } } @@ -15590,102 +16810,118 @@ }, "deprecated": true, "x-appwrite": { - "method": "listUsage", - "group": null, + "method": "createLongtextAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/list-usage.md", + "demo": "databases\/create-longtext-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "collections.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" + "replaceWith": "tablesDB.createLongtextColumn" }, - "methods": [ - { - "name": "listUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/list-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listUsage" - } - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "range", - "description": "Date range.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" + "x-example": "" }, - "in": "query" + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "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", + "required" + ] + } + } + } + } } }, - "\/databases\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "databasesGet", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", "tags": [ "databases" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "Database", + "description": "AttributeLongtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/attributeLongtext" } } } @@ -15693,55 +16929,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "get", - "group": "databases", + "method": "updateLongtextAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/get.md", + "demo": "databases\/update-longtext-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.get" + "replaceWith": "tablesDB.updateLongtextColumn" }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], "auth": { "Project": [] } @@ -15762,23 +16969,76 @@ "x-example": "" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", "tags": [ "databases" ], - "description": "Update a database by its unique ID.", + "description": "Create a mediumtext attribute.\n", "responses": { - "200": { - "description": "Database", + "202": { + "description": "AttributeMediumtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/attributeMediumtext" } } } @@ -15786,57 +17046,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "update", - "group": "databases", + "method": "createMediumtextAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update.md", + "demo": "databases\/create-mediumtext-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.update" + "replaceWith": "tablesDB.createMediumtextColumn" }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], "auth": { "Project": [] } @@ -15857,6 +17086,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -15865,85 +17104,87 @@ "schema": { "type": "object", "properties": { - "name": { + "key": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" + "description": "Attribute Key.", + "x-example": null }, - "enabled": { + "required": { "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, + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "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", + "required" + ] } } } } - }, - "delete": { - "summary": "Delete database", - "operationId": "databasesDelete", + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", "tags": [ "databases" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } } }, "deprecated": true, "x-appwrite": { - "method": "delete", - "group": "databases", + "method": "updateMediumtextAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/delete.md", + "demo": "databases\/update-mediumtext-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.delete" + "replaceWith": "tablesDB.updateMediumtextColumn" }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], "auth": { "Project": [] } @@ -15964,25 +17205,76 @@ "x-example": "" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/databases\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "databasesListCollections", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", "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.", + "description": "Create a geometric point attribute.", "responses": { - "200": { - "description": "Collections List", + "202": { + "description": "AttributePoint", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collectionList" + "$ref": "#\/components\/schemas\/attributePoint" } } } @@ -15990,25 +17282,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "createPointAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/list-collections.md", + "demo": "databases\/create-point-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listTables" + "replaceWith": "tablesDB.createPointColumn" }, "auth": { "Project": [] @@ -16032,56 +17324,68 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, "schema": { "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "" }, - "in": "query" + "in": "path" } - ] - }, - "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", + ], + "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": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "type": "number", + "format": "double" + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", "tags": [ "databases" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", "responses": { - "201": { - "description": "Collection", + "200": { + "description": "AttributePoint", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/attributePoint" } } } @@ -16089,11 +17393,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "updatePointAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-collection.md", + "demo": "databases\/update-point-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16104,10 +17408,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createTable" + "replaceWith": "tablesDB.updatePointColumn" }, "auth": { "Project": [] @@ -16129,6 +17433,25 @@ "x-example": "" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -16137,62 +17460,30 @@ "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { + "required": { "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, + "description": "Is attribute required?", "x-example": false }, - "attributes": { + "default": { "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", "items": { - "type": "object" - } + "type": "number", + "format": "double" + }, + "x-nullable": true }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], + "newKey": { + "type": "string", + "description": "New attribute key.", "x-example": null, - "items": { - "type": "object" - } + "x-nullable": true } }, "required": [ - "collectionId", - "name" + "required" ] } } @@ -16200,21 +17491,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "databasesGetCollection", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", "tags": [ "databases" ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "description": "Create a geometric polygon attribute.", "responses": { - "200": { - "description": "Collection", + "202": { + "description": "AttributePolygon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/attributePolygon" } } } @@ -16222,25 +17513,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "getCollection", - "group": "collections", + "method": "createPolygonAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/get-collection.md", + "demo": "databases\/create-polygon-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.getTable" + "replaceWith": "tablesDB.createPolygonColumn" }, "auth": { "Project": [] @@ -16265,7 +17556,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -16273,22 +17564,65 @@ }, "in": "path" } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", + ], + "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": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", "tags": [ "databases" ], - "description": "Update a collection by its unique ID.", + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", "responses": { "200": { - "description": "Collection", + "description": "AttributePolygon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/attributePolygon" } } } @@ -16296,11 +17630,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateCollection", - "group": "collections", + "method": "updatePolygonAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-collection.md", + "demo": "databases\/update-polygon-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16311,10 +17645,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" + "replaceWith": "tablesDB.updatePolygonColumn" }, "auth": { "Project": [] @@ -16339,13 +17673,22 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -16354,63 +17697,70 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false }, - "permissions": { + "default": { "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { - "type": "string" + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } }, "x-nullable": true }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true } - } + }, + "required": [ + "required" + ] } } } } - }, - "delete": { - "summary": "Delete collection", - "operationId": "databasesDeleteCollection", + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", "tags": [ "databases" ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { - "204": { - "description": "No content" + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } } }, "deprecated": true, "x-appwrite": { - "method": "deleteCollection", - "group": "collections", + "method": "createRelationshipAttribute", + "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/delete-collection.md", + "demo": "databases\/create-relationship-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16421,10 +17771,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" + "replaceWith": "tablesDB.createRelationshipColumn" }, "auth": { "Project": [] @@ -16457,24 +17807,97 @@ }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [ + "cascade", + "restrict", + "setNull" + ] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { - "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", "tags": [ "databases" ], - "description": "List attributes in the collection.", + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", "responses": { "200": { - "description": "Attributes List", + "description": "AttributeRelationship", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeList" + "$ref": "#\/components\/schemas\/attributeRelationship" } } } @@ -16482,25 +17905,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "listAttributes", + "method": "updateRelationshipAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/list-attributes.md", + "demo": "databases\/update-relationship-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" + "replaceWith": "tablesDB.updateRelationshipColumn" }, "auth": { "Project": [] @@ -16534,47 +17957,65 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "key", + "description": "Attribute Key.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string" }, - "in": "query" + "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": [ + "cascade", + "restrict", + "setNull" + ] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { "post": { - "summary": "Create bigint attribute", - "operationId": "databasesCreateBigIntAttribute", + "summary": "Create string attribute", + "operationId": "databasesCreateStringAttribute", "tags": [ "databases" ], - "description": "Create a bigint attribute. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a string attribute.\n", "responses": { "202": { - "description": "AttributeBigInt", + "description": "AttributeString", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBigint" + "$ref": "#\/components\/schemas\/attributeString" } } } @@ -16582,11 +18023,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createBigIntAttribute", + "method": "createStringAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-big-int-attribute.md", + "demo": "databases\/create-string-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16597,10 +18038,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-bigint-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createBigIntColumn" + "replaceWith": "tablesDB.createStringColumn" }, "auth": { "Project": [] @@ -16625,7 +18066,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -16645,30 +18086,21 @@ "description": "Attribute Key.", "x-example": null }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1, + "format": "int32" + }, "required": { "type": "boolean", "description": "Is attribute required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", "x-nullable": true }, "array": { @@ -16676,10 +18108,17 @@ "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" ] } @@ -16688,21 +18127,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint\/{key}": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { "patch": { - "summary": "Update bigint attribute", - "operationId": "databasesUpdateBigIntAttribute", + "summary": "Update string attribute", + "operationId": "databasesUpdateStringAttribute", "tags": [ "databases" ], - "description": "Update a bigint attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "AttributeBigInt", + "description": "AttributeString", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBigint" + "$ref": "#\/components\/schemas\/attributeString" } } } @@ -16710,11 +18149,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateBigIntAttribute", + "method": "updateStringAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-big-int-attribute.md", + "demo": "databases\/update-string-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16725,10 +18164,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-bigint-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateBigIntColumn" + "replaceWith": "tablesDB.updateStringColumn" }, "auth": { "Project": [] @@ -16753,7 +18192,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -16782,25 +18221,17 @@ "description": "Is attribute required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "", "x-nullable": true }, - "default": { + "size": { "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", + "description": "Maximum size of the string attribute.", + "x-example": 1, + "format": "int32", "x-nullable": true }, "newKey": { @@ -16820,21 +18251,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", "tags": [ "databases" ], - "description": "Create a boolean attribute.\n", + "description": "Create a text attribute.\n", "responses": { "202": { - "description": "AttributeBoolean", + "description": "AttributeText", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" + "$ref": "#\/components\/schemas\/attributeText" } } } @@ -16842,11 +18273,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createBooleanAttribute", + "method": "createTextAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-boolean-attribute.md", + "demo": "databases\/create-text-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16857,10 +18288,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" + "replaceWith": "tablesDB.createTextColumn" }, "auth": { "Project": [] @@ -16911,9 +18342,9 @@ "x-example": false }, "default": { - "type": "boolean", + "type": "string", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, + "x-example": "", "x-nullable": true }, "array": { @@ -16921,6 +18352,12 @@ "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": [ @@ -16933,21 +18370,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", "tags": [ "databases" ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "AttributeBoolean", + "description": "AttributeText", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" + "$ref": "#\/components\/schemas\/attributeText" } } } @@ -16955,11 +18392,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateBooleanAttribute", + "method": "updateTextAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-boolean-attribute.md", + "demo": "databases\/update-text-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -16970,10 +18407,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" + "replaceWith": "tablesDB.updateTextColumn" }, "auth": { "Project": [] @@ -16998,7 +18435,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -17028,14 +18465,14 @@ "x-example": false }, "default": { - "type": "boolean", + "type": "string", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, + "x-example": "", "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null, "x-nullable": true } @@ -17050,21 +18487,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", + "summary": "Create URL attribute", + "operationId": "databasesCreateUrlAttribute", "tags": [ "databases" ], - "description": "Create a date time attribute according to the ISO 8601 standard.", + "description": "Create a URL attribute.\n", "responses": { "202": { - "description": "AttributeDatetime", + "description": "AttributeURL", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" + "$ref": "#\/components\/schemas\/attributeUrl" } } } @@ -17072,11 +18509,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createDatetimeAttribute", + "method": "createUrlAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-datetime-attribute.md", + "demo": "databases\/create-url-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17087,10 +18524,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" + "replaceWith": "tablesDB.createUrlColumn" }, "auth": { "Project": [] @@ -17115,7 +18552,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -17142,9 +18579,9 @@ }, "default": { "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "https:\/\/example.com", + "format": "url", "x-nullable": true }, "array": { @@ -17164,21 +18601,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", + "summary": "Update URL attribute", + "operationId": "databasesUpdateUrlAttribute", "tags": [ "databases" ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "AttributeDatetime", + "description": "AttributeURL", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" + "$ref": "#\/components\/schemas\/attributeUrl" } } } @@ -17186,11 +18623,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateDatetimeAttribute", + "method": "updateUrlAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-datetime-attribute.md", + "demo": "databases\/update-url-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17201,10 +18638,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" + "replaceWith": "tablesDB.updateUrlColumn" }, "auth": { "Project": [] @@ -17261,13 +18698,13 @@ "default": { "type": "string", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "x-example": "https:\/\/example.com", + "format": "url", "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null, "x-nullable": true } @@ -17282,21 +18719,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { "post": { - "summary": "Create email attribute", - "operationId": "databasesCreateEmailAttribute", + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", "tags": [ "databases" ], - "description": "Create an email attribute.\n", + "description": "Create a varchar attribute.\n", "responses": { "202": { - "description": "AttributeEmail", + "description": "AttributeVarchar", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" + "$ref": "#\/components\/schemas\/attributeVarchar" } } } @@ -17304,11 +18741,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createEmailAttribute", + "method": "createVarcharAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-email-attribute.md", + "demo": "databases\/create-varchar-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17319,10 +18756,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" + "replaceWith": "tablesDB.createVarcharColumn" }, "auth": { "Project": [] @@ -17347,7 +18784,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -17367,6 +18804,12 @@ "description": "Attribute Key.", "x-example": null }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, "required": { "type": "boolean", "description": "Is attribute required?", @@ -17375,8 +18818,7 @@ "default": { "type": "string", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", + "x-example": "", "x-nullable": true }, "array": { @@ -17384,10 +18826,17 @@ "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" ] } @@ -17396,21 +18845,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", "tags": [ "databases" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", "responses": { "200": { - "description": "AttributeEmail", + "description": "AttributeVarchar", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" + "$ref": "#\/components\/schemas\/attributeVarchar" } } } @@ -17418,11 +18867,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateEmailAttribute", + "method": "updateVarcharAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-email-attribute.md", + "demo": "databases\/update-varchar-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17433,10 +18882,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" + "replaceWith": "tablesDB.updateVarcharColumn" }, "auth": { "Project": [] @@ -17461,7 +18910,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -17493,8 +18942,14 @@ "default": { "type": "string", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "x-example": 1, + "format": "int32", "x-nullable": true }, "newKey": { @@ -17514,21 +18969,103 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", "tags": [ "databases" ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Get attribute by ID.", "responses": { - "202": { - "description": "AttributeEnum", + "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": { - "$ref": "#\/components\/schemas\/attributeEnum" + "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" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } } } } @@ -17536,25 +19073,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "createEnumAttribute", + "method": "getAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/create-enum-attribute.md", + "demo": "databases\/get-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" + "replaceWith": "tablesDB.getColumn" }, "auth": { "Project": [] @@ -17586,83 +19123,37 @@ "x-example": "" }, "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "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 enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "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", + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", "tags": [ "databases" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Deletes an attribute.", "responses": { - "200": { - "description": "AttributeEnum", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" - } - } - } + "204": { + "description": "No content" } }, "deprecated": true, "x-appwrite": { - "method": "updateEnumAttribute", + "method": "deleteAttribute", "group": "attributes", "cookies": false, "type": "", - "demo": "databases\/update-enum-attribute.md", + "demo": "databases\/delete-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -17673,10 +19164,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" + "replaceWith": "tablesDB.deleteColumn" }, "auth": { "Project": [] @@ -17718,65 +19209,24 @@ }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "elements", - "required", - "default" - ] - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { - "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", "tags": [ "databases" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "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": { - "202": { - "description": "AttributeFloat", + "200": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -17784,25 +19234,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-float-attribute.md", + "demo": "databases\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" + "replaceWith": "tablesDB.listRows" }, "auth": { "Project": [] @@ -17811,7 +19262,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -17827,84 +19280,76 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } - ], - "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.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "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", + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", "tags": [ "databases" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "AttributeFloat", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" + "$ref": "#\/components\/schemas\/document" } } } @@ -17912,63 +19357,126 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "replaceWith": "tablesDB.createRow" }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "key", - "description": "Attribute Key.", + "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" + "type": "string", + "x-example": "" }, "in": "path" } @@ -17979,64 +19487,68 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, "x-nullable": true }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], "x-example": null, - "format": "float", - "x-nullable": true + "items": { + "type": "object" + } }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Attribute Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "", "x-nullable": true } }, "required": [ - "required", - "default" + "documentId", + "data" ] } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { - "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", "tags": [ "databases" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "202": { - "description": "AttributeInteger", + "201": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -18044,26 +19556,60 @@ }, "deprecated": true, "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", + "method": "upsertDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" + "replaceWith": "tablesDB.upsertRows" }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], "auth": { "Project": [] } @@ -18102,69 +19648,43 @@ "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", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", "x-example": null, - "format": "int64", - "x-nullable": true + "items": { + "type": "object" + } }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false } }, "required": [ - "key", - "required" + "documents" ] } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { + }, "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", "tags": [ "databases" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { - "description": "AttributeInteger", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -18172,25 +19692,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", + "method": "updateDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" + "replaceWith": "tablesDB.updateRows" }, "auth": { "Project": [] @@ -18222,15 +19742,6 @@ "x-example": "" }, "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" } ], "requestBody": { @@ -18239,64 +19750,47 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], "x-example": null, - "format": "int64", - "x-nullable": true + "items": { + "type": "string" + } }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Attribute Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "", "x-nullable": true } - }, - "required": [ - "required", - "default" - ] + } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", "tags": [ "databases" ], - "description": "Create IP address attribute.\n", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { - "202": { - "description": "AttributeIP", + "200": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeIp" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -18304,25 +19798,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", + "method": "deleteDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" + "replaceWith": "tablesDB.deleteRows" }, "auth": { "Project": [] @@ -18347,69 +19841,55 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" } - ], - "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. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "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", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "databasesGetDocument", "tags": [ "databases" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { "200": { - "description": "AttributeIP", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeIp" + "$ref": "#\/components\/schemas\/document" } } } @@ -18417,25 +19897,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-ip-attribute.md", + "demo": "databases\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" + "replaceWith": "tablesDB.getRow" }, "auth": { "Project": [] @@ -18444,7 +19925,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -18460,7 +19943,7 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -18469,64 +19952,54 @@ "in": "path" }, { - "name": "key", - "description": "Attribute Key.", + "name": "documentId", + "description": "Document ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", "tags": [ "databases" ], - "description": "Create a geometric line attribute.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "202": { - "description": "AttributeLine", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLine" + "$ref": "#\/components\/schemas\/document" } } } @@ -18534,26 +20007,63 @@ }, "deprecated": true, "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", + "method": "upsertDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" + "replaceWith": "tablesDB.upsertRow" }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], "auth": { "Project": [] } @@ -18561,7 +20071,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -18577,13 +20089,26 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -18592,55 +20117,47 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, - "default": { + "permissions": { "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } + "type": "string" }, "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + }, "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", + "summary": "Update document", + "operationId": "databasesUpdateDocument", "tags": [ "databases" ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "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": "AttributeLine", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLine" + "$ref": "#\/components\/schemas\/document" } } } @@ -18648,25 +20165,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", + "method": "updateDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-line-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" + "replaceWith": "tablesDB.updateRow" }, "auth": { "Project": [] @@ -18675,7 +20193,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -18691,7 +20211,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -18700,11 +20220,12 @@ "in": "path" }, { - "name": "key", - "description": "Attribute Key.", + "name": "documentId", + "description": "Document ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } @@ -18715,81 +20236,67 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "default": { + "permissions": { "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } + "type": "string" }, "x-nullable": true }, - "newKey": { + "transactionId": { "type": "string", - "description": "New attribute key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "", "x-nullable": true } - }, - "required": [ - "required" - ] + } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { - "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", "tags": [ "databases" ], - "description": "Create a longtext attribute.\n", + "description": "Delete a document by its unique ID.", "responses": { - "202": { - "description": "AttributeLongtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" - } - } - } + "204": { + "description": "No content" } }, "deprecated": true, "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", + "method": "deleteDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createLongtextColumn" + "replaceWith": "tablesDB.deleteRow" }, "auth": { "Project": [] @@ -18798,7 +20305,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -18821,68 +20330,45 @@ "x-example": "" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" } - ], - "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": "", - "x-nullable": true - }, - "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", - "required" - ] - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", "tags": [ "databases" ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Decrement a specific attribute of a document by a given value.", "responses": { "200": { - "description": "AttributeLongtext", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" + "$ref": "#\/components\/schemas\/document" } } } @@ -18890,25 +20376,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", + "method": "decrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-longtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateLongtextColumn" + "replaceWith": "tablesDB.decrementRowColumn" }, "auth": { "Project": [] @@ -18917,6 +20404,8 @@ "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -18933,7 +20422,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -18942,8 +20431,18 @@ "in": "path" }, { - "name": "key", - "description": "Attribute Key.", + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", "required": true, "schema": { "type": "string" @@ -18957,49 +20456,48 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", "x-nullable": true }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Attribute Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "", "x-nullable": true } - }, - "required": [ - "required", - "default" - ] + } } } } } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", "tags": [ "databases" ], - "description": "Create a mediumtext attribute.\n", + "description": "Increment a specific attribute of a document by a given value.", "responses": { - "202": { - "description": "AttributeMediumtext", + "200": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" + "$ref": "#\/components\/schemas\/document" } } } @@ -19007,25 +20505,26 @@ }, "deprecated": true, "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", + "method": "incrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-mediumtext-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createMediumtextColumn" + "replaceWith": "tablesDB.incrementRowColumn" }, "auth": { "Project": [] @@ -19034,6 +20533,8 @@ "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -19050,13 +20551,32 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -19065,60 +20585,48 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", "x-nullable": true }, - "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 + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", "tags": [ "databases" ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "description": "List indexes in the collection.", "responses": { "200": { - "description": "AttributeMediumtext", + "description": "Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" + "$ref": "#\/components\/schemas\/indexList" } } } @@ -19126,25 +20634,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", + "method": "listIndexes", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/update-mediumtext-attribute.md", + "demo": "databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateMediumtextColumn" + "replaceWith": "tablesDB.listIndexes" }, "auth": { "Project": [] @@ -19178,64 +20686,45 @@ "in": "path" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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": "string" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + ] + }, "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", + "summary": "Create index", + "operationId": "databasesCreateIndex", "tags": [ "databases" ], - "description": "Create a geometric point attribute.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { "202": { - "description": "AttributePoint", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePoint" + "$ref": "#\/components\/schemas\/index" } } } @@ -19243,11 +20732,11 @@ }, "deprecated": true, "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", + "method": "createIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/create-point-attribute.md", + "demo": "databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19258,10 +20747,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" + "replaceWith": "tablesDB.createIndex" }, "auth": { "Project": [] @@ -19303,28 +20792,67 @@ "properties": { "key": { "type": "string", - "description": "Attribute Key.", + "description": "Index Key.", "x-example": null }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [ + "key", + "fulltext", + "unique", + "spatial" + ] }, - "default": { + "attributes": { "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, "items": { - "type": "number", - "format": "double" - }, - "x-nullable": true + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } } }, "required": [ "key", - "required" + "type", + "attributes" ] } } @@ -19332,21 +20860,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", "tags": [ "databases" ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "description": "Get an index by its unique ID.", "responses": { "200": { - "description": "AttributePoint", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePoint" + "$ref": "#\/components\/schemas\/index" } } } @@ -19354,25 +20882,25 @@ }, "deprecated": true, "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", + "method": "getIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/update-point-attribute.md", + "demo": "databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" + "replaceWith": "tablesDB.getIndex" }, "auth": { "Project": [] @@ -19397,7 +20925,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -19407,78 +20935,34 @@ }, { "name": "key", - "description": "Attribute Key.", + "description": "Index 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": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "type": "number", - "format": "double" - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", "tags": [ "databases" ], - "description": "Create a geometric polygon attribute.", + "description": "Delete an index.", "responses": { - "202": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } + "204": { + "description": "No content" } }, "deprecated": true, "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", + "method": "deleteIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/create-polygon-attribute.md", + "demo": "databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -19489,10 +20973,10 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" + "replaceWith": "tablesDB.deleteIndex" }, "auth": { "Project": [] @@ -19524,93 +21008,57 @@ "x-example": "" }, "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "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": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "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": "AttributePolygon", + "description": "Databases List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" + "$ref": "#\/components\/schemas\/databaseList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", + "method": "list", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/update-polygon-attribute.md", + "demo": "documentsdb\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", "auth": { "Project": [] } @@ -19623,120 +21071,68 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } + "in": "query" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + ] + }, "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", + "summary": "Create database", + "operationId": "documentsDBCreate", "tags": [ - "databases" + "documentsDB" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "description": "Create a new Database.\n", "responses": { - "202": { - "description": "AttributeRelationship", + "201": { + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", + "method": "create", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/create-relationship-attribute.md", + "demo": "documentsdb\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", "auth": { "Project": [] } @@ -19747,96 +21143,54 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "relatedCollectionId": { + "databaseId": { "type": "string", - "description": "Related Collection ID.", - "x-example": "" + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "type": { + "name": { "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ] + "description": "Database name. Max length: 128 chars.", + "x-example": "" }, - "twoWay": { + "enabled": { "type": "boolean", - "description": "Is Two Way?", - "default": false, + "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 }, - "key": { + "specification": { "type": "string", - "description": "Attribute Key.", - "x-example": null, - "x-nullable": true + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "x-example": null, - "x-nullable": true + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" }, - "onDelete": { + "syncMode": { "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [ - "cascade", - "restrict", - "setNull" - ] + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ - "relatedCollectionId", - "type" + "databaseId", + "name" ] } } @@ -19844,48 +21198,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", + "\/documentsdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "documentsDBListSpecifications", "tags": [ - "databases" + "documentsDB" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "AttributeRelationship", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", + "method": "listSpecifications", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/update-relationship-attribute.md", + "demo": "documentsdb\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, "auth": { "Project": [] } @@ -19895,115 +21244,48 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "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": [ - "cascade", - "restrict", - "setNull" - ] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a string attribute.\n", + "description": "List transactions across all databases.", "responses": { - "202": { - "description": "AttributeString", + "200": { + "description": "Transaction List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeString" + "$ref": "#\/components\/schemas\/transactionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", + "method": "listTransactions", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/create-string-attribute.md", + "demo": "documentsdb\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.read", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", "auth": { "Project": [] } @@ -20011,29 +21293,75 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "requestBody": { @@ -20042,94 +21370,59 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { + "ttl": { "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "x-example": 1, + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "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", + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a transaction by its unique ID.", "responses": { "200": { - "description": "AttributeString", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeString" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", + "method": "getTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/update-string-attribute.md", + "demo": "documentsdb\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.read", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", "auth": { "Project": [] } @@ -20137,123 +21430,62 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a text attribute.\n", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { - "202": { - "description": "AttributeText", + "200": { + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeText" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", + "method": "updateTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "databases\/create-text-attribute.md", + "demo": "documentsdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.write", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", "auth": { "Project": [] } @@ -20261,27 +21493,19 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -20292,87 +21516,119 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { + "commit": { "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", + "description": "Commit transaction?", "default": false, "x-example": false }, - "encrypt": { + "rollback": { "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.", + "description": "Rollback transaction?", "default": false, "x-example": false } - }, - "required": [ - "key", - "required" - ] + } } } } } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "AttributeText", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeText" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", + "method": "get", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/update-text-attribute.md", + "demo": "documentsdb\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", "auth": { "Project": [] } @@ -20393,103 +21649,46 @@ "x-example": "" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a URL attribute.\n", + "description": "Update a database by its unique ID.", "responses": { - "202": { - "description": "AttributeURL", + "200": { + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", + "method": "update", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/create-url-attribute.md", + "demo": "documentsdb\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", "auth": { "Project": [] } @@ -20510,16 +21709,6 @@ "x-example": "" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" } ], "requestBody": { @@ -20528,82 +21717,75 @@ "schema": { "type": "object", "properties": { - "key": { + "name": { "type": "string", - "description": "Attribute Key.", - "x-example": null + "description": "Database name. Max length: 128 chars.", + "x-example": "" }, - "required": { + "enabled": { "type": "boolean", - "description": "Is attribute required?", + "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 }, - "default": { + "specification": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", "x-nullable": true }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ - "key", - "required" + "name" ] } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", "tags": [ - "databases" + "documentsDB" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", "responses": { - "200": { - "description": "AttributeURL", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", + "method": "delete", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/update-url-attribute.md", + "demo": "documentsdb\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", "auth": { "Project": [] } @@ -20624,104 +21806,48 @@ "x-example": "" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { - "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a varchar attribute.\n", + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { - "202": { - "description": "AttributeVarchar", + "200": { + "description": "Collections List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" + "$ref": "#\/components\/schemas\/collectionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", + "method": "listCollections", + "group": "collections", "cookies": false, "type": "", - "demo": "databases\/create-varchar-attribute.md", + "demo": "documentsdb\/list-collections.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createVarcharColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", "auth": { "Project": [] } @@ -20744,95 +21870,68 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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": "" + "x-example": "", + "default": "" }, - "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 varchar attributes, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true - }, - "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" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { - "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "AttributeVarchar", + "201": { + "description": "Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" + "$ref": "#\/components\/schemas\/collection" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", + "method": "createCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "databases\/update-varchar-attribute.md", + "demo": "documentsdb\/create-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -20843,11 +21942,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateVarcharColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", "auth": { "Project": [] } @@ -20868,25 +21963,6 @@ "x-example": "" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" } ], "requestBody": { @@ -20895,34 +21971,62 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "default": { + "name": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "", - "x-nullable": true + "description": "Collection name. Max length: 128 chars.", + "x-example": "" }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "x-example": 1, - "format": "int32", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, "x-nullable": true }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], "x-example": null, - "x-nullable": true + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ - "required", - "default" + "collectionId", + "name" ] } } @@ -20930,115 +22034,33 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", + "summary": "Get collection", + "operationId": "documentsDBGetCollection", "tags": [ - "databases" + "documentsDB" ], - "description": "Get attribute by ID.", + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", "responses": { "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "description": "Collection", "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" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } + "$ref": "#\/components\/schemas\/collection" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getAttribute", - "group": "attributes", + "method": "getCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "databases\/get-attribute.md", + "demo": "documentsdb\/get-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21049,11 +22071,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", "auth": { "Project": [] } @@ -21084,37 +22102,143 @@ "x-example": "" }, "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", + "tags": [ + "documentsDB" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "documentsdb\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "key", - "description": "Attribute Key.", + "name": "collectionId", + "description": "Collection ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "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 + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + } + } }, "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", "tags": [ - "databases" + "documentsDB" ], - "description": "Deletes an attribute.", + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { "204": { "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", + "method": "deleteCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "databases\/delete-attribute.md", + "demo": "documentsdb\/delete-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21125,11 +22249,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", "auth": { "Project": [] } @@ -21160,25 +22280,16 @@ "x-example": "" }, "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" } ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { "get": { "summary": "List documents", - "operationId": "databasesListDocuments", + "operationId": "documentsDBListDocuments", "tags": [ - "databases" + "documentsDB" ], "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": { @@ -21193,13 +22304,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "listDocuments", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/list-documents.md", + "demo": "documentsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21211,11 +22322,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [] } @@ -21285,7 +22392,7 @@ }, { "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", "required": false, "schema": { "type": "integer", @@ -21299,11 +22406,11 @@ }, "post": { "summary": "Create document", - "operationId": "databasesCreateDocument", + "operationId": "documentsDBCreateDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -21316,13 +22423,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "createDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/create-document.md", + "demo": "documentsdb\/create-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21334,15 +22441,11 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", "methods": [ { "name": "createDocument", - "namespace": "databases", + "namespace": "documentsDB", "desc": "Create document", "auth": { "Project": [] @@ -21352,8 +22455,7 @@ "collectionId", "documentId", "data", - "permissions", - "transactionId" + "permissions" ], "required": [ "databaseId", @@ -21367,17 +22469,13 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRow" - } + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true }, { "name": "createDocuments", - "namespace": "databases", + "namespace": "documentsDB", "desc": "Create documents", "auth": { "Project": [] @@ -21385,8 +22483,7 @@ "parameters": [ "databaseId", "collectionId", - "documents", - "transactionId" + "documents" ], "required": [ "databaseId", @@ -21399,13 +22496,9 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true } ], "auth": { @@ -21451,7 +22544,6 @@ "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": "", "x-example": "", "x-appwrite": { "idGenerator": "ID.unique" @@ -21460,7 +22552,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "default": [], + "default": {}, "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { @@ -21469,8 +22561,7 @@ "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - }, - "x-nullable": true + } }, "documents": { "type": "array", @@ -21484,10 +22575,13 @@ "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } - } + }, + "required": [ + "documentId", + "data" + ] } } } @@ -21495,11 +22589,11 @@ }, "put": { "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", + "operationId": "documentsDBUpsertDocuments", "tags": [ - "databases" + "documentsDB" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -21512,13 +22606,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/upsert-documents.md", + "demo": "documentsdb\/upsert-documents.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21529,15 +22623,11 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", "methods": [ { "name": "upsertDocuments", - "namespace": "databases", + "namespace": "documentsDB", "desc": "", "auth": { "Project": [] @@ -21559,13 +22649,9 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true } ], "auth": { @@ -21617,8 +22703,7 @@ "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } }, "required": [ @@ -21631,9 +22716,9 @@ }, "patch": { "summary": "Update documents", - "operationId": "databasesUpdateDocuments", + "operationId": "documentsDBUpdateDocuments", "tags": [ - "databases" + "documentsDB" ], "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { @@ -21648,13 +22733,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "updateDocuments", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-documents.md", + "demo": "documentsdb\/update-documents.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21665,11 +22750,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", "auth": { "Project": [] } @@ -21712,7 +22793,7 @@ "type": "object", "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "x-example": "{}" }, "queries": { "type": "array", @@ -21726,8 +22807,7 @@ "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } @@ -21737,9 +22817,9 @@ }, "delete": { "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", + "operationId": "documentsDBDeleteDocuments", "tags": [ - "databases" + "documentsDB" ], "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { @@ -21754,13 +22834,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/delete-documents.md", + "demo": "documentsdb\/delete-documents.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21771,11 +22851,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", "auth": { "Project": [] } @@ -21833,12 +22909,12 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { "summary": "Get document", - "operationId": "databasesGetDocument", + "operationId": "documentsDBGetDocument", "tags": [ - "databases" + "documentsDB" ], "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { @@ -21853,13 +22929,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "getDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/get-document.md", + "demo": "documentsdb\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -21871,11 +22947,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } @@ -21946,11 +23018,11 @@ }, "put": { "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", + "operationId": "documentsDBUpsertDocument", "tags": [ - "databases" + "documentsDB" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -21963,13 +23035,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "upsertDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/upsert-document.md", + "demo": "documentsdb\/upsert-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21981,15 +23053,11 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", "methods": [ { "name": "upsertDocument", - "namespace": "databases", + "namespace": "documentsDB", "desc": "", "auth": { "Project": [] @@ -22013,13 +23081,9 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true } ], "auth": { @@ -22061,9 +23125,6 @@ "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, "x-example": "" }, "in": "path" @@ -22077,9 +23138,9 @@ "properties": { "data": { "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + "x-example": "{}" }, "permissions": { "type": "array", @@ -22087,14 +23148,12 @@ "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - }, - "x-nullable": true + } }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } @@ -22104,9 +23163,9 @@ }, "patch": { "summary": "Update document", - "operationId": "databasesUpdateDocument", + "operationId": "documentsDBUpdateDocument", "tags": [ - "databases" + "documentsDB" ], "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -22121,13 +23180,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "updateDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/update-document.md", + "demo": "documentsdb\/update-document.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22139,11 +23198,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } @@ -22196,9 +23251,9 @@ "properties": { "data": { "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "x-example": "{}" }, "permissions": { "type": "array", @@ -22206,14 +23261,12 @@ "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - }, - "x-nullable": true + } }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } @@ -22223,9 +23276,9 @@ }, "delete": { "summary": "Delete document", - "operationId": "databasesDeleteDocument", + "operationId": "documentsDBDeleteDocument", "tags": [ - "databases" + "documentsDB" ], "description": "Delete a document by its unique ID.", "responses": { @@ -22233,13 +23286,13 @@ "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "deleteDocument", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/delete-document.md", + "demo": "documentsdb\/delete-document.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22251,11 +23304,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } @@ -22312,111 +23361,14 @@ ] } }, - "\/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" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "listDocumentLogs", - "group": "logs", - "cookies": false, - "type": "", - "demo": "databases\/list-document-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRowLogs" - }, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "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}\/documents\/{documentId}\/{attribute}\/decrement": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { "patch": { "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "operationId": "documentsDBDecrementDocumentAttribute", "tags": [ - "databases" + "documentsDB" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Decrement a specific column of a row by a given value.", "responses": { "200": { "description": "Document", @@ -22429,13 +23381,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/decrement-document-attribute.md", + "demo": "documentsdb\/decrement-document-attribute.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22447,11 +23399,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", "auth": { "Project": [] } @@ -22513,7 +23461,7 @@ "properties": { "value": { "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", + "description": "Value to decrement the attribute by. The value must be a number.", "default": 1, "x-example": null, "format": "float" @@ -22522,14 +23470,12 @@ "type": "number", "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", "x-example": null, - "format": "float", - "x-nullable": true + "format": "float" }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } @@ -22538,14 +23484,14 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { "patch": { "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "operationId": "documentsDBIncrementDocumentAttribute", "tags": [ - "databases" + "documentsDB" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Increment a specific column of a row by a given value.", "responses": { "200": { "description": "Document", @@ -22558,13 +23504,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "cookies": false, "type": "", - "demo": "databases\/increment-document-attribute.md", + "demo": "documentsdb\/increment-document-attribute.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22576,11 +23522,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", "auth": { "Project": [] } @@ -22651,14 +23593,12 @@ "type": "number", "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", "x-example": null, - "format": "float", - "x-nullable": true + "format": "float" }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "x-example": "" } } } @@ -22667,12 +23607,12 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "databasesListIndexes", + "operationId": "documentsDBListIndexes", "tags": [ - "databases" + "documentsDB" ], "description": "List indexes in the collection.", "responses": { @@ -22687,13 +23627,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/list-indexes.md", + "demo": "documentsdb\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22704,11 +23644,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", "auth": { "Project": [] } @@ -22768,9 +23704,9 @@ }, "post": { "summary": "Create index", - "operationId": "databasesCreateIndex", + "operationId": "documentsDBCreateIndex", "tags": [ - "databases" + "documentsDB" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -22785,13 +23721,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/create-index.md", + "demo": "documentsdb\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22802,11 +23738,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", "auth": { "Project": [] } @@ -22857,15 +23789,13 @@ "enum": [ "key", "fulltext", - "unique", - "spatial" + "unique" ], - "x-enum-name": "DatabasesIndexType", + "x-enum-name": "DocumentsDBIndexType", "x-enum-keys": [ "key", "fulltext", - "unique", - "spatial" + "unique" ] }, "attributes": { @@ -22915,14 +23845,14 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "databasesGetIndex", + "operationId": "documentsDBGetIndex", "tags": [ - "databases" + "documentsDB" ], - "description": "Get an index by its unique ID.", + "description": "Get index by ID.", "responses": { "200": { "description": "Index", @@ -22935,13 +23865,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/get-index.md", + "demo": "documentsdb\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -22952,11 +23882,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", "auth": { "Project": [] } @@ -23001,9 +23927,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "databasesDeleteIndex", + "operationId": "documentsDBDeleteIndex", "tags": [ - "databases" + "documentsDB" ], "description": "Delete an index.", "responses": { @@ -23011,13 +23937,13 @@ "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/delete-index.md", + "demo": "documentsdb\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -23028,11 +23954,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", "auth": { "Project": [] } @@ -23076,54 +23998,51 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/logs": { - "get": { - "summary": "List collection logs", - "operationId": "databasesListCollectionLogs", + "\/documentsdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "documentsDBCreateFailover", "tags": [ - "databases" + "documentsDB" ], - "description": "Get the collection activity logs list by its unique ID.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "200": { - "description": "Logs List", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listCollectionLogs", - "group": "collections", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "databases\/list-collection-logs.md", + "demo": "documentsdb\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTableLogs" - }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -23136,81 +24055,72 @@ "x-example": "" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/usage": { + "\/documentsdb\/{databaseId}\/operations": { "get": { - "summary": "Get collection usage stats", - "operationId": "databasesGetCollectionUsage", + "summary": "List operations", + "operationId": "documentsDBListOperations", "tags": [ - "databases" + "documentsDB" ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "UsageCollection", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageCollection" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getCollectionUsage", - "group": null, + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "databases\/get-collection-usage.md", + "demo": "documentsdb\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTableUsage" - }, "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -23225,118 +24135,87 @@ "in": "path" }, { - "name": "range", - "description": "Date range.", + "name": "status", + "description": "Filter by operation status.", "required": false, "schema": { "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" + "x-example": "running" }, "in": "query" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 }, - "in": "path" + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] } }, - "\/databases\/{databaseId}\/logs": { + "\/documentsdb\/{databaseId}\/replicas": { "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", + "summary": "Get replicas", + "operationId": "documentsDBGetReplicas", "tags": [ - "databases" + "documentsDB" ], - "description": "Get the database activity logs list by its unique ID.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Logs List", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "logs", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "databases\/list-logs.md", + "demo": "documentsdb\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - }, - "methods": [ - { - "name": "listLogs", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "queries" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/logList" - } - ], - "description": "Get the database activity logs list by its unique ID.", - "demo": "databases\/list-logs.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listDatabaseLogs" - } - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -23349,101 +24228,55 @@ "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" } ] } }, - "\/databases\/{databaseId}\/usage": { + "\/documentsdb\/{databaseId}\/status": { "get": { - "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "summary": "Get status", + "operationId": "documentsDBGetStatus", "tags": [ - "databases" + "documentsDB" ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "UsageDatabase", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDatabase" + "$ref": "#\/components\/schemas\/databaseStatus" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "getStatus", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/get-usage.md", + "demo": "documentsdb\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - }, - "methods": [ - { - "name": "getUsage", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "databases\/get-usage.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getUsage" - } - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ @@ -23456,47 +24289,25 @@ "x-example": "" }, "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" } ] } }, - "\/documentsdb": { + "\/domains": { "get": { - "summary": "List databases", - "operationId": "documentsDBList", + "summary": "List domains", + "operationId": "domainsList", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "List all domains registered for this project. This endpoint supports pagination.", "responses": { "200": { - "description": "Databases List", + "description": "Domains list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/domainsList" } } } @@ -23505,35 +24316,32 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "documentsdb", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list.md", + "demo": "domains\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "domains.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "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 columns: name", + "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 attributes such as domain name, teamInternalId, expiration, etc.", "required": false, "schema": { "type": "array", @@ -23545,32 +24353,32 @@ "in": "query" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "", + "default": "" }, "in": "query" } ] }, "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", + "summary": "Create a new domain.", + "operationId": "domainsCreate", "tags": [ - "documentsDB" + "domains" ], - "description": "Create a new Database.\n", + "description": "Create a new domain. Before creating a domain, you need to ensure that your DNS provider is properly configured. After creating the domain, you can use the verification endpoint to check if the domain is ready to be used.", "responses": { "201": { - "description": "Database", + "description": "Domain", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/domain" } } } @@ -23579,29 +24387,26 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "documentsdb", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/create.md", + "demo": "domains\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "requestBody": { @@ -23610,38 +24415,20 @@ "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { + "teamId": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" - }, - "enabled": { - "type": "boolean", - "description": "Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false + "description": "Team unique ID.", + "x-example": "" }, - "dedicatedDatabaseId": { + "domain": { "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", - "default": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Domain name (e.g. \"example.com\").", + "x-example": null } }, "required": [ - "databaseId", - "name" + "teamId", + "domain" ] } } @@ -23649,21 +24436,21 @@ } } }, - "\/documentsdb\/transactions": { + "\/domains\/price": { "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", + "summary": "Get domain price", + "operationId": "domainsGetPrice", "tags": [ - "documentsDB" + "domains" ], - "description": "List transactions across all databases.", + "description": "Get the registration price for a domain name.", "responses": { "200": { - "description": "Transaction List", + "description": "DomainPrice", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/domainPrice" } } } @@ -23671,65 +24458,92 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "getPrice", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list-transactions.md", + "demo": "domains\/get-price.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "domains.read", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "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).", + "name": "domain", + "description": "Domain name to get price for.", + "required": true, + "schema": { + "type": "string" + }, + "in": "query" + }, + { + "name": "periodYears", + "description": "Number of years to calculate the domain price for. Must be at least 1.", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "integer", + "format": "uint32", + "default": 1 + }, + "in": "query" + }, + { + "name": "registrationType", + "description": "Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.", + "required": false, + "schema": { + "type": "string", + "x-example": "new", + "enum": [ + "new", + "transfer", + "renewal", + "trade" + ], + "x-enum-name": "DomainRegistrationType", + "x-enum-keys": [ + "new", + "transfer", + "renewal", + "trade" + ], + "default": "new" }, "in": "query" } ] - }, + } + }, + "\/domains\/purchases": { "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", + "summary": "Create a domain purchase", + "operationId": "domainsCreatePurchase", "tags": [ - "documentsDB" + "domains" ], - "description": "Create a new transaction.", + "description": "Initiate a domain purchase by providing registrant details and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Purchase endpoint to capture the payment and finalize the purchase.", "responses": { "201": { - "description": "Transaction", + "description": "DomainPurchase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/domainPurchase" } } } @@ -23737,33 +24551,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createPurchase", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/create-transaction.md", + "demo": "domains\/create-purchase.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "billing.write", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Project": [] } ], "requestBody": { @@ -23772,98 +24580,105 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" - } - } - } - } - } - } - } - }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", - "tags": [ - "documentsDB" - ], - "description": "Get a transaction by its unique ID.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } + "domain": { + "type": "string", + "description": "Fully qualified domain name to purchase (for example, example.com).", + "x-example": null + }, + "organizationId": { + "type": "string", + "description": "Team ID that will own the domain.", + "x-example": "" + }, + "firstName": { + "type": "string", + "description": "Registrant first name used for domain registration.", + "x-example": "" + }, + "lastName": { + "type": "string", + "description": "Registrant last name used for domain registration.", + "x-example": "" + }, + "email": { + "type": "string", + "description": "Registrant email address for registration and notices.", + "x-example": "email@example.com", + "format": "email" + }, + "phone": { + "type": "string", + "description": "Registrant phone number in E.164 format (for example, +15555551234).", + "x-example": "+12065550100", + "format": "phone" + }, + "billingAddressId": { + "type": "string", + "description": "Billing address ID used for registration contact details.", + "x-example": "" + }, + "addressLine3": { + "type": "string", + "description": "Additional address line for the registrant (line 3).", + "default": "", + "x-example": "" + }, + "companyName": { + "type": "string", + "description": "Company or organization name for the registrant.", + "default": "", + "x-example": "" + }, + "periodYears": { + "type": "integer", + "description": "Registration term in years (1-10).", + "default": 1, + "x-example": 1, + "format": "int32" + }, + "autoRenewal": { + "type": "boolean", + "description": "Whether the domain should renew automatically after purchase.", + "default": true, + "x-example": false + }, + "paymentMethodId": { + "type": "string", + "description": "Payment method ID to authorize and capture the purchase.", + "x-example": "" + } + }, + "required": [ + "domain", + "organizationId", + "firstName", + "lastName", + "email", + "phone", + "billingAddressId", + "paymentMethodId" + ] } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "documentsdb\/get-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ] - }, + } + } + }, + "\/domains\/purchases\/{invoiceId}": { "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", + "summary": "Confirm a domain purchase", + "operationId": "domainsUpdatePurchase", "tags": [ - "documentsDB" + "domains" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.", "responses": { "200": { - "description": "Transaction", + "description": "DomainPurchase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/domainPurchase" } } } @@ -23871,43 +24686,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "updatePurchase", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/update-transaction.md", + "demo": "domains\/update-purchase.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "billing.write", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "invoiceId", + "description": "Invoice ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -23918,96 +24727,157 @@ "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false + "organizationId": { + "type": "string", + "description": "Team ID that owns the domain.", + "x-example": "" } - } + }, + "required": [ + "organizationId" + ] } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", + } + }, + "\/domains\/suggestions": { + "get": { + "summary": "List domain suggestions", + "operationId": "domainsListSuggestions", "tags": [ - "documentsDB" + "domains" ], - "description": "Delete a transaction by its unique ID.", + "description": "List domain suggestions.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Domain suggestions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainSuggestionsList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "listSuggestions", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-transaction.md", - "rate-limit": 0, + "demo": "domains\/list-suggestions.md", + "rate-limit": 50, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "public", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "query", + "description": "Query to find available domains and suggestions. Max length: 256 chars.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "path" + "in": "query" + }, + { + "name": "tlds", + "description": "TLDs to suggest.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of suggestions to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" + }, + { + "name": "filterType", + "description": "Filter type: premium, suggestion.", + "required": false, + "schema": { + "type": "string", + "x-example": "premium", + "enum": [ + "premium", + "suggestion" + ], + "x-enum-name": "DomainSuggestionType", + "x-enum-keys": [ + "premium", + "suggestion" + ] + }, + "in": "query" + }, + { + "name": "priceMax", + "description": "Filter premium domains by maximum price. Only premium domains at or below this price will be returned. Does not affect regular domain suggestions.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" + }, + { + "name": "priceMin", + "description": "Filter premium domains by minimum price. Only premium domains at or above this price will be returned. Does not affect regular domain suggestions.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "in": "query" } ] } }, - "\/documentsdb\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBListUsage", + "\/domains\/transfers\/in": { + "post": { + "summary": "Create a domain transfer in.", + "operationId": "domainsCreateTransferIn", "tags": [ - "documentsDB" + "domains" ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Initiate a domain transfer-in by providing an authorization code, registrant details, and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Transfer In endpoint to capture the payment and submit the transfer.", "responses": { - "200": { - "description": "UsageDatabases", + "201": { + "description": "DomainPurchase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" + "$ref": "#\/components\/schemas\/domainPurchase" } } } @@ -24015,44 +24885,20 @@ }, "deprecated": false, "x-appwrite": { - "method": "listUsage", + "method": "createTransferIn", "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list-usage.md", + "demo": "domains\/create-transfer-in.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/list-usage.md", - "public": true - } - ], "auth": { "Project": [] } @@ -24062,47 +24908,66 @@ "Project": [] } ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name to transfer in.", + "x-example": null + }, + "organizationId": { + "type": "string", + "description": "Organization ID that this domain will belong to.", + "x-example": "" + }, + "authCode": { + "type": "string", + "description": "Authorization code for the domain transfer.", + "x-example": "" + }, + "autoRenewal": { + "type": "boolean", + "description": "Whether the domain should renew automatically after transfer.", + "default": true, + "x-example": false + }, + "paymentMethodId": { + "type": "string", + "description": "Payment method ID to authorize and capture the transfer.", + "x-example": "" + } + }, + "required": [ + "domain", + "organizationId", + "authCode", + "paymentMethodId" + ] + } + } } - ] + } } }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", + "\/domains\/transfers\/in\/{invoiceId}": { + "patch": { + "summary": "Confirm a domain transfer in", + "operationId": "domainsUpdateTransferIn", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.", "responses": { "200": { - "description": "Database", + "description": "DomainPurchase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/domainPurchase" } } } @@ -24110,59 +24975,77 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "documentsdb", + "method": "updateTransferIn", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/get.md", + "demo": "domains\/update-transfer-in.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "invoiceId", + "description": "Invoice ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Team ID that owns the domain.", + "x-example": "" + } + }, + "required": [ + "organizationId" + ] + } + } + } + } + } + }, + "\/domains\/transfers\/out": { + "post": { + "summary": "Create a domain transfer out.", + "operationId": "domainsCreateTransferOut", "tags": [ - "documentsDB" + "domains" ], - "description": "Update a database by its unique ID.", + "description": "Initiate a domain transfer-out by generating an authorization code for the specified domain. The returned `authCode` should be provided to the gaining provider to complete the transfer. If the domain has auto-renewal enabled, it will be automatically disabled as part of this operation.", "responses": { - "200": { - "description": "Database", + "202": { + "description": "domainTransferOut", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/domainTransferOut" } } } @@ -24170,42 +25053,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "documentsdb", + "method": "createTransferOut", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/update.md", + "demo": "domains\/create-transfer-out.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [] } ], "requestBody": { @@ -24214,33 +25082,92 @@ "schema": { "type": "object", "properties": { - "name": { + "domainId": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "" + "description": "Domain unique ID.", + "x-example": "" }, - "enabled": { - "type": "boolean", - "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", - "default": true, - "x-example": false + "organizationId": { + "type": "string", + "description": "Organization ID that this domain belongs to.", + "x-example": "" } }, "required": [ - "name" + "domainId", + "organizationId" ] } } } } + } + }, + "\/domains\/{domainId}": { + "get": { + "summary": "Get a single domain by its unique ID.", + "operationId": "domainsGet", + "tags": [ + "domains" + ], + "description": "Get a domain by its unique ID.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] }, "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", + "summary": "Delete a domain by its unique ID.", + "operationId": "domainsDelete", "tags": [ - "documentsDB" + "domains" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.\nOnce deleted, the domain will no longer be available for use and all associated resources will be removed.", "responses": { "204": { "description": "No content" @@ -24249,60 +25176,60 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "documentsdb", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete.md", + "demo": "domains\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", + "\/domains\/{domainId}\/auto-renewal": { + "patch": { + "summary": "Update domain auto-renewal setting.", + "operationId": "domainsUpdateAutoRenewal", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "description": "Enable or disable auto-renewal for a domain.", "responses": { "200": { - "description": "Collections List", + "description": "Domain", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collectionList" + "$ref": "#\/components\/schemas\/domain" } } } @@ -24310,94 +25237,77 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "updateAutoRenewal", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list-collections.md", + "demo": "domains\/update-auto-renewal.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "autoRenewal": { + "type": "boolean", + "description": "Whether the domain should renew automatically.", + "x-example": false + } + }, + "required": [ + "autoRenewal" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/nameservers": { + "patch": { + "summary": "Update the registrar nameservers for the given domain.", + "operationId": "domainsUpdateNameservers", "tags": [ - "documentsDB" + "domains" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Update the registrar nameservers for the given domain. When nameservers are not provided,\nthe domain will be updated to use Appwrite nameservers.", "responses": { - "201": { - "description": "Collection", + "200": { + "description": "Domain", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/domain" } } } @@ -24405,40 +25315,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "updateNameservers", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/create-collection.md", + "demo": "domains\/update-nameservers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -24449,84 +25356,37 @@ "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": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "attributes": { + "nameservers": { "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "description": "Nameservers to set for the domain. Defaults to Appwrite nameservers when omitted.", "default": [], "x-example": null, "items": { - "type": "object" + "type": "string" } } - }, - "required": [ - "collectionId", - "name" - ] + } } } } } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", + "\/domains\/{domainId}\/nameservers\/verification": { + "patch": { + "summary": "Verify which NS records are used and update the domain accordingly.", + "operationId": "domainsVerifyNameservers", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "description": "Verify which NS records are used and update the domain accordingly. This will check the domain's\nnameservers and update the domain's status based on whether the nameservers match the expected\nAppwrite nameservers.", "responses": { "200": { - "description": "Collection", + "description": "Domain", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/domain" } } } @@ -24534,69 +25394,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCollection", - "group": "collections", + "method": "verifyNameservers", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/get-collection.md", + "demo": "domains\/verify-nameservers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", + } + }, + "\/domains\/{domainId}\/presets\/google-workspace": { + "get": { + "summary": "Get Google Workspace preset (Records)", + "operationId": "domainsGetPresetGoogleWorkspace", "tags": [ - "documentsDB" + "domains" ], - "description": "Update a collection by its unique ID.", + "description": "List Google Workspace DNS records.", "responses": { - "200": { - "description": "Collection", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -24604,179 +25453,115 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateCollection", - "group": "collections", + "method": "getPresetGoogleWorkspace", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/update-collection.md", + "demo": "domains\/get-preset-google-workspace.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "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 - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } + ] }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", + "post": { + "summary": "Create Google Workspace preset (Records)", + "operationId": "domainsCreatePresetGoogleWorkspace", "tags": [ - "documentsDB" + "domains" ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Add Google Workspace DNS records to the domain. This will create the required MX records \nfor Google Workspace email hosting.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteCollection", - "group": "collections", + "method": "createPresetGoogleWorkspace", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-collection.md", + "demo": "domains\/create-preset-google-workspace.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/domains\/{domainId}\/presets\/icloud": { "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", + "summary": "Get iCloud preset (Records)", + "operationId": "domainsGetPresetICloud", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "List iCloud DNS records.", "responses": { - "200": { - "description": "Documents List", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -24784,118 +25569,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "getPresetICloud", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list-documents.md", + "demo": "domains\/get-preset-i-cloud.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } ] }, "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", + "summary": "Create iCloud preset (Records)", + "operationId": "domainsCreatePresetICloud", "tags": [ - "documentsDB" + "domains" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Add iCloud DNS records to the domain. This will create the required MX and SPF records\nfor using iCloud email services with your domain.", "responses": { "201": { - "description": "Document", + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -24903,179 +25626,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDocument", - "group": "documents", + "method": "createPresetICloud", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/create-preset-i-cloud.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", + ] + } + }, + "\/domains\/{domainId}\/presets\/mailgun": { + "get": { + "summary": "Get Mailgun preset (Records)", + "operationId": "domainsGetPresetMailgun", "tags": [ - "documentsDB" + "domains" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "description": "List Mailgun DNS records.", "responses": { "201": { - "description": "Documents List", + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25083,126 +25685,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", + "method": "getPresetMailgun", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/get-preset-mailgun.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - }, - "required": [ - "documents" - ] - } - } - } - } + ] }, - "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", + "post": { + "summary": "Create Mailgun preset (Records)", + "operationId": "domainsCreatePresetMailgun", "tags": [ - "documentsDB" + "domains" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Add Mailgun DNS records to the domain. This endpoint will create the required DNS records \nfor Mailgun in the specified domain.", "responses": { - "200": { - "description": "Documents List", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25210,100 +25742,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocuments", - "group": "documents", + "method": "createPresetMailgun", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/create-preset-mailgun.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", + ] + } + }, + "\/domains\/{domainId}\/presets\/outlook": { + "get": { + "summary": "Get Outlook preset (Records)", + "operationId": "domainsGetPresetOutlook", "tags": [ - "documentsDB" + "domains" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "List Outlook DNS records.", "responses": { - "200": { - "description": "Documents List", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25311,94 +25801,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", + "method": "getPresetOutlook", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/get-preset-outlook.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", + }, + "post": { + "summary": "Create Outlook preset (Records)", + "operationId": "domainsCreatePresetOutlook", "tags": [ - "documentsDB" + "domains" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Add Outlook DNS records to the domain. This will create the required MX records\nfor setting up Outlook email hosting for your domain.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25406,105 +25858,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "createPresetOutlook", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/get-document.md", + "demo": "domains\/create-preset-outlook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", + } + }, + "\/domains\/{domainId}\/presets\/proton-mail": { + "get": { + "summary": "Get ProtonMail preset (Records)", + "operationId": "domainsGetPresetProtonMail", "tags": [ - "documentsDB" + "domains" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "List ProtonMail DNS records.", "responses": { "201": { - "description": "Document", + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25512,144 +25917,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "getPresetProtonMail", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/get-preset-proton-mail.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - } - } - } - } - } + ] }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", + "post": { + "summary": "Create ProtonMail preset (Records)", + "operationId": "domainsCreatePresetProtonMail", "tags": [ - "documentsDB" + "domains" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Add ProtonMail DNS records to the domain. This will create the required MX records\nfor using ProtonMail with your custom domain.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25657,200 +25974,174 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createPresetProtonMail", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/create-preset-proton-mail.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } + ] + } + }, + "\/domains\/{domainId}\/presets\/zoho": { + "get": { + "summary": "Get Zoho preset (Records)", + "operationId": "domainsGetPresetZoho", + "tags": [ + "domains" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } + "description": "List Zoho DNS records.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } } - } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", - "tags": [ - "documentsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "getPresetZoho", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/get-preset-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, + } + ] + }, + "post": { + "summary": "Create Zoho Mail preset (Records)", + "operationId": "domainsCreatePresetZoho", + "tags": [ + "domains" + ], + "description": "Add Zoho Mail DNS records to the domain. This will create the required MX records\nfor setting up Zoho Mail on your domain.", + "responses": { + "201": { + "description": "DNS records list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecordsList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPresetZoho", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-preset-zoho.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, + "Project": [] + } + ], + "parameters": [ { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", + "\/domains\/{domainId}\/records": { + "get": { + "summary": "List DNS records for a given domain.", + "operationId": "domainsListRecords", "tags": [ - "documentsDB" + "domains" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "List DNS records for a given domain. You can use this endpoint to list all the DNS records\nassociated with your domain.", "responses": { "200": { - "description": "Document", + "description": "DNS records list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecordsList" } } } @@ -25858,122 +26149,71 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "listRecords", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/list-records.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", "platforms": [ - "client", - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" - } - } - } - } } - } + ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", + "\/domains\/{domainId}\/records\/a": { + "post": { + "summary": "Create a new A record for the given domain.", + "operationId": "domainsCreateRecordA", "tags": [ - "documentsDB" + "domains" ], - "description": "Increment a specific column of a row by a given value.", + "description": "Create a new A record for the given domain. A records are used to point a domain name \nto an IPv4 address. The record value should be a valid IPv4 address.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "DNSRecord", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/dnsRecord" } } } @@ -25981,72 +26221,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "createRecordA", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "domains\/create-record-a.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", "platforms": [ - "client", - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } @@ -26057,46 +26262,55 @@ "schema": { "type": "object", "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "type": "string", + "description": "IPv4 address for this A record.", + "x-example": null }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" }, - "transactionId": { + "comment": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "" + "description": "A comment explaining what this record is for.", + "default": "", + "x-example": "" } - } + }, + "required": [ + "name", + "value", + "ttl" + ] } } } } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", + "\/domains\/{domainId}\/records\/a\/{recordId}": { + "put": { + "summary": "Update an existing A record for the given domain.", + "operationId": "domainsUpdateRecordA", "tags": [ - "documentsDB" + "domains" ], - "description": "List indexes in the collection.", + "description": "Update an existing A record for the given domain. This endpoint allows you to modify \nthe properties of an A record including its name (subdomain), IPv4 address, TTL, \nand optional comment.", "responses": { "200": { - "description": "Indexes List", + "description": "DNSRecord", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/indexList" + "$ref": "#\/components\/schemas\/dnsRecord" } } } @@ -26104,93 +26318,106 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIndexes", - "group": "indexes", + "method": "updateRecordA", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/list-indexes.md", + "demo": "domains\/update-record-a.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "recordId", + "description": "DNS record unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "IPv4 address for this A record.", + "x-example": null + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment explaining what this record is for.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/aaaa": { "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", + "summary": "Create a new AAAA record for the given domain.", + "operationId": "domainsCreateRecordAAAA", "tags": [ - "documentsDB" + "domains" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record \nto your domain. The record will be used to point a hostname to an IPv6 address.", "responses": { - "202": { - "description": "Index", + "201": { + "description": "DNSRecord", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/dnsRecord" } } } @@ -26198,50 +26425,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIndex", - "group": "indexes", + "method": "createRecordAAAA", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/create-index.md", + "demo": "domains\/create-record-aaaa.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -26252,67 +26466,33 @@ "schema": { "type": "object", "properties": { - "key": { + "name": { "type": "string", - "description": "Index Key.", + "description": "Record name (subdomain).", "x-example": null }, - "type": { + "value": { "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [ - "key", - "fulltext", - "unique" - ] - }, - "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" - } + "description": "IPv6 address for this AAAA record.", + "x-example": null }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] - } + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } + "comment": { + "type": "string", + "description": "A comment explaining what this record is for.", + "default": "", + "x-example": "" } }, "required": [ - "key", - "type", - "attributes" + "name", + "value", + "ttl" ] } } @@ -26320,21 +26500,21 @@ } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", + "\/domains\/{domainId}\/records\/aaaa\/{recordId}": { + "put": { + "summary": "Update an existing AAAA record for the given domain.", + "operationId": "domainsUpdateRecordAAAA", "tags": [ - "documentsDB" + "domains" ], - "description": "Get index by ID.", + "description": "Update an existing AAAA record for the given domain. This endpoint allows you to modify\nthe properties of an existing AAAA record, including its name (subdomain), IPv6 address,\nTTL, and optional comment.", "responses": { "200": { - "description": "Index", + "description": "DNSRecord", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/dnsRecord" } } } @@ -26342,244 +26522,4133 @@ }, "deprecated": false, "x-appwrite": { - "method": "getIndex", - "group": "indexes", + "method": "updateRecordAAAA", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/get-index.md", + "demo": "domains\/update-record-aaaa.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "recordId", + "description": "DNS record unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "IPv6 address for this AAAA record.", + "x-example": null + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/alias": { + "post": { + "summary": "Create a new ALIAS record for the given domain.", + "operationId": "domainsCreateRecordAlias", "tags": [ - "documentsDB" + "domains" ], - "description": "Delete an index.", + "description": "Create a new ALIAS record for the given domain. This record type can be used to point your domain \nto another domain name that will serve as an alias. This is particularly useful when you want to \nmap your domain to a target domain that may change its IP address.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", + "method": "createRecordAlias", + "group": null, "cookies": false, "type": "", - "demo": "documentsdb\/delete-index.md", + "demo": "domains\/create-record-alias.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "domains.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "domainId", + "description": "Domain unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name.", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target domain for this ALIAS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/alias\/{recordId}": { + "put": { + "summary": "Update an existing ALIAS record for the given domain.", + "operationId": "domainsUpdateRecordAlias", + "tags": [ + "domains" + ], + "description": "Update an existing ALIAS record for the specified domain. This endpoint allows you to modify\nthe properties of an existing ALIAS record including its name, target domain, TTL, and comment.\n \nThe ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).\nIt provides a way to map one domain name to another.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordAlias", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-alias.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "recordId", + "description": "DNS record unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name.", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target domain for this ALIAS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/caa": { + "post": { + "summary": "Create a new CAA record for the given domain.", + "operationId": "domainsCreateRecordCAA", + "tags": [ + "domains" + ], + "description": "Create a new CAA record for the given domain. CAA records are used to specify which \nCertificate Authorities (CAs) are allowed to issue SSL\/TLS certificates for your domain.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordCAA", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-caa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name.", + "x-example": null + }, + "value": { + "type": "string", + "description": "CAA value (e.g. issuer domain).", + "x-example": null + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/caa\/{recordId}": { + "put": { + "summary": "Update an existing CAA record for the given domain.", + "operationId": "domainsUpdateRecordCAA", + "tags": [ + "domains" + ], + "description": "Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization) \nrecord is used to specify which certificate authorities (CAs) are authorized to issue certificates \nfor a domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordCAA", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-caa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" }, { - "name": "key", - "description": "Index Key.", + "name": "recordId", + "description": "DNS record unique ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name.", + "x-example": null + }, + "value": { + "type": "string", + "description": "CAA value (e.g. issuer domain).", + "x-example": null + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/cname": { + "post": { + "summary": "Create a new CNAME record for the given domain.", + "operationId": "domainsCreateRecordCNAME", + "tags": [ + "domains" + ], + "description": "Create a new CNAME record for the given domain.\n \nA CNAME record maps a subdomain to another domain name, allowing you to create aliases \nfor your domain. For example, you can create a CNAME record to point 'blog.example.com' \nto 'example.wordpress.com'.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordCNAME", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-cname.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Canonical target for this CNAME record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/cname\/{recordId}": { + "put": { + "summary": "Update an existing CNAME record for the given domain.", + "operationId": "domainsUpdateRecordCNAME", + "tags": [ + "domains" + ], + "description": "Update an existing CNAME record for the given domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordCNAME", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-cname.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/usage": { - "get": { - "summary": "Get collection usage stats", - "operationId": "documentsDBGetCollectionUsage", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Canonical target for this CNAME record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/https": { + "post": { + "summary": "Create a new HTTPS record for the given domain.", + "operationId": "domainsCreateRecordHTTPS", + "tags": [ + "domains" + ], + "description": "Create a new HTTPS record for the given domain. This record is used to configure HTTPS \nsettings for your domain, enabling secure communication over SSL\/TLS.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordHTTPS", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-https.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target for the HTTPS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/https\/{recordId}": { + "put": { + "summary": "Update an existing HTTPS record for the given domain.", + "operationId": "domainsUpdateRecordHTTPS", + "tags": [ + "domains" + ], + "description": "Update an existing HTTPS record for the given domain. This endpoint allows you to modify \nthe properties of an HTTPS record associated with your domain, including the name (subdomain), \ntarget value, TTL, and optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordHTTPS", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-https.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target for the HTTPS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/mx": { + "post": { + "summary": "Create a new MX record for the given domain.", + "operationId": "domainsCreateRecordMX", + "tags": [ + "domains" + ], + "description": "Create a new MX record for the given domain. MX records are used to define the mail servers responsible \nfor accepting email messages for the domain. Multiple MX records can be created with different priorities.\nThe priority parameter determines the order in which mail servers are used, with lower values indicating \nhigher priority.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordMX", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-mx.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Mail server domain for this MX record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "MX priority.", + "x-example": null, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/mx\/{recordId}": { + "put": { + "summary": "Update an existing MX record for the given domain.", + "operationId": "domainsUpdateRecordMX", + "tags": [ + "domains" + ], + "description": "Update an existing MX record for the given domain.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordMX", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-mx.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Mail server domain for this MX record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "MX priority.", + "x-example": null, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/ns": { + "post": { + "summary": "Create a new NS record for the given domain.", + "operationId": "domainsCreateRecordNS", + "tags": [ + "domains" + ], + "description": "Create a new NS record for the given domain. NS records specify the nameservers that are used \nto resolve the domain name to IP addresses. Each domain can have multiple NS records.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordNS", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-ns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Nameserver target for this NS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/ns\/{recordId}": { + "put": { + "summary": "Update an existing NS record for the given domain.", + "operationId": "domainsUpdateRecordNS", + "tags": [ + "domains" + ], + "description": "Update an existing NS record for the given domain. This endpoint allows you to modify \nthe properties of an NS (nameserver) record associated with your domain. You can update \nthe record name (subdomain), target nameserver value, TTL, and add or modify comments \nfor better record management.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordNS", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-ns.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Nameserver target for this NS record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/srv": { + "post": { + "summary": "Create a new SRV record for the given domain.", + "operationId": "domainsCreateRecordSRV", + "tags": [ + "domains" + ], + "description": "Create a new SRV record for the given domain. SRV records are used to define the location \nof servers for specific services. For example, they can be used to specify which server \nhandles a specific service like SIP or XMPP for the domain.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordSRV", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-srv.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (service name).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target hostname for this SRV record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "Record priority.", + "x-example": null, + "format": "int32" + }, + "weight": { + "type": "integer", + "description": "Record weight.", + "x-example": null, + "format": "int32" + }, + "port": { + "type": "integer", + "description": "Port number for the service.", + "x-example": null, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority", + "weight", + "port" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/srv\/{recordId}": { + "put": { + "summary": "Update an existing SRV record for the given domain.", + "operationId": "domainsUpdateRecordSRV", + "tags": [ + "domains" + ], + "description": "Update an existing SRV record for the given domain.\n \nRequired parameters:\n- domainId: Domain unique ID\n- recordId: DNS record unique ID\n- name: Record name (service name)\n- value: Target hostname for this SRV record\n- ttl: Time to live, in seconds\n- priority: Record priority\n- weight: Record weight\n- port: Port number for the service\n \nOptional parameters:\n- comment: A comment for this record", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordSRV", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-srv.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (service name).", + "x-example": null + }, + "value": { + "type": "string", + "description": "Target hostname for this SRV record.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "Record priority.", + "x-example": null, + "format": "int32" + }, + "weight": { + "type": "integer", + "description": "Record weight.", + "x-example": null, + "format": "int32" + }, + "port": { + "type": "integer", + "description": "Port number for the service.", + "x-example": null, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl", + "priority", + "weight", + "port" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/txt": { + "post": { + "summary": "Create a new TXT record for the given domain.", + "operationId": "domainsCreateRecordTXT", + "tags": [ + "domains" + ], + "description": "Create a new TXT record for the given domain. TXT records can be used \nto provide additional information about your domain, such as domain \nverification records, SPF records, or DKIM records.", + "responses": { + "201": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRecordTXT", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/create-record-txt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain) for the TXT record.", + "x-example": null + }, + "value": { + "type": "string", + "description": "TXT record value.", + "default": "", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/txt\/{recordId}": { + "put": { + "summary": "Update an existing TXT record for the given domain.", + "operationId": "domainsUpdateRecordTXT", + "tags": [ + "domains" + ], + "description": "Update an existing TXT record for the given domain.\n \nUpdate the TXT record details for a specific domain by providing the domain ID,\nrecord ID, and the new record configuration including name, value, TTL, and an optional comment.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateRecordTXT", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-record-txt.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Record name (subdomain) for the TXT record.", + "x-example": null + }, + "value": { + "type": "string", + "description": "TXT record value.", + "x-example": "" + }, + "ttl": { + "type": "integer", + "description": "Time to live, in seconds. Must be greater than 0.", + "x-example": 1, + "format": "int32" + }, + "comment": { + "type": "string", + "description": "A comment for this record.", + "default": "", + "x-example": "" + } + }, + "required": [ + "name", + "value", + "ttl" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/records\/{recordId}": { + "get": { + "summary": "Get a single DNS record for a given domain by record ID.", + "operationId": "domainsGetRecord", + "tags": [ + "domains" + ], + "description": "Get a single DNS record for a given domain by record ID.\n \nThis endpoint allows you to retrieve a specific DNS record associated with a domain\nusing its unique identifier. The record contains information about the DNS configuration\nsuch as type, value, and TTL settings.", + "responses": { + "200": { + "description": "DNSRecord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dnsRecord" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRecord", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/get-record.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete a DNS record for the given domain.", + "operationId": "domainsDeleteRecord", + "tags": [ + "domains" + ], + "description": "Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record \nfrom a specific domain.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteRecord", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/delete-record.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "recordId", + "description": "DNS record unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/team": { + "patch": { + "summary": "Update domain team.", + "operationId": "domainsUpdateTeam", + "tags": [ + "domains" + ], + "description": "Update the team ID for a specific domain. This endpoint requires admin access.\n \nUpdating the team ID will transfer ownership and access control of the domain\nand all its DNS records to the new team.", + "responses": { + "200": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "New team unique ID.", + "x-example": "" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/domains\/{domainId}\/transfers\/status": { + "get": { + "summary": "Get domain transfer status.", + "operationId": "domainsGetTransferStatus", + "tags": [ + "domains" + ], + "description": "Retrieve the current transfer status for a domain. Returns the status, an optional reason, and a timestamp of the last status change.", + "responses": { + "200": { + "description": "domainTransferStatus", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domainTransferStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransferStatus", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/get-transfer-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/domains\/{domainId}\/zone": { + "get": { + "summary": "Retrieve the DNS zone file for the given domain.", + "operationId": "domainsGetZone", + "tags": [ + "domains" + ], + "description": "Retrieve the DNS zone file for the given domain. This endpoint will return the DNS\nzone file in a standardized format that can be used to configure DNS servers.", + "responses": { + "200": { + "description": "Text", + "content": { + "text\/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getZone", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/get-zone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update the DNS zone for the given domain using the provided zone file content. All parsed records are imported and then the main domain document is returned.", + "operationId": "domainsUpdateZone", + "tags": [ + "domains" + ], + "description": "Update the DNS zone for the given domain using the provided zone file content.\nAll parsed records are imported and then the main domain document is returned.", + "responses": { + "201": { + "description": "Domain", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/domain" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateZone", + "group": null, + "cookies": false, + "type": "", + "demo": "domains\/update-zone.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "domains.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "DNS zone file content as a string.", + "x-example": "" + } + }, + "required": [ + "content" + ] + } + } + } + } + } + }, + "\/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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "functions", + "cookies": false, + "type": "", + "demo": "functions\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "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, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create function", + "operationId": "functionsCreate", + "tags": [ + "functions" + ], + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "functions", + "cookies": false, + "type": "", + "demo": "functions\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "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": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "Runtime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "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, + "format": "int32" + }, + "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function.", + "default": "", + "x-example": "" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function.", + "default": "", + "x-example": "" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "" + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRuntimes", + "group": "runtimes", + "cookies": false, + "type": "", + "demo": "functions\/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", + "tags": [ + "functions" + ], + "description": "List allowed function specifications for this instance.", + "responses": { + "200": { + "description": "Specifications List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/specificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "runtimes", + "cookies": false, + "type": "", + "demo": "functions\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "type", + "description": "Specification type to list. Can be one of: runtimes, builds.", + "required": false, + "schema": { + "type": "string", + "x-example": "runtimes", + "default": "runtimes" + }, + "in": "query" + } + ] + } + }, + "\/functions\/templates": { + "get": { + "summary": "List templates", + "operationId": "functionsListTemplates", + "tags": [ + "functions" + ], + "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Function Templates List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunctionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTemplates", + "group": "templates", + "cookies": false, + "type": "", + "demo": "functions\/list-templates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "runtimes", + "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "Runtime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "useCases", + "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "starter", + "databases", + "ai", + "messaging", + "utilities", + "dev-tools", + "auth" + ], + "x-enum-name": "FunctionTemplateUseCase", + "x-enum-keys": [ + "starter", + "databases", + "ai", + "messaging", + "utilities", + "dev-tools", + "auth" + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "limit", + "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Offset the list of returned templates. Maximum offset is 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/functions\/templates\/{templateId}": { + "get": { + "summary": "Get function template", + "operationId": "functionsGetTemplate", + "tags": [ + "functions" + ], + "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "responses": { + "200": { + "description": "Template Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/templateFunction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTemplate", + "group": "templates", + "cookies": false, + "type": "", + "demo": "functions\/get-template.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "templateId", + "description": "Template ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "functions", + "cookies": false, + "type": "", + "demo": "functions\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", + "tags": [ + "functions" + ], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/function" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "functions", + "cookies": false, + "type": "", + "demo": "functions\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "Runtime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "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, + "format": "int32" + }, + "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, + "x-example": false + }, + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the function", + "x-example": "", + "x-nullable": true + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "" + }, + "providerSilentMode": { + "type": "boolean", + "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "" + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null, + "x-nullable": true + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "x-example": null, + "x-nullable": true + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", "tags": [ - "documentsDB" + "functions" ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Delete a function by its unique ID.", "responses": { - "200": { - "description": "UsageCollection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageCollection" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getCollectionUsage", - "group": null, + "method": "delete", + "group": "functions", "cookies": false, "type": "", - "demo": "documentsdb\/get-collection-usage.md", + "demo": "functions\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection-usage.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/documentsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get DocumentsDB usage stats", - "operationId": "documentsDBGetUsage", + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", "tags": [ - "documentsDB" + "functions" ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "responses": { "200": { - "description": "UsageDocumentsDB", + "description": "Function", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDocumentsDB" + "$ref": "#\/components\/schemas\/function" } } } @@ -26587,107 +30656,79 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "updateFunctionDeployment", + "group": "functions", "cookies": false, "type": "", - "demo": "documentsdb\/get-usage.md", + "demo": "functions\/update-function-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDocumentsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "documentsdb\/get-usage.md", - "public": true - } - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } } }, - "\/domains": { + "\/functions\/{functionId}\/deployments": { "get": { - "summary": "List domains", - "operationId": "domainsList", + "summary": "List deployments", + "operationId": "functionsListDeployments", "tags": [ - "domains" + "functions" ], - "description": "List all domains registered for this project. This endpoint supports pagination.", + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", "responses": { "200": { - "description": "Domains list", + "description": "Deployments List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainsList" + "$ref": "#\/components\/schemas\/deploymentList" } } } @@ -26695,17 +30736,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": null, + "method": "listDeployments", + "group": "deployments", "cookies": false, "type": "", - "demo": "domains\/list.md", + "demo": "functions\/list-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "functions.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -26715,13 +30757,24 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as domain name, teamInternalId, expiration, etc.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", "required": false, "schema": { "type": "array", @@ -26742,23 +30795,34 @@ "default": "" }, "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, "post": { - "summary": "Create a new domain.", - "operationId": "domainsCreate", + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", "tags": [ - "domains" + "functions" ], - "description": "Create a new domain. Before creating a domain, you need to ensure that your DNS provider is properly configured. After creating the domain, you can use the verification endpoint to check if the domain is ready to be used.", + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "responses": { - "201": { - "description": "Domain", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domain" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -26766,19 +30830,20 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": null, + "method": "createDeployment", + "group": "deployments", "cookies": false, - "type": "", - "demo": "domains\/create.md", + "type": "upload", + "demo": "functions\/create-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], - "packaging": false, + "packaging": true, "public": true, "auth": { "Project": [] @@ -26786,29 +30851,55 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { "content": { - "application\/json": { + "multipart\/form-data": { "schema": { "type": "object", "properties": { - "teamId": { + "entrypoint": { "type": "string", - "description": "Team unique ID.", - "x-example": "" + "description": "Entrypoint File.", + "x-example": "", + "x-nullable": true }, - "domain": { + "commands": { "type": "string", - "description": "Domain name (e.g. \"example.com\").", - "x-example": null + "description": "Build Commands.", + "x-example": "", + "x-nullable": true + }, + "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, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false } }, "required": [ - "teamId", - "domain" + "code", + "activate" ] } } @@ -26816,21 +30907,21 @@ } } }, - "\/domains\/price": { - "get": { - "summary": "Get domain price", - "operationId": "domainsGetPrice", + "\/functions\/{functionId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", "tags": [ - "domains" + "functions" ], - "description": "Get the registration price for a domain name.", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { - "200": { - "description": "DomainPrice", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainPrice" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -26838,17 +30929,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPrice", - "group": null, + "method": "createDuplicateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "domains\/get-price.md", + "demo": "functions\/create-duplicate-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -26858,72 +30950,64 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domain", - "description": "Domain name to get price for.", + "name": "functionId", + "description": "Function ID.", "required": true, - "schema": { - "type": "string" - }, - "in": "query" - }, - { - "name": "periodYears", - "description": "Number of years to calculate the domain price for. Must be at least 1.", - "required": false, - "schema": { - "type": "integer", - "format": "uint32", - "default": 1 - }, - "in": "query" - }, - { - "name": "registrationType", - "description": "Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.", - "required": false, "schema": { "type": "string", - "x-example": "new", - "enum": [ - "new", - "transfer", - "renewal", - "trade" - ], - "x-enum-name": "DomainRegistrationType", - "x-enum-keys": [ - "new", - "transfer", - "renewal", - "trade" - ], - "default": "new" + "x-example": "" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "" + }, + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } } }, - "\/domains\/purchases": { + "\/functions\/{functionId}\/deployments\/template": { "post": { - "summary": "Create a domain purchase", - "operationId": "domainsCreatePurchase", + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", "tags": [ - "domains" + "functions" ], - "description": "Initiate a domain purchase by providing registrant details and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Purchase endpoint to capture the payment and finalize the purchase.", + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", "responses": { - "201": { - "description": "DomainPurchase", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainPurchase" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -26931,17 +31015,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPurchase", - "group": null, + "method": "createTemplateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "domains\/create-purchase.md", + "demo": "functions\/create-template-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -26951,7 +31036,20 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -26960,83 +31058,55 @@ "schema": { "type": "object", "properties": { - "domain": { - "type": "string", - "description": "Fully qualified domain name to purchase (for example, example.com).", - "x-example": null - }, - "organizationId": { - "type": "string", - "description": "Team ID that will own the domain.", - "x-example": "" - }, - "firstName": { - "type": "string", - "description": "Registrant first name used for domain registration.", - "x-example": "" - }, - "lastName": { - "type": "string", - "description": "Registrant last name used for domain registration.", - "x-example": "" - }, - "email": { - "type": "string", - "description": "Registrant email address for registration and notices.", - "x-example": "email@example.com", - "format": "email" - }, - "phone": { + "repository": { "type": "string", - "description": "Registrant phone number in E.164 format (for example, +15555551234).", - "x-example": "+12065550100", - "format": "phone" + "description": "Repository name of the template.", + "x-example": "" }, - "billingAddressId": { + "owner": { "type": "string", - "description": "Billing address ID used for registration contact details.", - "x-example": "" + "description": "The name of the owner of the template.", + "x-example": "" }, - "addressLine3": { + "rootDirectory": { "type": "string", - "description": "Additional address line for the registrant (line 3).", - "default": "", - "x-example": "" + "description": "Path to function code in the template repo.", + "x-example": "" }, - "companyName": { + "type": { "type": "string", - "description": "Company or organization name for the registrant.", - "default": "", - "x-example": "" + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [ + "commit", + "branch", + "tag" + ] }, - "periodYears": { - "type": "integer", - "description": "Registration term in years (1-10).", - "default": 1, - "x-example": 1, - "format": "int32" + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "" }, - "autoRenewal": { + "activate": { "type": "boolean", - "description": "Whether the domain should renew automatically after purchase.", - "default": true, + "description": "Automatically activate the deployment when it is finished building.", + "default": false, "x-example": false - }, - "paymentMethodId": { - "type": "string", - "description": "Payment method ID to authorize and capture the purchase.", - "x-example": "" } }, "required": [ - "domain", - "organizationId", - "firstName", - "lastName", - "email", - "phone", - "billingAddressId", - "paymentMethodId" + "repository", + "owner", + "rootDirectory", + "type", + "reference" ] } } @@ -27044,21 +31114,21 @@ } } }, - "\/domains\/purchases\/{invoiceId}": { - "patch": { - "summary": "Confirm a domain purchase", - "operationId": "domainsUpdatePurchase", + "\/functions\/{functionId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", "tags": [ - "domains" + "functions" ], - "description": "Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.", + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "responses": { - "200": { - "description": "DomainPurchase", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainPurchase" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -27066,17 +31136,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePurchase", - "group": null, + "method": "createVcsDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "domains\/update-purchase.md", + "demo": "functions\/create-vcs-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27086,17 +31157,18 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "invoiceId", - "description": "Invoice ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -27107,14 +31179,35 @@ "schema": { "type": "object", "properties": { - "organizationId": { + "type": { "type": "string", - "description": "Team ID that owns the domain.", - "x-example": "" + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [ + "branch", + "commit" + ] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false } }, "required": [ - "organizationId" + "type", + "reference" ] } } @@ -27122,21 +31215,21 @@ } } }, - "\/domains\/suggestions": { + "\/functions\/{functionId}\/deployments\/{deploymentId}": { "get": { - "summary": "List domain suggestions", - "operationId": "domainsListSuggestions", + "summary": "Get deployment", + "operationId": "functionsGetDeployment", "tags": [ - "domains" + "functions" ], - "description": "List domain suggestions.", + "description": "Get a function deployment by its unique ID.", "responses": { "200": { - "description": "Domain suggestions list", + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainSuggestionsList" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -27144,17 +31237,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSuggestions", - "group": null, + "method": "getDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "domains\/list-suggestions.md", - "rate-limit": 50, + "demo": "functions\/get-deployment.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "functions.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27164,100 +31258,291 @@ }, "security": [ { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", + "tags": [ + "functions" + ], + "description": "Delete a code deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "cookies": false, + "type": "", + "demo": "functions\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { "Project": [] } + }, + "security": [ + { + "Project": [], + "Key": [] + } ], "parameters": [ { - "name": "query", - "description": "Query to find available domains and suggestions. Max length: 256 chars.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "tlds", - "description": "TLDs to suggest.", - "required": false, + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", + "tags": [ + "functions" + ], + "description": "Get a function deployment 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", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "cookies": false, + "type": "location", + "demo": "functions\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "public", + "functions.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "limit", - "description": "Maximum number of suggestions to return.", - "required": false, + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "filterType", - "description": "Filter type: premium, suggestion.", + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", "required": false, "schema": { "type": "string", - "x-example": "premium", + "x-example": "source", "enum": [ - "premium", - "suggestion" + "source", + "output" ], - "x-enum-name": "DomainSuggestionType", + "x-enum-name": "DeploymentDownloadType", "x-enum-keys": [ - "premium", - "suggestion" - ] + "source", + "output" + ], + "default": "source" }, "in": "query" }, { - "name": "priceMax", - "description": "Filter premium domains by maximum price. Only premium domains at or below this price will be returned. Does not affect regular domain suggestions.", + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "x-example": "", + "default": "" }, "in": "query" + } + ] + } + }, + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", + "tags": [ + "functions" + ], + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "responses": { + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateDeploymentStatus", + "group": "deployments", + "cookies": false, + "type": "", + "demo": "functions\/update-deployment-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "priceMin", - "description": "Filter premium domains by minimum price. Only premium domains at or above this price will be returned. Does not affect regular domain suggestions.", - "required": false, + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] } }, - "\/domains\/transfers\/in": { - "post": { - "summary": "Create a domain transfer in.", - "operationId": "domainsCreateTransferIn", + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", "tags": [ - "domains" + "functions" ], - "description": "Initiate a domain transfer-in by providing an authorization code, registrant details, and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Transfer In endpoint to capture the payment and submit the transfer.", + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", "responses": { - "201": { - "description": "DomainPurchase", + "200": { + "description": "Executions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainPurchase" + "$ref": "#\/components\/schemas\/executionList" } } } @@ -27265,17 +31550,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransferIn", - "group": null, + "method": "listExecutions", + "group": "executions", "cookies": false, "type": "", - "demo": "domains\/create-transfer-in.md", + "demo": "functions\/list-executions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, @@ -27285,69 +31575,63 @@ }, "security": [ { - "Project": [] + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name to transfer in.", - "x-example": null - }, - "organizationId": { - "type": "string", - "description": "Organization ID that this domain will belong to.", - "x-example": "" - }, - "authCode": { - "type": "string", - "description": "Authorization code for the domain transfer.", - "x-example": "" - }, - "autoRenewal": { - "type": "boolean", - "description": "Whether the domain should renew automatically after transfer.", - "default": true, - "x-example": false - }, - "paymentMethodId": { - "type": "string", - "description": "Payment method ID to authorize and capture the transfer.", - "x-example": "" - } - }, - "required": [ - "domain", - "organizationId", - "authCode", - "paymentMethodId" - ] - } - } + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/domains\/transfers\/in\/{invoiceId}": { - "patch": { - "summary": "Confirm a domain transfer in", - "operationId": "domainsUpdateTransferIn", + ] + }, + "post": { + "summary": "Create execution", + "operationId": "functionsCreateExecution", "tags": [ - "domains" + "functions" ], - "description": "Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.", + "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": { - "200": { - "description": "DomainPurchase", + "201": { + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainPurchase" + "$ref": "#\/components\/schemas\/execution" } } } @@ -27355,17 +31639,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransferIn", - "group": null, + "method": "createExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "domains\/update-transfer-in.md", + "demo": "functions\/create-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, @@ -27375,17 +31664,20 @@ }, "security": [ { - "Project": [] + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "invoiceId", - "description": "Invoice ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -27396,36 +31688,83 @@ "schema": { "type": "object", "properties": { - "organizationId": { + "body": { "type": "string", - "description": "Team ID that owns the domain.", - "x-example": "" + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "" + }, + "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": "" + }, + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ] + }, + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "organizationId" - ] + } } } } } } }, - "\/domains\/transfers\/out": { - "post": { - "summary": "Create a domain transfer out.", - "operationId": "domainsCreateTransferOut", + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", "tags": [ - "domains" + "functions" ], - "description": "Initiate a domain transfer-out by generating an authorization code for the specified domain. The returned `authCode` should be provided to the gaining provider to complete the transfer. If the domain has auto-renewal enabled, it will be automatically disabled as part of this operation.", + "description": "Get a function execution log by its unique ID.", "responses": { - "202": { - "description": "domainTransferOut", + "200": { + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainTransferOut" + "$ref": "#\/components\/schemas\/execution" } } } @@ -27433,17 +31772,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransferOut", - "group": null, + "method": "getExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "domains\/create-transfer-out.md", + "demo": "functions\/get-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, @@ -27453,69 +31797,64 @@ }, "security": [ { - "Project": [] + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domainId": { - "type": "string", - "description": "Domain unique ID.", - "x-example": "" - }, - "organizationId": { - "type": "string", - "description": "Organization ID that this domain belongs to.", - "x-example": "" - } - }, - "required": [ - "domainId", - "organizationId" - ] - } - } + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } - } - } - }, - "\/domains\/{domainId}": { - "get": { - "summary": "Get a single domain by its unique ID.", - "operationId": "domainsGet", + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", "tags": [ - "domains" + "functions" ], - "description": "Get a domain by its unique ID.", + "description": "Delete a function execution by its unique ID.", "responses": { - "200": { - "description": "Domain", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/domain" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "deleteExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "domains\/get.md", + "demo": "functions\/delete-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27525,91 +31864,132 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete a domain by its unique ID.", - "operationId": "domainsDelete", + } + }, + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", "tags": [ - "domains" + "functions" ], - "description": "Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.\nOnce deleted, the domain will no longer be available for use and all associated resources will be removed.", + "description": "Get a list of all variables of a specific function.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Variables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variableList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": null, + "method": "listVariables", + "group": "variables", "cookies": false, "type": "", - "demo": "domains\/delete.md", + "demo": "functions\/list-variables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "functions.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] - } - }, - "\/domains\/{domainId}\/auto-renewal": { - "patch": { - "summary": "Update domain auto-renewal setting.", - "operationId": "domainsUpdateAutoRenewal", + }, + "post": { + "summary": "Create variable", + "operationId": "functionsCreateVariable", "tags": [ - "domains" + "functions" ], - "description": "Enable or disable auto-renewal for a domain.", + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "responses": { - "200": { - "description": "Domain", + "201": { + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domain" + "$ref": "#\/components\/schemas\/variable" } } } @@ -27617,17 +31997,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateAutoRenewal", - "group": null, + "method": "createVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "domains\/update-auto-renewal.md", + "demo": "functions\/create-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27637,17 +32018,18 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -27658,14 +32040,35 @@ "schema": { "type": "object", "properties": { - "autoRenewal": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "" + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "" + }, + "secret": { "type": "boolean", - "description": "Whether the domain should renew automatically.", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": true, "x-example": false } }, "required": [ - "autoRenewal" + "variableId", + "key", + "value" ] } } @@ -27673,21 +32076,21 @@ } } }, - "\/domains\/{domainId}\/nameservers": { - "patch": { - "summary": "Verify which NS records are used and update the domain accordingly.", - "operationId": "domainsUpdateNameservers", + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", "tags": [ - "domains" + "functions" ], - "description": "Verify which NS records are used and update the domain accordingly. This will check the domain's\nnameservers and update the domain's status based on whether the nameservers match the expected\nAppwrite nameservers.", + "description": "Get a variable by its unique ID.", "responses": { "200": { - "description": "Domain", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domain" + "$ref": "#\/components\/schemas\/variable" } } } @@ -27695,17 +32098,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateNameservers", - "group": null, + "method": "getVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "domains\/update-nameservers.md", + "demo": "functions\/get-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "functions.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27715,56 +32119,157 @@ }, "security": [ { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", + "tags": [ + "functions" + ], + "description": "Update variable by its unique ID.", + "responses": { + "200": { + "description": "Variable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/variable" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVariable", + "group": "variables", + "cookies": false, + "type": "", + "demo": "functions\/update-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { "Project": [] } + }, + "security": [ + { + "Project": [], + "Key": [] + } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } - ] - } - }, - "\/domains\/{domainId}\/presets\/google-workspace": { - "get": { - "summary": "Get Google Workspace preset (Records)", - "operationId": "domainsGetPresetGoogleWorkspace", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Variable key. Max length: 255 chars.", + "x-example": "", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", "tags": [ - "domains" + "functions" ], - "description": "List Google Workspace DNS records.", + "description": "Delete a variable by its unique ID.", "responses": { - "201": { - "description": "DNS records list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getPresetGoogleWorkspace", - "group": null, + "method": "deleteVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "domains\/get-preset-google-workspace.md", + "demo": "functions\/delete-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "functions.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -27774,36 +32279,49 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } ] - }, + } + }, + "\/graphql": { "post": { - "summary": "Create Google Workspace preset (Records)", - "operationId": "domainsCreatePresetGoogleWorkspace", + "summary": "GraphQL endpoint", + "operationId": "graphqlQuery", "tags": [ - "domains" + "graphql" ], - "description": "Add Google Workspace DNS records to the domain. This will create the required MX records \nfor Google Workspace email hosting.", + "description": "Execute a GraphQL mutation.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/any" } } } @@ -27811,58 +32329,72 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetGoogleWorkspace", - "group": null, + "method": "query", + "group": "graphql", "cookies": false, - "type": "", - "demo": "domains\/create-preset-google-workspace.md", - "rate-limit": 0, - "rate-time": 3600, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "graphql", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } } - ] + } } }, - "\/domains\/{domainId}\/presets\/icloud": { - "get": { - "summary": "Get iCloud preset (Records)", - "operationId": "domainsGetPresetICloud", + "\/graphql\/mutation": { + "post": { + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", "tags": [ - "domains" + "graphql" ], - "description": "List iCloud DNS records.", + "description": "Execute a GraphQL mutation.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/any" } } } @@ -27870,56 +32402,72 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPresetICloud", - "group": null, + "method": "mutation", + "group": "graphql", "cookies": false, - "type": "", - "demo": "domains\/get-preset-i-cloud.md", - "rate-limit": 0, - "rate-time": 3600, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "graphql", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "query" + ] + } + } } - ] - }, - "post": { - "summary": "Create iCloud preset (Records)", - "operationId": "domainsCreatePresetICloud", + } + } + }, + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", "tags": [ - "domains" + "locale" ], - "description": "Add iCloud DNS records to the domain. This will create the required MX and SPF records\nfor using iCloud email services with your domain.", + "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": { - "201": { - "description": "DNS records list", + "200": { + "description": "Locale", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/locale" } } } @@ -27927,58 +32475,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetICloud", + "method": "get", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-preset-i-cloud.md", + "demo": "locale\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] } }, - "\/domains\/{domainId}\/presets\/mailgun": { + "\/locale\/codes": { "get": { - "summary": "Get Mailgun preset (Records)", - "operationId": "domainsGetPresetMailgun", + "summary": "List locale codes", + "operationId": "localeListCodes", "tags": [ - "domains" + "locale" ], - "description": "List Mailgun DNS records.", + "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Locale codes list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/localeCodeList" } } } @@ -27986,56 +32528,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPresetMailgun", + "method": "listCodes", "group": null, "cookies": false, "type": "", - "demo": "domains\/get-preset-mailgun.md", + "demo": "locale\/list-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] - }, - "post": { - "summary": "Create Mailgun preset (Records)", - "operationId": "domainsCreatePresetMailgun", + } + }, + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", "tags": [ - "domains" + "locale" ], - "description": "Add Mailgun DNS records to the domain. This endpoint will create the required DNS records \nfor Mailgun in the specified domain.", + "description": "List of all continents. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Continents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/continentList" } } } @@ -28043,58 +32581,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetMailgun", + "method": "listContinents", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-preset-mailgun.md", + "demo": "locale\/list-continents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] } }, - "\/domains\/{domainId}\/presets\/outlook": { + "\/locale\/countries": { "get": { - "summary": "Get Outlook preset (Records)", - "operationId": "domainsGetPresetOutlook", + "summary": "List countries", + "operationId": "localeListCountries", "tags": [ - "domains" + "locale" ], - "description": "List Outlook DNS records.", + "description": "List of all countries. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/countryList" } } } @@ -28102,56 +32634,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPresetOutlook", + "method": "listCountries", "group": null, "cookies": false, "type": "", - "demo": "domains\/get-preset-outlook.md", + "demo": "locale\/list-countries.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] - }, - "post": { - "summary": "Create Outlook preset (Records)", - "operationId": "domainsCreatePresetOutlook", + } + }, + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", "tags": [ - "domains" + "locale" ], - "description": "Add Outlook DNS records to the domain. This will create the required MX records\nfor setting up Outlook email hosting for your domain.", + "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": { - "201": { - "description": "DNS records list", + "200": { + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/countryList" } } } @@ -28159,58 +32687,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetOutlook", + "method": "listCountriesEU", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-preset-outlook.md", + "demo": "locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] } }, - "\/domains\/{domainId}\/presets\/proton-mail": { + "\/locale\/countries\/phones": { "get": { - "summary": "Get ProtonMail preset (Records)", - "operationId": "domainsGetPresetProtonMail", + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", "tags": [ - "domains" + "locale" ], - "description": "List ProtonMail DNS records.", + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Phones List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/phoneList" } } } @@ -28218,56 +32740,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPresetProtonMail", + "method": "listCountriesPhones", "group": null, "cookies": false, "type": "", - "demo": "domains\/get-preset-proton-mail.md", + "demo": "locale\/list-countries-phones.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] - }, - "post": { - "summary": "Create ProtonMail preset (Records)", - "operationId": "domainsCreatePresetProtonMail", + } + }, + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", "tags": [ - "domains" + "locale" ], - "description": "Add ProtonMail DNS records to the domain. This will create the required MX records\nfor using ProtonMail with your custom domain.", + "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": { - "201": { - "description": "DNS records list", + "200": { + "description": "Currencies List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/currencyList" } } } @@ -28275,58 +32793,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetProtonMail", + "method": "listCurrencies", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-preset-proton-mail.md", + "demo": "locale\/list-currencies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] } }, - "\/domains\/{domainId}\/presets\/zoho": { + "\/locale\/languages": { "get": { - "summary": "Get Zoho preset (Records)", - "operationId": "domainsGetPresetZoho", + "summary": "List languages", + "operationId": "localeListLanguages", "tags": [ - "domains" + "locale" ], - "description": "List Zoho DNS records.", + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", "responses": { - "201": { - "description": "DNS records list", + "200": { + "description": "Languages List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/languageList" } } } @@ -28334,56 +32846,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPresetZoho", + "method": "listLanguages", "group": null, "cookies": false, "type": "", - "demo": "domains\/get-preset-zoho.md", + "demo": "locale\/list-languages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "locale.read", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ] - }, + } + }, + "\/manager\/blocks": { "post": { - "summary": "Create Zoho Mail preset (Records)", - "operationId": "domainsCreatePresetZoho", + "summary": "Create a new resource block for a project", + "operationId": "managerCreateBlock", "tags": [ - "domains" + "manager" ], - "description": "Add Zoho Mail DNS records to the domain. This will create the required MX records\nfor setting up Zoho Mail on your domain.", + "description": "Creates a new resource block.", "responses": { "201": { - "description": "DNS records list", + "description": "Block", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/block" } } } @@ -28391,58 +32899,118 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPresetZoho", + "method": "createBlock", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-preset-zoho.md", + "demo": "manager\/create-block.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "", "platforms": [ "console" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } + "public": true }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Project ID", + "x-example": "" + }, + "resourceType": { + "type": "string", + "description": "Resource type to block (e.g., projects, functions, databases, storage, etc.)", + "x-example": "projects", + "enum": [ + "projects", + "functions", + "sites", + "databases", + "buckets", + "providers", + "topics", + "subscribers", + "messages" + ], + "x-enum-name": "BlockResourceType", + "x-enum-keys": [ + "projects", + "functions", + "sites", + "databases", + "buckets", + "providers", + "topics", + "subscribers", + "messages" + ] + }, + "resourceId": { + "type": "string", + "description": "Optional resource ID (if omitted, all resources of this type will be blocked)", + "default": "", + "x-example": "" + }, + "mode": { + "type": "string", + "description": "Block mode. Use full to block reads and writes, or readOnly to block database writes only.", + "default": "full", + "x-example": "full", + "enum": [ + "full", + "readonly" + ], + "x-enum-name": "BlockMode", + "x-enum-keys": [ + "full", + "readonly" + ] + }, + "reason": { + "type": "string", + "description": "Optional reason why the resource is blocked", + "default": "", + "x-example": "" + }, + "expiredAt": { + "type": "string", + "description": "Optional expiration date for the block", + "default": "", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + } + }, + "required": [ + "projectId", + "resourceType" + ] + } + } } - ] - } - }, - "\/domains\/{domainId}\/records": { - "get": { - "summary": "List DNS records for a given domain.", - "operationId": "domainsListRecords", + } + }, + "delete": { + "summary": "Delete resource blocks for a project", + "operationId": "managerDeleteBlock", "tags": [ - "domains" + "manager" ], - "description": "List DNS records for a given domain. You can use this endpoint to list all the DNS records\nassociated with your domain.", + "description": "Deletes resource blocks for a project.", "responses": { "200": { - "description": "DNS records list", + "description": "BlockDelete", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecordsList" + "$ref": "#\/components\/schemas\/blockDelete" } } } @@ -28450,71 +33018,94 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRecords", + "method": "deleteBlock", "group": null, "cookies": false, "type": "", - "demo": "domains\/list-records.md", + "demo": "manager\/delete-block.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "", "platforms": [ "console" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } + "public": true }, - "security": [ - { - "Project": [] - } - ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, + "name": "projectId", + "description": "Project ID", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "" }, "in": "query" }, { - "name": "domainId", - "description": "Domain unique ID.", + "name": "resourceType", + "description": "Resource type to unblock", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "projects", + "enum": [ + "projects", + "functions", + "sites", + "databases", + "buckets", + "providers", + "topics", + "subscribers", + "messages" + ], + "x-enum-name": "BlockResourceType", + "x-enum-keys": [ + "projects", + "functions", + "sites", + "databases", + "buckets", + "providers", + "topics", + "subscribers", + "messages" + ] }, - "in": "path" + "in": "query" + }, + { + "name": "resourceId", + "description": "Optional resource ID (if omitted, all blocks of this type will be removed)", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } ] } }, - "\/domains\/{domainId}\/records\/a": { - "post": { - "summary": "Create a new A record for the given domain.", - "operationId": "domainsCreateRecordA", + "\/manager\/blocks\/{projectId}": { + "get": { + "summary": "List all resource blocks for a project", + "operationId": "managerListBlocks", "tags": [ - "domains" + "manager" ], - "description": "Create a new A record for the given domain. A records are used to point a domain name \nto an IPv4 address. The record value should be a valid IPv4 address.", + "description": "Lists all resource blocks for a project.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Blocks list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/blockList" } } } @@ -28522,96 +33113,51 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordA", + "method": "listBlocks", "group": null, "cookies": false, "type": "", - "demo": "domains\/create-record-a.md", + "demo": "manager\/list-blocks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "", "platforms": [ "console" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } + "public": true }, - "security": [ - { - "Project": [] - } - ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "projectId", + "description": "Project ID", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "IPv4 address for this A record.", - "x-example": null - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment explaining what this record is for.", - "default": "", - "x-example": "" - } - }, - "required": [ - "name", - "value", - "ttl" - ] - } - } - } - } + ] } }, - "\/domains\/{domainId}\/records\/a\/{recordId}": { - "put": { - "summary": "Update an existing A record for the given domain.", - "operationId": "domainsUpdateRecordA", + "\/manager\/cache": { + "delete": { + "summary": "Clear internal cache", + "operationId": "managerDeleteCache", "tags": [ - "domains" + "manager" ], - "description": "Update an existing A record for the given domain. This endpoint allows you to modify \nthe properties of an A record including its name (subdomain), IPv4 address, TTL, \nand optional comment.", + "description": "Clears internal cache.", "responses": { "200": { - "description": "DNSRecord", + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "type": "string", + "format": "binary" } } } @@ -28619,106 +33165,161 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordA", - "group": null, + "method": "deleteCache", + "group": "cache", "cookies": false, "type": "", - "demo": "domains\/update-record-a.md", + "demo": "manager\/delete-cache.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "", "platforms": [ "console" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } + "public": true }, - "security": [ - { - "Project": [] - } - ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, + "name": "region", + "description": "Target region.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region", + "x-enum-keys": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ] }, - "in": "path" + "in": "query" }, { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, + "name": "cache", + "description": "Cache target.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "cache", + "enum": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "x-enum-name": "CacheTarget", + "x-enum-keys": [ + "cache", + "timelimit", + "locks", + "pubsub", + "queue", + "all" + ], + "default": "cache" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "IPv4 address for this A record.", - "x-example": null - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment explaining what this record is for.", - "default": "", - "x-example": "" - } - }, - "required": [ - "name", - "value", - "ttl" - ] - } - } + "in": "query" + }, + { + "name": "all", + "description": "Clear the entire selected cache target.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": false + }, + "in": "query" + }, + { + "name": "database", + "description": "Database cache scope.", + "required": false, + "schema": { + "type": "string", + "x-example": "console", + "enum": [ + "console", + "project", + "logs" + ], + "x-enum-name": "CacheDatabase", + "x-enum-keys": [ + "console", + "project", + "logs" + ], + "default": "console" + }, + "in": "query" + }, + { + "name": "projectId", + "description": "Project ID for project or logs database cache.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } - } + ] } }, - "\/domains\/{domainId}\/records\/aaaa": { - "post": { - "summary": "Create a new AAAA record for the given domain.", - "operationId": "domainsCreateRecordAAAA", + "\/manager\/users\/status": { + "patch": { + "summary": "Update a user status by ID or email", + "operationId": "managerUpdateUserStatus", "tags": [ - "domains" + "manager" ], - "description": "Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record \nto your domain. The record will be used to point a hostname to an IPv6 address.", + "description": "Updates a console user status using a user ID or email address.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/user" } } } @@ -28726,74 +33327,53 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordAAAA", - "group": null, + "method": "updateUserStatus", + "group": "users", "cookies": false, "type": "", - "demo": "domains\/create-record-aaaa.md", + "demo": "manager\/update-user-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "", "platforms": [ "console" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } + "public": true }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "name": { + "userId": { "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "description": "User ID.", + "default": "", + "x-example": "" }, - "value": { + "email": { "type": "string", - "description": "IPv6 address for this AAAA record.", - "x-example": null + "description": "User email address.", + "default": "", + "x-example": "" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "status": { + "type": "boolean", + "description": "User status. Set to `false` to block and `true` to unblock.", + "x-example": false }, - "comment": { + "reason": { "type": "string", - "description": "A comment explaining what this record is for.", + "description": "Optional reason when blocking a user. Accepted for parity with the CLI task but not persisted.", "default": "", - "x-example": "" + "x-example": "" } }, "required": [ - "name", - "value", - "ttl" + "status" ] } } @@ -28801,21 +33381,21 @@ } } }, - "\/domains\/{domainId}\/records\/aaaa\/{recordId}": { - "put": { - "summary": "Update an existing AAAA record for the given domain.", - "operationId": "domainsUpdateRecordAAAA", + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing AAAA record for the given domain. This endpoint allows you to modify\nthe properties of an existing AAAA record, including its name (subdomain), IPv6 address,\nTTL, and optional comment.", + "description": "Get a list of all messages from the current Appwrite project.", "responses": { "200": { - "description": "DNSRecord", + "description": "Message list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/messageList" } } } @@ -28823,106 +33403,86 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordAAAA", - "group": null, + "method": "listMessages", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/update-record-aaaa.md", + "demo": "messaging\/list-messages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "IPv6 address for this AAAA record.", - "x-example": null - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "" - } - }, - "required": [ - "name", - "value", - "ttl" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/domains\/{domainId}\/records\/alias": { + "\/messaging\/messages\/email": { "post": { - "summary": "Create a new ALIAS record for the given domain.", - "operationId": "domainsCreateRecordAlias", + "summary": "Create email", + "operationId": "messagingCreateEmail", "tags": [ - "domains" + "messaging" ], - "description": "Create a new ALIAS record for the given domain. This record type can be used to point your domain \nto another domain name that will serve as an alias. This is particularly useful when you want to \nmap your domain to a target domain that may change its IP address.", + "description": "Create a new email message.", "responses": { "201": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } @@ -28930,39 +33490,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordAlias", - "group": null, + "method": "createEmail", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/create-record-alias.md", + "demo": "messaging\/create-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -28971,33 +33522,102 @@ "schema": { "type": "object", "properties": { - "name": { + "messageId": { "type": "string", - "description": "Record name.", - "x-example": null + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "value": { + "subject": { "type": "string", - "description": "Target domain for this ALIAS record.", - "x-example": "" + "description": "Email Subject.", + "x-example": "" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "" }, - "comment": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "default": false, + "x-example": false + }, + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "" + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl" + "messageId", + "subject", + "content" ] } } @@ -29005,21 +33625,21 @@ } } }, - "\/domains\/{domainId}\/records\/alias\/{recordId}": { - "put": { - "summary": "Update an existing ALIAS record for the given domain.", - "operationId": "domainsUpdateRecordAlias", + "\/messaging\/messages\/email\/{messageId}": { + "patch": { + "summary": "Update email", + "operationId": "messagingUpdateEmail", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing ALIAS record for the specified domain. This endpoint allows you to modify\nthe properties of an existing ALIAS record including its name, target domain, TTL, and comment.\n \nThe ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).\nIt provides a way to map one domain name to another.", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } @@ -29027,47 +33647,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordAlias", - "group": null, + "method": "updateEmail", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/update-record-alias.md", + "demo": "messaging\/update-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } @@ -29078,55 +33691,113 @@ "schema": { "type": "object", "properties": { - "name": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "subject": { "type": "string", - "description": "Record name.", - "x-example": null + "description": "Email Subject.", + "x-example": "", + "x-nullable": true }, - "value": { + "content": { "type": "string", - "description": "Target domain for this ALIAS record.", - "x-example": "" + "description": "Email Content.", + "x-example": "", + "x-nullable": true }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true }, - "comment": { + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "" - } - }, - "required": [ - "name", - "value", - "ttl" - ] + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + } + } } } } } } }, - "\/domains\/{domainId}\/records\/caa": { + "\/messaging\/messages\/push": { "post": { - "summary": "Create a new CAA record for the given domain.", - "operationId": "domainsCreateRecordCAA", + "summary": "Create push notification", + "operationId": "messagingCreatePush", "tags": [ - "domains" + "messaging" ], - "description": "Create a new CAA record for the given domain. CAA records are used to specify which \nCertificate Authorities (CAs) are allowed to issue SSL\/TLS certificates for your domain.", + "description": "Create a new push notification.", "responses": { "201": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } @@ -29134,39 +33805,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordCAA", - "group": null, + "method": "createPush", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/create-record-caa.md", + "demo": "messaging\/create-push.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -29175,33 +33837,146 @@ "schema": { "type": "object", "properties": { - "name": { + "messageId": { "type": "string", - "description": "Record name.", - "x-example": null + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "value": { + "title": { "type": "string", - "description": "CAA value (e.g. issuer domain).", - "x-example": null + "description": "Title for push notification.", + "default": "", + "x-example": "" }, - "ttl": { + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null, "format": "int32" }, - "comment": { + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [ + "normal", + "high" + ] } }, "required": [ - "name", - "value", - "ttl" + "messageId" ] } } @@ -29209,21 +33984,21 @@ } } }, - "\/domains\/{domainId}\/records\/caa\/{recordId}": { - "put": { - "summary": "Update an existing CAA record for the given domain.", - "operationId": "domainsUpdateRecordCAA", + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization) \nrecord is used to specify which certificate authorities (CAs) are authorized to issue certificates \nfor a domain.", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } @@ -29231,47 +34006,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordCAA", - "group": null, + "method": "updatePush", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/update-record-caa.md", + "demo": "messaging\/update-push.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<RECORD_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" } @@ -29282,95 +34050,258 @@ "schema": { "type": "object", "properties": { - "name": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "title": { "type": "string", - "description": "Record name.", - "x-example": null + "description": "Title for push notification.", + "x-example": "<TITLE>", + "x-nullable": true }, - "value": { + "body": { "type": "string", - "description": "CAA value (e.g. issuer domain).", - "x-example": null + "description": "Body for push notification.", + "x-example": "<BODY>", + "x-nullable": true }, - "ttl": { + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "description": "Badge for push notification. Available only for iOS platforms.", + "x-example": null, + "format": "int32", + "x-nullable": true }, - "comment": { + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [ + "normal", + "high" + ], + "x-nullable": true } - }, - "required": [ - "name", - "value", - "ttl" - ] + } } } } } } }, - "\/domains\/{domainId}\/records\/cname": { + "\/messaging\/messages\/sms": { "post": { - "summary": "Create a new CNAME record for the given domain.", - "operationId": "domainsCreateRecordCNAME", + "summary": "Create SMS", + "operationId": "messagingCreateSms", "tags": [ - "domains" + "messaging" ], - "description": "Create a new CNAME record for the given domain.\n \nA CNAME record maps a subdomain to another domain name, allowing you to create aliases \nfor your domain. For example, you can create a CNAME record to point 'blog.example.com' \nto 'example.wordpress.com'.", + "description": "Create a new SMS message.", "responses": { "201": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRecordCNAME", - "group": null, + "method": "createSms", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/create-record-cname.md", + "demo": "messaging\/create-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + }, + "methods": [ + { + "name": "createSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMS" + } + }, + { + "name": "createSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" + ], + "required": [ + "messageId", + "content" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -29379,33 +34310,63 @@ "schema": { "type": "object", "properties": { - "name": { + "messageId": { "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "content": { + "type": "string", + "description": "SMS Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "value": { - "type": "string", - "description": "Canonical target for this CNAME record.", - "x-example": "<VALUE>" + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "comment": { + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl" + "messageId", + "content" ] } } @@ -29413,69 +34374,130 @@ } } }, - "\/domains\/{domainId}\/records\/cname\/{recordId}": { - "put": { - "summary": "Update an existing CNAME record for the given domain.", - "operationId": "domainsUpdateRecordCNAME", + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing CNAME record for the given domain.", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { - "description": "DNSRecord", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRecordCNAME", - "group": null, + "method": "updateSms", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/update-record-cname.md", + "demo": "messaging\/update-sms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + }, + "methods": [ + { + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<RECORD_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" } @@ -29486,55 +34508,74 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true }, - "value": { + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "content": { "type": "string", - "description": "Canonical target for this CNAME record.", - "x-example": "<VALUE>" + "description": "Email Content.", + "x-example": "<CONTENT>", + "x-nullable": true }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true }, - "comment": { + "scheduledAt": { "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } - }, - "required": [ - "name", - "value", - "ttl" - ] + } } } } } } }, - "\/domains\/{domainId}\/records\/https": { - "post": { - "summary": "Create a new HTTPS record for the given domain.", - "operationId": "domainsCreateRecordHTTPS", + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", "tags": [ - "domains" + "messaging" ], - "description": "Create a new HTTPS record for the given domain. This record is used to configure HTTPS \nsettings for your domain, enabling secure communication over SSL\/TLS.", + "description": "Get a message by its unique ID.\n", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/message" } } } @@ -29542,203 +34583,114 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordHTTPS", - "group": null, + "method": "getMessage", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/create-record-https.md", + "demo": "messaging\/get-message.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "Target for the HTTPS record.", - "x-example": "<VALUE>" - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" - } - }, - "required": [ - "name", - "value", - "ttl" - ] - } - } - } - } - } - }, - "\/domains\/{domainId}\/records\/https\/{recordId}": { - "put": { - "summary": "Update an existing HTTPS record for the given domain.", - "operationId": "domainsUpdateRecordHTTPS", + ] + }, + "delete": { + "summary": "Delete message", + "operationId": "messagingDelete", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing HTTPS record for the given domain. This endpoint allows you to modify \nthe properties of an HTTPS record associated with your domain, including the name (subdomain), \ntarget value, TTL, and optional comment.", + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", "responses": { - "200": { - "description": "DNSRecord", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateRecordHTTPS", - "group": null, + "method": "delete", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/update-record-https.md", + "demo": "messaging\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<RECORD_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "Target for the HTTPS record.", - "x-example": "<VALUE>" - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" - } - }, - "required": [ - "name", - "value", - "ttl" - ] - } - } - } - } + ] } }, - "\/domains\/{domainId}\/records\/mx": { - "post": { - "summary": "Create a new MX record for the given domain.", - "operationId": "domainsCreateRecordMX", + "\/messaging\/messages\/{messageId}\/targets": { + "get": { + "summary": "List message targets", + "operationId": "messagingListTargets", "tags": [ - "domains" + "messaging" ], - "description": "Create a new MX record for the given domain. MX records are used to define the mail servers responsible \nfor accepting email messages for the domain. Multiple MX records can be created with different priorities.\nThe priority parameter determines the order in which mail servers are used, with lower values indicating \nhigher priority.", + "description": "Get a list of the targets associated with a message.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Target list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/targetList" } } } @@ -29746,103 +34698,85 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordMX", - "group": null, + "method": "listTargets", + "group": "messages", "cookies": false, "type": "", - "demo": "domains\/create-record-mx.md", + "demo": "messaging\/list-targets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "messages.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Record name (subdomain).", - "x-example": null - }, - "value": { - "type": "string", - "description": "Mail server domain for this MX record.", - "x-example": "<VALUE>" - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "priority": { - "type": "integer", - "description": "MX priority.", - "x-example": null, - "format": "int32" - }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" - } - }, - "required": [ - "name", - "value", - "ttl", - "priority" - ] - } - } - } - } + ] } }, - "\/domains\/{domainId}\/records\/mx\/{recordId}": { - "put": { - "summary": "Update an existing MX record for the given domain.", - "operationId": "domainsUpdateRecordMX", + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing MX record for the given domain.", + "description": "Get a list of all providers from the current Appwrite project.", "responses": { "200": { - "description": "DNSRecord", + "description": "Provider list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/providerList" } } } @@ -29850,49 +34784,189 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordMX", - "group": null, + "method": "listProviders", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-record-mx.md", + "demo": "messaging\/list-providers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<RECORD_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Apple Push Notification service provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createApnsProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] } ], "requestBody": { @@ -29901,40 +34975,59 @@ "schema": { "type": "object", "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "name": { "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "description": "Provider name.", + "x-example": "<NAME>" }, - "value": { + "authKey": { "type": "string", - "description": "Mail server domain for this MX record.", - "x-example": "<VALUE>" + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" }, - "priority": { - "type": "integer", - "description": "MX priority.", - "x-example": null, - "format": "int32" + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" }, - "comment": { + "bundleId": { "type": "string", - "description": "A comment for this record.", + "description": "APNS bundle ID.", "default": "", - "x-example": "<COMMENT>" + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl", - "priority" + "providerId", + "name" ] } } @@ -29942,59 +35035,132 @@ } } }, - "\/domains\/{domainId}\/records\/ns": { - "post": { - "summary": "Create a new NS record for the given domain.", - "operationId": "domainsCreateRecordNS", + "\/messaging\/providers\/apns\/{providerId}": { + "patch": { + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", "tags": [ - "domains" + "messaging" ], - "description": "Create a new NS record for the given domain. NS records specify the nameservers that are used \nto resolve the domain name to IP addresses. Each domain can have multiple NS records.", + "description": "Update a Apple Push Notification service provider by its unique ID.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRecordNS", - "group": null, + "method": "updateApnsProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/create-record-ns.md", + "demo": "messaging\/update-apns-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -30007,103 +35173,163 @@ "properties": { "name": { "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "value": { + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "authKey": { "type": "string", - "description": "Nameserver target for this NS record.", - "x-example": "<VALUE>" + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" }, - "comment": { + "teamId": { "type": "string", - "description": "A comment for this record.", + "description": "APNS team ID.", "default": "", - "x-example": "<COMMENT>" + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "name", - "value", - "ttl" - ] + } } } } } } }, - "\/domains\/{domainId}\/records\/ns\/{recordId}": { - "put": { - "summary": "Update an existing NS record for the given domain.", - "operationId": "domainsUpdateRecordNS", + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing NS record for the given domain. This endpoint allows you to modify \nthe properties of an NS (nameserver) record associated with your domain. You can update \nthe record name (subdomain), target nameserver value, TTL, and add or modify comments \nfor better record management.", + "description": "Create a new Firebase Cloud Messaging provider.", "responses": { - "200": { - "description": "DNSRecord", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateRecordNS", - "group": null, + "method": "createFcmProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-record-ns.md", + "demo": "messaging\/create-fcm-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } ], - "packaging": false, - "public": true, "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RECORD_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -30112,33 +35338,36 @@ "schema": { "type": "object", "properties": { - "name": { + "providerId": { "type": "string", - "description": "Record name (subdomain).", - "x-example": null + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "value": { + "name": { "type": "string", - "description": "Nameserver target for this NS record.", - "x-example": "<VALUE>" + "description": "Provider name.", + "x-example": "<NAME>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl" + "providerId", + "name" ] } } @@ -30146,59 +35375,124 @@ } } }, - "\/domains\/{domainId}\/records\/srv": { - "post": { - "summary": "Create a new SRV record for the given domain.", - "operationId": "domainsCreateRecordSRV", + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", "tags": [ - "domains" + "messaging" ], - "description": "Create a new SRV record for the given domain. SRV records are used to define the location \nof servers for specific services. For example, they can be used to specify which server \nhandles a specific service like SIP or XMPP for the domain.", + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createRecordSRV", - "group": null, + "method": "updateFcmProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/create-record-srv.md", + "demo": "messaging\/update-fcm-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -30211,74 +35505,45 @@ "properties": { "name": { "type": "string", - "description": "Record name (service name).", - "x-example": null - }, - "value": { - "type": "string", - "description": "Target hostname for this SRV record.", - "x-example": "<VALUE>" - }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" - }, - "priority": { - "type": "integer", - "description": "Record priority.", - "x-example": null, - "format": "int32" - }, - "weight": { - "type": "integer", - "description": "Record weight.", - "x-example": null, - "format": "int32" + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "port": { - "type": "integer", - "description": "Port number for the service.", - "x-example": null, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "comment": { - "type": "string", - "description": "A comment for this record.", - "default": "", - "x-example": "<COMMENT>" + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true } - }, - "required": [ - "name", - "value", - "ttl", - "priority", - "weight", - "port" - ] + } } } } } } }, - "\/domains\/{domainId}\/records\/srv\/{recordId}": { - "put": { - "summary": "Update an existing SRV record for the given domain.", - "operationId": "domainsUpdateRecordSRV", + "\/messaging\/providers\/mailgun": { + "post": { + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing SRV record for the given domain.\n \nRequired parameters:\n- domainId: Domain unique ID\n- recordId: DNS record unique ID\n- name: Record name (service name)\n- value: Target hostname for this SRV record\n- ttl: Time to live, in seconds\n- priority: Record priority\n- weight: Record weight\n- port: Port number for the service\n \nOptional parameters:\n- comment: A comment for this record", + "description": "Create a new Mailgun provider.", "responses": { - "200": { - "description": "DNSRecord", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30286,49 +35551,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordSRV", - "group": null, + "method": "createMailgunProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-record-srv.md", + "demo": "messaging\/create-mailgun-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RECORD_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -30337,54 +35583,73 @@ "schema": { "type": "object", "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "name": { "type": "string", - "description": "Record name (service name).", - "x-example": null + "description": "Provider name.", + "x-example": "<NAME>" }, - "value": { + "apiKey": { "type": "string", - "description": "Target hostname for this SRV record.", - "x-example": "<VALUE>" + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" }, - "priority": { - "type": "integer", - "description": "Record priority.", - "x-example": null, - "format": "int32" + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true }, - "weight": { - "type": "integer", - "description": "Record weight.", - "x-example": null, - "format": "int32" + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" }, - "port": { - "type": "integer", - "description": "Port number for the service.", - "x-example": null, - "format": "int32" + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" }, - "comment": { + "replyToName": { "type": "string", - "description": "A comment for this record.", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", "default": "", - "x-example": "<COMMENT>" + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl", - "priority", - "weight", - "port" + "providerId", + "name" ] } } @@ -30392,21 +35657,21 @@ } } }, - "\/domains\/{domainId}\/records\/txt": { - "post": { - "summary": "Create a new TXT record for the given domain.", - "operationId": "domainsCreateRecordTXT", + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", "tags": [ - "domains" + "messaging" ], - "description": "Create a new TXT record for the given domain. TXT records can be used \nto provide additional information about your domain, such as domain \nverification records, SPF records, or DKIM records.", + "description": "Update a Mailgun provider by its unique ID.", "responses": { - "201": { - "description": "DNSRecord", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30414,37 +35679,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRecordTXT", - "group": null, + "method": "updateMailgunProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/create-record-txt.md", + "demo": "messaging\/update-mailgun-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -30457,53 +35725,81 @@ "properties": { "name": { "type": "string", - "description": "Record name (subdomain) for the TXT record.", - "x-example": null + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "value": { + "apiKey": { "type": "string", - "description": "TXT record value.", + "description": "Mailgun API Key.", "default": "", - "x-example": "<VALUE>" + "x-example": "<API_KEY>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" }, - "comment": { + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "fromName": { "type": "string", - "description": "A comment for this record.", + "description": "Sender Name.", "default": "", - "x-example": "<COMMENT>" + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" } - }, - "required": [ - "name", - "ttl" - ] + } } } } } } }, - "\/domains\/{domainId}\/records\/txt\/{recordId}": { - "put": { - "summary": "Update an existing TXT record for the given domain.", - "operationId": "domainsUpdateRecordTXT", + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", "tags": [ - "domains" + "messaging" ], - "description": "Update an existing TXT record for the given domain.\n \nUpdate the TXT record details for a specific domain by providing the domain ID,\nrecord ID, and the new record configuration including name, value, TTL, and an optional comment.", + "description": "Create a new MSG91 provider.", "responses": { - "200": { - "description": "DNSRecord", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30511,49 +35807,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRecordTXT", - "group": null, + "method": "createMsg91Provider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-record-txt.md", + "demo": "messaging\/create-msg-91-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RECORD_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -30562,33 +35839,47 @@ "schema": { "type": "object", "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "name": { "type": "string", - "description": "Record name (subdomain) for the TXT record.", - "x-example": null + "description": "Provider name.", + "x-example": "<NAME>" }, - "value": { + "templateId": { "type": "string", - "description": "TXT record value.", - "x-example": "<VALUE>" + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" }, - "ttl": { - "type": "integer", - "description": "Time to live, in seconds. Must be greater than 0.", - "x-example": 1, - "format": "int32" + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" }, - "comment": { + "authKey": { "type": "string", - "description": "A comment for this record.", + "description": "Msg91 auth key.", "default": "", - "x-example": "<COMMENT>" + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "name", - "value", - "ttl" + "providerId", + "name" ] } } @@ -30596,21 +35887,21 @@ } } }, - "\/domains\/{domainId}\/records\/{recordId}": { - "get": { - "summary": "Get a single DNS record for a given domain by record ID.", - "operationId": "domainsGetRecord", + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", "tags": [ - "domains" + "messaging" ], - "description": "Get a single DNS record for a given domain by record ID.\n \nThis endpoint allows you to retrieve a specific DNS record associated with a domain\nusing its unique identifier. The record contains information about the DNS configuration\nsuch as type, value, and TTL settings.", + "description": "Update a MSG91 provider by its unique ID.", "responses": { "200": { - "description": "DNSRecord", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/dnsRecord" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30618,131 +35909,102 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRecord", - "group": null, + "method": "updateMsg91Provider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/get-record.md", + "demo": "messaging\/update-msg-91-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<RECORD_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } - ] - }, - "delete": { - "summary": "Delete a DNS record for the given domain.", - "operationId": "domainsDeleteRecord", - "tags": [ - "domains" - ], - "description": "Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record \nfrom a specific domain.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRecord", - "group": null, - "cookies": false, - "type": "", - "demo": "domains\/delete-record.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "produces": [ - "application\/json" - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" - }, - { - "name": "recordId", - "description": "DNS record unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<RECORD_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } } - ] + } } }, - "\/domains\/{domainId}\/team": { - "patch": { - "summary": "Update domain team.", - "operationId": "domainsUpdateTeam", + "\/messaging\/providers\/resend": { + "post": { + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", "tags": [ - "domains" + "messaging" ], - "description": "Update the team ID for a specific domain. This endpoint requires admin access.\n \nUpdating the team ID will transfer ownership and access control of the domain\nand all its DNS records to the new team.", + "description": "Create a new Resend provider.", "responses": { - "200": { - "description": "Domain", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domain" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30750,39 +36012,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", - "group": null, + "method": "createResendProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-team.md", + "demo": "messaging\/create-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -30791,14 +36044,61 @@ "schema": { "type": "object", "properties": { - "teamId": { + "providerId": { "type": "string", - "description": "New team unique ID.", - "x-example": "<TEAM_ID>" + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "teamId" + "providerId", + "name" ] } } @@ -30806,21 +36106,21 @@ } } }, - "\/domains\/{domainId}\/transfers\/status": { - "get": { - "summary": "Get domain transfer status.", - "operationId": "domainsGetTransferStatus", + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", "tags": [ - "domains" + "messaging" ], - "description": "Retrieve the current transfer status for a domain. Returns the status, an optional reason, and a timestamp of the last status change.", + "description": "Update a Resend provider by its unique ID.", "responses": { "200": { - "description": "domainTransferStatus", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domainTransferStatus" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30828,58 +36128,115 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransferStatus", - "group": null, + "method": "updateResendProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/get-transfer-status.md", + "demo": "messaging\/update-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } } }, - "\/domains\/{domainId}\/zone": { - "get": { - "summary": "Retrieve the DNS zone file for the given domain.", - "operationId": "domainsGetZone", + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", "tags": [ - "domains" + "messaging" ], - "description": "Retrieve the DNS zone file for the given domain. This endpoint will return the DNS\nzone file in a standardized format that can be used to configure DNS servers.", + "description": "Create a new Sendgrid provider.", "responses": { - "200": { - "description": "Text", + "201": { + "description": "Provider", "content": { - "text\/plain": { + "application\/json": { "schema": { - "type": "string" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30887,56 +36244,115 @@ }, "deprecated": false, "x-appwrite": { - "method": "getZone", - "group": null, + "method": "createSendgridProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/get-zone.md", + "demo": "messaging\/create-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.read", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], - "parameters": [ - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOMAIN_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] - }, - "put": { - "summary": "Update the DNS zone for the given domain using the provided zone file content. All parsed records are imported and then the main domain document is returned.", - "operationId": "domainsUpdateZone", + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { + "patch": { + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", "tags": [ - "domains" + "messaging" ], - "description": "Update the DNS zone for the given domain using the provided zone file content.\nAll parsed records are imported and then the main domain document is returned.", + "description": "Update a Sendgrid provider by its unique ID.", "responses": { - "201": { - "description": "Domain", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/domain" + "$ref": "#\/components\/schemas\/provider" } } } @@ -30944,37 +36360,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateZone", - "group": null, + "method": "updateSendgridProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "domains\/update-zone.md", + "demo": "messaging\/update-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "domains.write", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "domainId", - "description": "Domain unique ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOMAIN_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -30985,36 +36404,71 @@ "schema": { "type": "object", "properties": { - "content": { + "name": { "type": "string", - "description": "DNS zone file content as a string.", - "x-example": "<CONTENT>" + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" } - }, - "required": [ - "content" - ] + } } } } } } }, - "\/functions": { - "get": { - "summary": "List functions", - "operationId": "functionsList", + "\/messaging\/providers\/ses": { + "post": { + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", "tags": [ - "functions" + "messaging" ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "description": "Create a new Amazon SES provider.", "responses": { - "200": { - "description": "Functions List", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/functionList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -31022,21 +36476,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "functions", + "method": "createSesProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/list.md", + "demo": "messaging\/create-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", "auth": { "Project": [] } @@ -31047,58 +36502,101 @@ "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, deploymentId, 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "<SECRET_KEY>" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "<REGION>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] - }, - "post": { - "summary": "Create function", - "operationId": "functionsCreate", + } + } + }, + "\/messaging\/providers\/ses\/{providerId}": { + "patch": { + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", "tags": [ - "functions" + "messaging" ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "description": "Update an Amazon SES provider by its unique ID.", "responses": { - "201": { - "description": "Function", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/provider" } } } @@ -31106,21 +36604,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "functions", + "method": "updateSesProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/create.md", + "demo": "messaging\/update-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-ses-provider.md", "auth": { "Project": [] } @@ -31131,558 +36630,329 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "Runtime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] - }, - "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" - } + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "schedule": { + "accessKey": { "type": "string", - "description": "Schedule CRON syntax.", + "description": "AWS access key ID.", "default": "", - "x-example": null + "x-example": "<ACCESS_KEY>" }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "<SECRET_KEY>" }, - "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 + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "<REGION>" }, - "logging": { - "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" }, - "entrypoint": { + "fromEmail": { "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "description": "Sender email address.", "default": "", - "x-example": "<ENTRYPOINT>" + "x-example": "email@example.com", + "format": "email" }, - "commands": { + "replyToName": { "type": "string", - "description": "Build Commands.", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", "default": "", - "x-example": "<COMMANDS>" + "x-example": "<REPLY_TO_NAME>" }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", + "tags": [ + "messaging" + ], + "description": "Create a new SMTP provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createSmtpProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-smtp-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "installationId": { + "name": { "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" + "description": "Provider name.", + "x-example": "<NAME>" }, - "providerRepositoryId": { + "host": { "type": "string", - "description": "Repository ID of the repo linked to the function.", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" + "x-example": "<USERNAME>" }, - "providerBranch": { + "password": { "type": "string", - "description": "Production branch for the repo linked to the function.", + "description": "Authentication password.", "default": "", - "x-example": "<PROVIDER_BRANCH>" + "x-example": "password", + "format": "password" }, - "providerSilentMode": { + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [ + "none", + "ssl", + "tls" + ] + }, + "autoTLS": { "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, + "description": "Enable SMTP AutoTLS feature.", + "default": true, "x-example": false }, - "providerRootDirectory": { + "mailer": { "type": "string", - "description": "Path to function code in the linked repo.", + "description": "The value to use for the X-Mailer header.", "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" + "x-example": "<MAILER>" }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" }, - "buildSpecification": { + "replyToName": { "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" }, - "runtimeSpecification": { + "replyToEmail": { "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "functionId", + "providerId", "name", - "runtime" + "host" ] } } @@ -31690,454 +36960,267 @@ } } }, - "\/functions\/runtimes": { - "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", "tags": [ - "functions" + "messaging" ], - "description": "Get a list of all runtimes that are currently active on your instance.", + "description": "Update a SMTP provider by its unique ID.", "responses": { "200": { - "description": "Runtimes List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/runtimeList" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", + "method": "updateSmtpProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/list-runtimes.md", + "demo": "messaging\/update-smtp-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", - "tags": [ - "functions" - ], - "description": "List allowed function specifications for this instance.", - "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", - "cookies": false, - "type": "", - "demo": "functions\/list-specifications.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": [ - "server", - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "type", - "description": "Specification type to list. Can be one of: runtimes, builds.", - "required": false, - "schema": { - "type": "string", - "x-example": "runtimes", - "default": "runtimes" }, - "in": "query" - } - ] - } - }, - "\/functions\/templates": { - "get": { - "summary": "List templates", - "operationId": "functionsListTemplates", - "tags": [ - "functions" - ], - "description": "List available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", - "responses": { - "200": { - "description": "Function Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/templateFunctionList" + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" } - } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTemplates", - "group": "templates", - "cookies": false, - "type": "", - "demo": "functions\/list-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console" ], - "packaging": false, - "public": true, "auth": { "Project": [] } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "runtimes", - "description": "List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "Runtime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "useCases", - "description": "List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "starter", - "databases", - "ai", - "messaging", - "utilities", - "dev-tools", - "auth" - ], - "x-enum-name": "FunctionTemplateUseCase", - "x-enum-keys": [ - "starter", - "databases", - "ai", - "messaging", - "utilities", - "dev-tools", - "auth" - ] - }, - "default": [] - }, - "in": "query" - }, - { - "name": "limit", - "description": "Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 25 - }, - "in": "query" - }, + }, + "security": [ { - "name": "offset", - "description": "Offset the list of returned templates. Maximum offset is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - }, + "Project": [], + "Key": [] + } + ], + "parameters": [ { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "providerId", + "description": "Provider ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<PROVIDER_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "password", + "format": "password" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [ + "none", + "ssl", + "tls" + ] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } } }, - "\/functions\/templates\/{templateId}": { - "get": { - "summary": "Get function template", - "operationId": "functionsGetTemplate", + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", "tags": [ - "functions" + "messaging" ], - "description": "Get a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", + "description": "Create a new Telesign provider.", "responses": { - "200": { - "description": "Template Function", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/templateFunction" + "$ref": "#\/components\/schemas\/provider" } } } @@ -32145,58 +37228,205 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTemplate", - "group": "templates", + "method": "createTelesignProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/get-template.md", + "demo": "messaging\/create-telesign-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "auth": { "Project": [] } }, "security": [ { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", + "tags": [ + "messaging" + ], + "description": "Update a Telesign provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTelesignProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-telesign-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", + "auth": { "Project": [] } + }, + "security": [ + { + "Project": [], + "Key": [] + } ], "parameters": [ { - "name": "templateId", - "description": "Template ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<TEMPLATE_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + } + } } }, - "\/functions\/usage": { - "get": { - "summary": "Get functions usage", - "operationId": "functionsListUsage", + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", "tags": [ - "functions" + "messaging" ], - "description": "Get usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", + "description": "Create a new Textmagic provider.", "responses": { - "200": { - "description": "UsageFunctions", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageFunctions" + "$ref": "#\/components\/schemas\/provider" } } } @@ -32204,70 +37434,102 @@ }, "deprecated": false, "x-appwrite": { - "method": "listUsage", - "group": null, + "method": "createTextmagicProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/list-usage.md", + "demo": "messaging\/create-textmagic-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "providers.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] + } } }, - "\/functions\/{functionId}": { - "get": { - "summary": "Get function", - "operationId": "functionsGet", + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", "tags": [ - "functions" + "messaging" ], - "description": "Get a function by its unique ID.", + "description": "Update a Textmagic provider by its unique ID.", "responses": { "200": { - "description": "Function", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/provider" } } } @@ -32275,21 +37537,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "functions", + "method": "updateTextmagicProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/get.md", + "demo": "messaging\/update-textmagic-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "auth": { "Project": [] } @@ -32302,31 +37565,74 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } - ] - }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", "tags": [ - "functions" + "messaging" ], - "description": "Update function by its unique ID.", + "description": "Create a new Twilio provider.", "responses": { - "200": { - "description": "Function", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/provider" } } } @@ -32334,21 +37640,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "functions", + "method": "createTwilioProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/update.md", + "demo": "messaging\/create-twilio-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "auth": { "Project": [] } @@ -32359,573 +37666,438 @@ "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": { + "providerId": { "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "Runtime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] - }, - "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" + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" }, - "schedule": { + "from": { "type": "string", - "description": "Schedule CRON syntax.", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1, - "format": "int32" - }, - "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false + "x-example": "+12065550100", + "format": "phone" }, - "entrypoint": { + "accountSid": { "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "description": "Twilio account secret ID.", "default": "", - "x-example": "<ENTRYPOINT>" + "x-example": "<ACCOUNT_SID>" }, - "commands": { + "authToken": { "type": "string", - "description": "Build Commands.", + "description": "Twilio authentication token.", "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } + "x-example": "<AUTH_TOKEN>" }, - "installationId": { + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } + } + } + } + }, + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", + "tags": [ + "messaging" + ], + "description": "Update a Twilio provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTwilioProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-twilio-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { "type": "string", - "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "description": "Provider name.", "default": "", - "x-example": "<INSTALLATION_ID>" + "x-example": "<NAME>" }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the function", - "x-example": "<PROVIDER_REPOSITORY_ID>", + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, "x-nullable": true }, - "providerBranch": { + "accountSid": { "type": "string", - "description": "Production branch for the repo linked to the function", + "description": "Twilio account secret ID.", "default": "", - "x-example": "<PROVIDER_BRANCH>" + "x-example": "<ACCOUNT_SID>" }, - "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 + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" }, - "providerRootDirectory": { + "from": { "type": "string", - "description": "Path to function code in the linked repo.", + "description": "Sender number.", "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Create a new Vonage provider.", + "responses": { + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createVonageProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" }, - "buildSpecification": { + "apiKey": { "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null, - "x-nullable": true + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" }, - "runtimeSpecification": { + "apiSecret": { "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ + "providerId", "name" ] } } } } + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { + "patch": { + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", + "tags": [ + "messaging" + ], + "description": "Update a Vonage provider by its unique ID.", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateVonageProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", + "tags": [ + "messaging" + ], + "description": "Get a provider by its unique ID.\n", + "responses": { + "200": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProvider", + "group": "providers", + "cookies": false, + "type": "", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" + } + ] }, "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", "tags": [ - "functions" + "messaging" ], - "description": "Delete a function by its unique ID.", + "description": "Delete a provider by its unique ID.", "responses": { "204": { "description": "No content" @@ -32933,21 +38105,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "functions", + "method": "deleteProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "functions\/delete.md", + "demo": "messaging\/delete-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "auth": { "Project": [] } @@ -32960,33 +38133,33 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } ] } }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", "tags": [ - "functions" + "messaging" ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "description": "Get a list of all topics from the current Appwrite project.", "responses": { "200": { - "description": "Function", + "description": "Topic list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/topicList" } } } @@ -32994,21 +38167,107 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", + "method": "listTopics", + "group": "topics", + "cookies": false, + "type": "", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", + "tags": [ + "messaging" + ], + "description": "Create a new topic.", + "responses": { + "201": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "functions\/update-function-deployment.md", + "demo": "messaging\/create-topic.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "topics.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "auth": { "Project": [] } @@ -33019,32 +38278,40 @@ "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": { - "deploymentId": { + "topicId": { "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "x-example": "<TOPIC_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", + "items": { + "type": "string" + } } }, "required": [ - "deploymentId" + "topicId", + "name" ] } } @@ -33052,21 +38319,21 @@ } } }, - "\/functions\/{functionId}\/deployments": { + "\/messaging\/topics\/{topicId}": { "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", + "summary": "Get topic", + "operationId": "messagingGetTopic", "tags": [ - "functions" + "messaging" ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "description": "Get a topic by its unique ID.\n", "responses": { "200": { - "description": "Deployments List", + "description": "Topic", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deploymentList" + "$ref": "#\/components\/schemas\/topic" } } } @@ -33074,21 +38341,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDeployments", - "group": "deployments", + "method": "getTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "functions\/list-deployments.md", + "demo": "messaging\/get-topic.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "topics.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "auth": { "Project": [] } @@ -33101,66 +38369,31 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] }, - "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", + "patch": { + "summary": "Update topic", + "operationId": "messagingUpdateTopic", "tags": [ - "functions" + "messaging" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Update a topic by its unique ID.\n", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "Topic", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/topic" } } } @@ -33168,21 +38401,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDeployment", - "group": "deployments", + "method": "updateTopic", + "group": "topics", "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", + "type": "", + "demo": "messaging\/update-topic.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "topics.write", "platforms": [ "console", "server" ], - "packaging": true, + "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "auth": { "Project": [] } @@ -33195,93 +38429,73 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" } ], "requestBody": { "content": { - "multipart\/form-data": { + "application\/json": { "schema": { "type": "object", "properties": { - "entrypoint": { + "name": { "type": "string", - "description": "Entrypoint File.", - "x-example": "<ENTRYPOINT>", + "description": "Topic Name.", + "x-example": "<NAME>", "x-nullable": true }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>", + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + }, "x-nullable": true - }, - "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, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false } - }, - "required": [ - "code", - "activate" - ] + } } } } } - } - }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", "tags": [ - "functions" + "messaging" ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "description": "Delete a topic by its unique ID.", "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", + "method": "deleteTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "functions\/create-duplicate-deployment.md", + "demo": "messaging\/delete-topic.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "topics.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "auth": { "Project": [] } @@ -33294,58 +38508,33 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - }, - "buildId": { - "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } + ] } }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", + "\/messaging\/topics\/{topicId}\/subscribers": { + "get": { + "summary": "List subscribers", + "operationId": "messagingListSubscribers", "tags": [ - "functions" + "messaging" ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "description": "Get a list of all subscribers from the current Appwrite project.", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "Subscriber list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/subscriberList" } } } @@ -33353,21 +38542,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", + "method": "listSubscribers", + "group": "subscribers", "cookies": false, "type": "", - "demo": "functions\/create-template-deployment.md", + "demo": "messaging\/list-subscribers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "subscribers.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "auth": { "Project": [] } @@ -33380,93 +38570,66 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to function code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [ - "commit", - "branch", - "tag" - ] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } - } - } - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { + ] + }, "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", "tags": [ - "functions" + "messaging" ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "description": "Create a new subscriber.", "responses": { - "202": { - "description": "Deployment", + "201": { + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -33474,21 +38637,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", + "method": "createSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "functions\/create-vcs-deployment.md", + "demo": "messaging\/create-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "subscribers.write", "platforms": [ - "console", - "server" + "server", + "client", + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [] } @@ -33496,17 +38661,19 @@ "security": [ { "Project": [], + "JWT": [], + "Session": [], "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" } @@ -33517,35 +38684,23 @@ "schema": { "type": "object", "properties": { - "type": { + "subscriberId": { "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [ - "branch", - "commit" - ] + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "<SUBSCRIBER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "reference": { + "targetId": { "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "<TARGET_ID>" } }, "required": [ - "type", - "reference" + "subscriberId", + "targetId" ] } } @@ -33553,21 +38708,21 @@ } } }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", "tags": [ - "functions" + "messaging" ], - "description": "Get a function deployment by its unique ID.", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { - "description": "Deployment", + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -33575,21 +38730,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDeployment", - "group": "deployments", + "method": "getSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "functions\/get-deployment.md", + "demo": "messaging\/get-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "subscribers.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "auth": { "Project": [] } @@ -33602,34 +38758,34 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" }, { - "name": "deploymentId", - "description": "Deployment ID.", + "name": "subscriberId", + "description": "Subscriber ID.", "required": true, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<SUBSCRIBER_ID>" }, "in": "path" } ] }, "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", "tags": [ - "functions" + "messaging" ], - "description": "Delete a code deployment by its unique ID.", + "description": "Delete a subscriber by its unique ID.", "responses": { "204": { "description": "No content" @@ -33637,21 +38793,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "functions\/delete-deployment.md", + "demo": "messaging\/delete-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "subscribers.write", "platforms": [ - "console", - "server" + "server", + "client", + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [] } @@ -33659,49 +38817,50 @@ "security": [ { "Project": [], + "JWT": [], + "Session": [], "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" }, { - "name": "deploymentId", - "description": "Deployment ID.", + "name": "subscriberId", + "description": "Subscriber ID.", "required": true, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<SUBSCRIBER_ID>" }, "in": "path" } ] } }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "\/migrations": { "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", + "summary": "List migrations", + "operationId": "migrationsList", "tags": [ - "functions" + "migrations" ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", "responses": { "200": { - "description": "File", + "description": "Migrations List", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/migrationList" } } } @@ -33709,93 +38868,84 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", + "method": "list", + "group": null, "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", + "type": "", + "demo": "migrations\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "migrations.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Project": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceInternalId, resourceType, parentResourceId, parentResourceInternalId, parentResourceType, destinationResourceId, destinationResourceInternalId, destinationResourceType, statusCounters, resourceData, errors", + "required": false, "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [ - "source", - "output" - ], - "default": "source" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] } }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", + "\/migrations\/appwrite": { + "post": { + "summary": "Create Appwrite migration", + "operationId": "migrationsCreateAppwriteMigration", "tags": [ - "functions" + "migrations" ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", "responses": { - "200": { - "description": "Deployment", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/migration" } } } @@ -33803,70 +38953,188 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", + "method": "createAppwriteMigration", + "group": null, "cookies": false, "type": "", - "demo": "functions\/update-deployment-status.md", + "demo": "migrations\/create-appwrite-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "auth-methods", + "policies", + "oauth2-provider", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable", + "platform", + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [ + "user", + "team", + "membership", + "auth-methods", + "policies", + "oauth2-provider", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable", + "platform", + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" + ] + } + }, + "endpoint": { + "type": "string", + "description": "Source Appwrite endpoint", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "projectId": { + "type": "string", + "description": "Source Project ID", + "x-example": "<PROJECT_ID>" + }, + "apiKey": { + "type": "string", + "description": "Source API Key", + "x-example": "<API_KEY>" + }, + "onDuplicate": { + "type": "string", + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "default": "fail", + "x-example": "fail", + "enum": [ + "fail", + "skip", + "overwrite" + ], + "x-enum-name": "OnDuplicate", + "x-enum-keys": [ + "fail", + "skip", + "overwrite" + ] + } + }, + "required": [ + "resources", + "endpoint", + "projectId", + "apiKey" + ] + } + } } - ] + } } }, - "\/functions\/{functionId}\/executions": { + "\/migrations\/appwrite\/report": { "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", + "summary": "Get Appwrite migration report", + "operationId": "migrationsGetAppwriteReport", "tags": [ - "functions" + "migrations" ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { "200": { - "description": "Executions List", + "description": "Migration Report", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/executionList" + "$ref": "#\/components\/schemas\/migrationReport" } } } @@ -33874,88 +39142,302 @@ }, "deprecated": false, "x-appwrite": { - "method": "listExecutions", - "group": "executions", + "method": "getAppwriteReport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/list-executions.md", + "demo": "migrations\/get-appwrite-report.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "migrations.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "team", + "membership", + "auth-methods", + "policies", + "oauth2-provider", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable", + "platform", + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" + ], + "x-enum-name": "AppwriteMigrationResource", + "x-enum-keys": [ + "user", + "team", + "membership", + "auth-methods", + "policies", + "oauth2-provider", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "documentsdb", + "vectorsdb", + "bucket", + "file", + "function", + "deployment", + "environment-variable", + "provider", + "topic", + "subscriber", + "message", + "site", + "site-deployment", + "site-variable", + "platform", + "api-key", + "webhook", + "smtp", + "backup-policy", + "project-variable", + "project-protocols", + "project-labels", + "project-services", + "project-email-template", + "rule" + ] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Appwrite Endpoint", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "format": "url", + "x-example": "https:\/\/example.com" }, - "in": "path" + "in": "query" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, + "name": "projectID", + "description": "Source's Project ID", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<PROJECT_ID>" }, "in": "query" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "key", + "description": "Source's API Key", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<KEY>" }, "in": "query" } - ] - }, + ] + } + }, + "\/migrations\/csv\/exports": { + "post": { + "summary": "Export documents to CSV", + "operationId": "migrationsCreateCSVExport", + "tags": [ + "migrations" + ], + "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", + "responses": { + "202": { + "description": "Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCSVExport", + "group": null, + "cookies": false, + "type": "", + "demo": "migrations\/create-csv-export.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "migrations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Database ID containing the source collection.", + "x-example": "<DATABASE_ID>" + }, + "collectionId": { + "type": "string", + "description": "Collection ID to export documents from.", + "x-example": "<COLLECTION_ID>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .csv extension.", + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "delimiter": { + "type": "string", + "description": "The character that separates each column value. Default is comma.", + "default": ",", + "x-example": "<DELIMITER>" + }, + "enclosure": { + "type": "string", + "description": "The character that encloses each column value. Default is double quotes.", + "default": "\"", + "x-example": "<ENCLOSURE>" + }, + "escape": { + "type": "string", + "description": "The escape character for the enclosure character. Default is double quotes.", + "default": "\"", + "x-example": "<ESCAPE>" + }, + "header": { + "type": "boolean", + "description": "Whether to include the header row with column names. Default is true.", + "default": true, + "x-example": false + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "collectionId", + "filename" + ] + } + } + } + } + } + }, + "\/migrations\/csv\/imports": { "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", + "summary": "Import documents from a CSV", + "operationId": "migrationsCreateCSVImport", "tags": [ - "functions" + "migrations" ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", "responses": { - "201": { - "description": "Execution", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/migration" } } } @@ -33963,47 +39445,28 @@ }, "deprecated": false, "x-appwrite": { - "method": "createExecution", - "group": "executions", + "method": "createCSVImport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/create-execution.md", + "demo": "migrations\/create-csv-import.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "migrations.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" + "Project": [] } ], "requestBody": { @@ -34012,83 +39475,77 @@ "schema": { "type": "object", "properties": { - "body": { + "bucketId": { "type": "string", - "description": "HTTP body of execution. Default value is empty string.", - "default": "", - "x-example": "<BODY>" + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "x-example": "<BUCKET_ID>" }, - "async": { + "fileId": { + "type": "string", + "description": "File ID.", + "x-example": "<FILE_ID>" + }, + "databaseId": { + "type": "string", + "description": "Database ID containing the target collection.", + "x-example": "<DATABASE_ID>" + }, + "collectionId": { + "type": "string", + "description": "Collection ID to import documents into.", + "x-example": "<COLLECTION_ID>" + }, + "internalFile": { "type": "boolean", - "description": "Execute code in the background. Default value is false.", + "description": "Is the file stored in an internal bucket?", "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": { + "onDuplicate": { "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "default": "fail", + "x-example": "fail", "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" + "fail", + "skip", + "overwrite" ], - "x-enum-name": "ExecutionMethod", + "x-enum-name": "OnDuplicate", "x-enum-keys": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" + "fail", + "skip", + "overwrite" ] - }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "<SCHEDULED_AT>", - "x-nullable": true } - } + }, + "required": [ + "bucketId", + "fileId", + "databaseId", + "collectionId" + ] } } } } } }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", + "\/migrations\/firebase": { + "post": { + "summary": "Create Firebase migration", + "operationId": "migrationsCreateFirebaseMigration", "tags": [ - "functions" + "migrations" ], - "description": "Get a function execution log by its unique ID.", + "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", "responses": { - "200": { - "description": "Execution", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34096,141 +39553,197 @@ }, "deprecated": false, "x-appwrite": { - "method": "getExecution", - "group": "executions", + "method": "createFirebaseMigration", + "group": null, "cookies": false, "type": "", - "demo": "functions\/get-execution.md", + "demo": "migrations\/create-firebase-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "migrations.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Project": [] } ], - "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" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] + } + }, + "serviceAccount": { + "type": "string", + "description": "JSON of the Firebase service account credentials", + "x-example": "<SERVICE_ACCOUNT>" + } + }, + "required": [ + "resources", + "serviceAccount" + ] + } + } } - ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", + } + } + }, + "\/migrations\/firebase\/report": { + "get": { + "summary": "Get Firebase migration report", + "operationId": "migrationsGetFirebaseReport", "tags": [ - "functions" + "migrations" ], - "description": "Delete a function execution by its unique ID.", + "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteExecution", - "group": "executions", + "method": "getFirebaseReport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/delete-execution.md", + "demo": "migrations\/get-firebase-report.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "resources", + "description": "List of resources to migrate", "required": true, "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "FirebaseMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] + } }, - "in": "path" + "in": "query" }, { - "name": "executionId", - "description": "Execution ID.", + "name": "serviceAccount", + "description": "JSON of the Firebase service account credentials", "required": true, "schema": { "type": "string", - "x-example": "<EXECUTION_ID>" + "x-example": "<SERVICE_ACCOUNT>" }, - "in": "path" + "in": "query" } ] } }, - "\/functions\/{functionId}\/usage": { - "get": { - "summary": "Get function usage", - "operationId": "functionsGetUsage", + "\/migrations\/json\/exports": { + "post": { + "summary": "Export documents to JSON", + "operationId": "migrationsCreateJSONExport", "tags": [ - "functions" + "migrations" ], - "description": "Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", + "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", "responses": { - "200": { - "description": "UsageFunction", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageFunction" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34238,20 +39751,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "createJSONExport", "group": null, "cookies": false, "type": "", - "demo": "functions\/get-usage.md", + "demo": "migrations\/create-json-export.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "migrations.write", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", "auth": { "Project": [] } @@ -34261,57 +39775,78 @@ "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", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Database ID containing the source collection.", + "x-example": "<DATABASE_ID>" + }, + "collectionId": { + "type": "string", + "description": "Collection ID to export documents from.", + "x-example": "<COLLECTION_ID>" + }, + "filename": { + "type": "string", + "description": "The name of the file to be created for the export, excluding the .json extension.", + "x-example": "<FILENAME>" + }, + "columns": { + "type": "array", + "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "notify": { + "type": "boolean", + "description": "Set to true to receive an email when the export is complete. Default is true.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "collectionId", + "filename" + ] + } + } } - ] + } } }, - "\/functions\/{functionId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "functionsListVariables", + "\/migrations\/json\/imports": { + "post": { + "summary": "Import documents from a JSON", + "operationId": "migrationsCreateJSONImport", "tags": [ - "functions" + "migrations" ], - "description": "Get a list of all variables of a specific function.", + "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", "responses": { - "200": { - "description": "Variables List", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variableList" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34319,82 +39854,107 @@ }, "deprecated": false, "x-appwrite": { - "method": "listVariables", - "group": "variables", + "method": "createJSONImport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/list-variables.md", + "demo": "migrations\/create-json-import.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique 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: key, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "x-example": "<BUCKET_ID>" + }, + "fileId": { + "type": "string", + "description": "File ID.", + "x-example": "<FILE_ID>" + }, + "databaseId": { + "type": "string", + "description": "Database ID containing the target collection.", + "x-example": "<DATABASE_ID>" + }, + "collectionId": { + "type": "string", + "description": "Collection ID to import documents into.", + "x-example": "<COLLECTION_ID>" + }, + "internalFile": { + "type": "boolean", + "description": "Is the file stored in an internal bucket?", + "default": false, + "x-example": false + }, + "onDuplicate": { + "type": "string", + "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", + "default": "fail", + "x-example": "fail", + "enum": [ + "fail", + "skip", + "overwrite" + ], + "x-enum-name": "OnDuplicate", + "x-enum-keys": [ + "fail", + "skip", + "overwrite" + ] + } + }, + "required": [ + "bucketId", + "fileId", + "databaseId", + "collectionId" + ] + } + } } - ] - }, + } + } + }, + "\/migrations\/nhost": { "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", + "summary": "Create NHost migration", + "operationId": "migrationsCreateNHostMigration", "tags": [ - "functions" + "migrations" ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", "responses": { - "201": { - "description": "Variable", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34402,41 +39962,28 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVariable", - "group": "variables", + "method": "createNHostMigration", + "group": null, "cookies": false, "type": "", - "demo": "functions\/create-variable.md", + "demo": "migrations\/create-n-host-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" + "Project": [] } ], "requestBody": { @@ -34445,35 +39992,88 @@ "schema": { "type": "object", "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<VARIABLE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] } }, - "key": { + "subdomain": { "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" + "description": "Source's Subdomain", + "x-example": "<SUBDOMAIN>" }, - "value": { + "region": { "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" + "description": "Source's Region", + "x-example": "<REGION>" }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": true, - "x-example": false + "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", + "format": "password" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null, + "format": "int32" } }, "required": [ - "variableId", - "key", - "value" + "resources", + "subdomain", + "region", + "adminSecret", + "database", + "username", + "password" ] } } @@ -34481,21 +40081,21 @@ } } }, - "\/functions\/{functionId}\/variables\/{variableId}": { + "\/migrations\/nhost\/report": { "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", + "summary": "Get NHost migration report", + "operationId": "migrationsGetNHostReport", "tags": [ - "functions" + "migrations" ], - "description": "Get a variable by its unique ID.", + "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { "200": { - "description": "Variable", + "description": "Migration Report", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/migrationReport" } } } @@ -34503,68 +40103,160 @@ }, "deprecated": false, "x-appwrite": { - "method": "getVariable", - "group": "variables", + "method": "getNHostReport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/get-variable.md", + "demo": "migrations\/get-n-host-report.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", + "name": "resources", + "description": "List of resources to migrate.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "NHostMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] + } + }, + "in": "query" + }, + { + "name": "subdomain", + "description": "Source's Subdomain.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<SUBDOMAIN>" }, - "in": "path" + "in": "query" }, { - "name": "variableId", - "description": "Variable unique ID.", + "name": "region", + "description": "Source's Region.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<REGION>" }, - "in": "path" + "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", + "format": "password", + "x-example": "password" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5432 + }, + "in": "query" } ] - }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", + } + }, + "\/migrations\/supabase": { + "post": { + "summary": "Create Supabase migration", + "operationId": "migrationsCreateSupabaseMigration", "tags": [ - "functions" + "migrations" ], - "description": "Update variable by its unique ID.", + "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", "responses": { - "200": { - "description": "Variable", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34572,51 +40264,28 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVariable", - "group": "variables", + "method": "createSupabaseMigration", + "group": null, "cookies": false, "type": "", - "demo": "functions\/update-variable.md", + "demo": "migrations\/create-supabase-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", "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" + "Project": [] } ], "requestBody": { @@ -34625,108 +40294,257 @@ "schema": { "type": "object", "properties": { - "key": { + "resources": { + "type": "array", + "description": "List of resources to migrate", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] + } + }, + "endpoint": { "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true + "description": "Source's Supabase Endpoint", + "x-example": "https:\/\/example.com", + "format": "url" }, - "value": { + "apiKey": { "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true + "description": "Source's API Key", + "x-example": "<API_KEY>" }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false, - "x-nullable": true + "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", + "format": "password" + }, + "port": { + "type": "integer", + "description": "Source's Database Port", + "default": 5432, + "x-example": null, + "format": "int32" } - } + }, + "required": [ + "resources", + "endpoint", + "apiKey", + "databaseHost", + "username", + "password" + ] } } } } - }, - "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", + } + }, + "\/migrations\/supabase\/report": { + "get": { + "summary": "Get Supabase migration report", + "operationId": "migrationsGetSupabaseReport", "tags": [ - "functions" + "migrations" ], - "description": "Delete a variable by its unique ID.", + "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Migration Report", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/migrationReport" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteVariable", - "group": "variables", + "method": "getSupabaseReport", + "group": null, "cookies": false, "type": "", - "demo": "functions\/delete-variable.md", + "demo": "migrations\/get-supabase-report.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", + "name": "resources", + "description": "List of resources to migrate", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ], + "x-enum-name": "SupabaseMigrationResource", + "x-enum-keys": [ + "user", + "database", + "table", + "column", + "index", + "row", + "document", + "attribute", + "collection", + "bucket", + "file" + ] + } + }, + "in": "query" + }, + { + "name": "endpoint", + "description": "Source's Supabase Endpoint.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "format": "url", + "x-example": "https:\/\/example.com" }, - "in": "path" + "in": "query" }, { - "name": "variableId", - "description": "Variable unique ID.", + "name": "apiKey", + "description": "Source's API Key.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<API_KEY>" }, - "in": "path" + "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", + "format": "password", + "x-example": "password" + }, + "in": "query" + }, + { + "name": "port", + "description": "Source's Database Port.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 5432 + }, + "in": "query" } ] } }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", + "\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "migrationsGet", "tags": [ - "graphql" + "migrations" ], - "description": "Execute a GraphQL mutation.", + "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", "responses": { "200": { - "description": "Any", + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34734,72 +40552,57 @@ }, "deprecated": false, "x-appwrite": { - "method": "query", - "group": "graphql", + "method": "get", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "migrations\/get.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "migrations.read", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" } - } - } - }, - "\/graphql\/mutation": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", + ] + }, + "patch": { + "summary": "Update retry migration", + "operationId": "migrationsRetry", "tags": [ - "graphql" + "migrations" ], - "description": "Execute a GraphQL mutation.", + "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", "responses": { - "200": { - "description": "Any", + "202": { + "description": "Migration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/migration" } } } @@ -34807,122 +40610,110 @@ }, "deprecated": false, "x-appwrite": { - "method": "mutation", - "group": "graphql", + "method": "retry", + "group": null, "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "migrations\/retry.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "migrations.write", "platforms": [ - "console", - "server", - "client" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } + "parameters": [ + { + "name": "migrationId", + "description": "Migration unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" } - } - } - }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", + ] + }, + "delete": { + "summary": "Delete migration", + "operationId": "migrationsDelete", "tags": [ - "health" + "migrations" ], - "description": "Check the Appwrite HTTP server is up and responsive.", + "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "health", + "method": "delete", + "group": null, "cookies": false, "type": "", - "demo": "health\/get.md", + "demo": "migrations\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "migrations.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] + } + ], + "parameters": [ + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" } ] } }, - "\/health\/anti-virus": { + "\/mongo": { "get": { - "summary": "Get antivirus", - "operationId": "healthGetAntivirus", + "summary": "List databases", + "operationId": "mongoList", "tags": [ - "health" + "mongo" ], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "description": "List all dedicated databases. Results support pagination.", "responses": { "200": { - "description": "Health Antivirus", + "description": "Dedicated databases list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthAntivirus" + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" } } } @@ -34930,22 +40721,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAntivirus", - "group": "health", + "method": "list", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-antivirus.md", + "demo": "mongo\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "auth": { "Project": [] } @@ -34955,24 +40745,37 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } ] - } - }, - "\/health\/audits-db": { - "get": { - "summary": "Get audits DB", - "operationId": "healthGetAuditsDB", + }, + "post": { + "summary": "Create database", + "operationId": "mongoCreate", "tags": [ - "health" + "mongo" ], - "description": "Check the database that backs the audit and activity store. When the connection is reachable the endpoint returns a passing status with its response time.\n", + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", "responses": { - "200": { - "description": "Status List", + "201": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -34980,22 +40783,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAuditsDB", - "group": null, + "method": "create", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-audits-db.md", + "demo": "mongo\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-audits-db.md", "auth": { "Project": [] } @@ -35005,74 +40807,139 @@ "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": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" - } + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Database display name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "version": { + "type": "string", + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "default": 15, + "x-example": 5, + "format": "int32" + }, + "pitr": { + "type": "boolean", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "default": true, + "x-example": false + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, + "x-example": false + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "databaseId", + "name" + ] } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "getCache", - "group": "health", - "cookies": false, - "type": "", - "demo": "health\/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] + } } }, - "\/health\/certificate": { + "\/mongo\/specifications": { "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", + "summary": "List specifications", + "operationId": "mongoListSpecifications", "tags": [ - "health" + "mongo" ], - "description": "Get the SSL certificate for a domain", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "Health Certificate", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthCertificate" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -35080,22 +40947,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCertificate", - "group": "health", + "method": "listSpecifications", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-certificate.md", + "demo": "mongo\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "auth": { "Project": [] } @@ -35105,35 +40971,24 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "domain", - "description": "string", - "required": false, - "schema": { - "type": "string" - }, - "in": "query" - } ] } }, - "\/health\/console-pausing": { + "\/mongo\/{databaseId}": { "get": { - "summary": "Get console pausing health", - "operationId": "healthGetConsolePausing", + "summary": "Get database", + "operationId": "mongoGet", "tags": [ - "health" + "mongo" ], - "description": "Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.\n", + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", "responses": { "200": { - "description": "Health Status", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -35141,22 +40996,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getConsolePausing", - "group": null, + "method": "get", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-console-pausing.md", + "demo": "mongo\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-console-pausing.md", "auth": { "Project": [] } @@ -35169,45 +41023,31 @@ ], "parameters": [ { - "name": "threshold", - "description": "Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - }, - "in": "query" - }, - { - "name": "inactivityDays", - "description": "Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 7 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/health\/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", + }, + "patch": { + "summary": "Update database", + "operationId": "mongoUpdate", "tags": [ - "health" + "mongo" ], - "description": "Check the Appwrite database servers are up and connection is successful.", + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", "responses": { "200": { - "description": "Status List", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -35215,22 +41055,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDB", - "group": "health", + "method": "update", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-db.md", + "demo": "mongo\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "auth": { "Project": [] } @@ -35240,97 +41079,213 @@ "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": "Status List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { + "type": "boolean", + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", + "x-example": false, + "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true + } } } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "getPubSub", - "group": "health", - "cookies": false, - "type": "", - "demo": "health\/get-pub-sub.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/health\/queue\/audits": { - "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", + } + }, + "delete": { + "summary": "Delete database", + "operationId": "mongoDelete", "tags": [ - "health" + "mongo" ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", + "method": "delete", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-queue-audits.md", + "demo": "mongo\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -35343,34 +41298,33 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/health\/queue\/billing-project-aggregation": { + "\/mongo\/{databaseId}\/backups": { "get": { - "summary": "Get billing project aggregation queue", - "operationId": "healthGetQueueBillingProjectAggregation", + "summary": "List backups", + "operationId": "mongoListBackups", "tags": [ - "health" + "mongo" ], - "description": "Get billing project aggregation queue.", + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Health Queue", + "description": "BackupList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" } } } @@ -35378,22 +41332,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueBillingProjectAggregation", - "group": null, + "method": "listBackups", + "group": "backups", "cookies": false, "type": "", - "demo": "health\/get-queue-billing-project-aggregation.md", + "demo": "mongo\/list-backups.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-billing-project-aggregation.md", "auth": { "Project": [] } @@ -35406,34 +41359,44 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", "required": false, "schema": { - "type": "integer", - "format": "int32", - "default": 10000 + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" } ] - } - }, - "\/health\/queue\/billing-team-aggregation": { - "get": { - "summary": "Get billing team aggregation queue", - "operationId": "healthGetQueueBillingTeamAggregation", + }, + "post": { + "summary": "Create backup", + "operationId": "mongoCreateBackup", "tags": [ - "health" + "mongo" ], - "description": "Get billing team aggregation queue.", + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", "responses": { - "200": { - "description": "Health Queue", + "202": { + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -35441,22 +41404,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueBillingTeamAggregation", - "group": null, + "method": "createBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "health\/get-queue-billing-team-aggregation.md", + "demo": "mongo\/create-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-billing-team-aggregation.md", "auth": { "Project": [] } @@ -35469,97 +41431,50 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 10000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] - } - }, - "\/health\/queue\/builds": { - "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", - "tags": [ - "health" ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + } } } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", - "cookies": false, - "type": "", - "demo": "health\/get-queue-builds.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 - }, - "in": "query" - } - ] + } } }, - "\/health\/queue\/certificates": { + "\/mongo\/{databaseId}\/backups\/policies": { "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", + "summary": "List backup policies", + "operationId": "mongoListBackupPolicies", "tags": [ - "health" + "mongo" ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "description": "List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "Health Queue", + "description": "Backup policy list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -35567,22 +41482,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", + "method": "listBackupPolicies", + "group": "policies", "cookies": false, "type": "", - "demo": "health\/get-queue-certificates.md", + "demo": "mongo\/list-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "auth": { "Project": [] } @@ -35595,34 +41509,44 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" } ] - } - }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", + }, + "post": { + "summary": "Create backup policy", + "operationId": "mongoCreateBackupPolicy", "tags": [ - "health" + "mongo" ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "description": "Create a scheduled backup policy for a dedicated database.", "responses": { - "200": { - "description": "Health Queue", + "201": { + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -35630,22 +41554,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", + "method": "createBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "health\/get-queue-databases.md", + "demo": "mongo\/create-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "auth": { "Project": [] } @@ -35658,45 +41581,86 @@ ], "parameters": [ { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<NAME>", - "default": "database_db_main" - }, - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } } }, - "\/health\/queue\/deletes": { + "\/mongo\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", + "summary": "Get backup policy", + "operationId": "mongoGetBackupPolicy", "tags": [ - "health" + "mongo" ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "description": "Get a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Health Queue", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -35704,22 +41668,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", + "method": "getBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "health\/get-queue-deletes.md", + "demo": "mongo\/get-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "auth": { "Project": [] } @@ -35732,34 +41695,41 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/health\/queue\/failed\/{name}": { - "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", + }, + "patch": { + "summary": "Update backup policy", + "operationId": "mongoUpdateBackupPolicy", "tags": [ - "health" + "mongo" ], - "description": "Returns the amount of failed jobs in a given queue.\n", + "description": "Update a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Health Queue", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -35767,22 +41737,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", + "method": "updateBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "health\/get-failed-jobs.md", + "demo": "mongo\/update-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "auth": { "Project": [] } @@ -35795,98 +41764,94 @@ ], "parameters": [ { - "name": "name", - "description": "The name of the queue", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": "HealthQueueName", - "x-enum-keys": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ] + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "policyId", + "description": "Policy ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<POLICY_ID>" }, - "in": "query" + "in": "path" } - ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", - "tags": [ - "health" ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", + "x-nullable": true + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "x-example": false, + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mongoDeleteBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", + "method": "deleteBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "health\/get-queue-functions.md", + "demo": "mongo\/delete-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -35899,34 +41864,43 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" } ] } }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", + "\/mongo\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mongoUpdateBackupStorage", "tags": [ - "health" + "mongo" ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { "200": { - "description": "Health Queue", + "description": "BackupStorageConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" } } } @@ -35934,22 +41908,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "health\/get-queue-logs.md", + "demo": "mongo\/update-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "auth": { "Project": [] } @@ -35962,34 +41935,88 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" + }, + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" + }, + "region": { + "type": "string", + "description": "Storage region.", + "default": "", + "x-example": "<REGION>" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "<ENDPOINT>" + }, + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } } }, - "\/health\/queue\/mails": { + "\/mongo\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", + "summary": "Get backup", + "operationId": "mongoGetBackup", "tags": [ - "health" + "mongo" ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "Health Queue", + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -35997,22 +42024,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueMails", - "group": "queue", + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "health\/get-queue-mails.md", + "demo": "mongo\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "auth": { "Project": [] } @@ -36025,57 +42051,59 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" + }, + "in": "path" } ] - } - }, - "\/health\/queue\/messaging": { - "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", + }, + "delete": { + "summary": "Delete backup", + "operationId": "mongoDeleteBackup", "tags": [ - "health" + "mongo" ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", "responses": { - "200": { - "description": "Health Queue", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthQueue" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", + "method": "deleteBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "health\/get-queue-messaging.md", + "demo": "mongo\/delete-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -36088,34 +42116,43 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" + }, + "in": "path" } ] } }, - "\/health\/queue\/migrations": { + "\/mongo\/{databaseId}\/branches": { "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", + "summary": "List branches", + "operationId": "mongoListBranches", "tags": [ - "health" + "mongo" ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", "responses": { "200": { - "description": "Health Queue", + "description": "BranchList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" } } } @@ -36123,22 +42160,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", + "method": "listBranches", + "group": "branches", "cookies": false, "type": "", - "demo": "health\/get-queue-migrations.md", + "demo": "mongo\/list-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "auth": { "Project": [] } @@ -36151,34 +42187,31 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/health\/queue\/region-manager": { - "get": { - "summary": "Get region manager queue", - "operationId": "healthGetQueueRegionManager", + }, + "post": { + "summary": "Create branch", + "operationId": "mongoCreateBranch", "tags": [ - "health" + "mongo" ], - "description": "Get region manager queue.", + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", "responses": { - "200": { - "description": "Health Queue", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36186,22 +42219,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueRegionManager", - "group": null, + "method": "createBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "health\/get-queue-region-manager.md", + "demo": "mongo\/create-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-region-manager.md", "auth": { "Project": [] } @@ -36214,34 +42246,60 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 100 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "type": "string", + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" + } + } + } + } + } + } } }, - "\/health\/queue\/stats-resources": { - "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", + "\/mongo\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "mongoDeleteBranch", "tags": [ - "health" + "mongo" ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", "responses": { - "200": { - "description": "Health Queue", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36249,22 +42307,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", + "method": "deleteBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "health\/get-queue-stats-resources.md", + "demo": "mongo\/delete-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "auth": { "Project": [] } @@ -36277,34 +42334,43 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BRANCH_ID>" + }, + "in": "path" } ] } }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", + "\/mongo\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mongoUpdateCredentials", "tags": [ - "health" + "mongo" ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", "responses": { "200": { - "description": "Health Queue", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36312,22 +42378,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", + "method": "updateCredentials", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-queue-usage.md", + "demo": "mongo\/update-credentials.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "auth": { "Project": [] } @@ -36340,34 +42405,33 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/health\/queue\/threats": { - "get": { - "summary": "Get threats queue", - "operationId": "healthGetQueueThreats", + "\/mongo\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "mongoCreateFailover", "tags": [ - "health" + "mongo" ], - "description": "Get threats queue.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "200": { - "description": "Health Queue", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36375,22 +42439,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueThreats", - "group": null, + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "health\/get-queue-threats.md", + "demo": "mongo\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-threats.md", "auth": { "Project": [] } @@ -36403,34 +42466,50 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 100 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true + } + } + } + } + } + } } }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", + "\/mongo\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "mongoUpdateMaintenance", "tags": [ - "health" + "mongo" ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Health Queue", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36438,22 +42517,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", + "method": "updateMaintenance", + "group": "mongo", "cookies": false, "type": "", - "demo": "health\/get-queue-webhooks.md", + "demo": "mongo\/update-maintenance.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "auth": { "Project": [] } @@ -36466,34 +42544,59 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } } }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", + "\/mongo\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "mongoCreateMigration", "tags": [ - "health" + "mongo" ], - "description": "Check the Appwrite storage device is up and connection is successful.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", "responses": { "200": { - "description": "Health Status", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36501,22 +42604,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getStorage", - "group": "storage", + "method": "createMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "health\/get-storage.md", + "demo": "mongo\/create-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "auth": { "Project": [] } @@ -36526,24 +42628,61 @@ "Project": [], "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" + }, + "specification": { + "type": "string", + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } } }, - "\/health\/storage\/local": { + "\/mongo\/{databaseId}\/operations": { "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", + "summary": "List operations", + "operationId": "mongoListOperations", "tags": [ - "health" + "mongo" ], - "description": "Check the Appwrite local storage device is up and connection is successful.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Health Status", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -36551,49 +42690,94 @@ }, "deprecated": false, "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "health\/get-storage-local.md", + "demo": "mongo\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] } }, - "\/health\/time": { + "\/mongo\/{databaseId}\/pitr": { "get": { - "summary": "Get time", - "operationId": "healthGetTime", + "summary": "Get PITR", + "operationId": "mongoGetPitr", "tags": [ - "health" + "mongo" ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", "responses": { "200": { - "description": "Health Time", + "description": "PITRWindows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthTime" + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" } } } @@ -36601,22 +42785,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTime", - "group": "health", + "method": "getPitr", + "group": "pitr", "cookies": false, "type": "", - "demo": "health\/get-time.md", + "demo": "mongo\/get-pitr.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "auth": { "Project": [] } @@ -36626,24 +42809,36 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } ] } }, - "\/locale": { + "\/mongo\/{databaseId}\/replicas": { "get": { - "summary": "Get user locale", - "operationId": "localeGet", + "summary": "Get replicas", + "operationId": "mongoGetReplicas", "tags": [ - "locale" + "mongo" ], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Locale", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/locale" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -36651,23 +42846,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "locale\/get.md", + "demo": "mongo\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "auth": { "Project": [] } @@ -36675,28 +42868,38 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } ] } }, - "\/locale\/codes": { + "\/mongo\/{databaseId}\/restorations": { "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", + "summary": "List restorations", + "operationId": "mongoListRestorations", "tags": [ - "locale" + "mongo" ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Locale codes list", + "description": "Dedicated database restorations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" } } } @@ -36704,23 +42907,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCodes", - "group": null, + "method": "listRestorations", + "group": "restorations", "cookies": false, "type": "", - "demo": "locale\/list-codes.md", + "demo": "mongo\/list-restorations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [] } @@ -36728,28 +42929,80 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", + }, + "post": { + "summary": "Create restoration", + "operationId": "mongoCreateRestoration", "tags": [ - "locale" + "mongo" ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Continents List", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/continentList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -36757,23 +43010,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listContinents", - "group": null, + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "locale\/list-continents.md", + "demo": "mongo\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [] } @@ -36781,28 +43032,68 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" + }, + "backupId": { + "type": "string", + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } } }, - "\/locale\/countries": { + "\/mongo\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "List countries", - "operationId": "localeListCountries", + "summary": "Get restoration", + "operationId": "mongoGetRestoration", "tags": [ - "locale" + "mongo" ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { "200": { - "description": "Countries List", + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -36810,23 +43101,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountries", - "group": null, + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "locale\/list-countries.md", + "demo": "mongo\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [] } @@ -36834,28 +43123,48 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RESTORATION_ID>" + }, + "in": "path" } ] } }, - "\/locale\/countries\/eu": { + "\/mongo\/{databaseId}\/status": { "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", + "summary": "Get status", + "operationId": "mongoGetStatus", "tags": [ - "locale" + "mongo" ], - "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.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "Countries List", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/databaseStatus" } } } @@ -36863,23 +43172,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesEU", - "group": null, + "method": "getStatus", + "group": "mongo", "cookies": false, "type": "", - "demo": "locale\/list-countries-eu.md", + "demo": "mongo\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { "Project": [] } @@ -36887,28 +43194,38 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } ] } }, - "\/locale\/countries\/phones": { - "get": { - "summary": "List countries phone codes", - "operationId": "localeListCountriesPhones", + "\/mongo\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "mongoCreateUpgrade", "tags": [ - "locale" + "mongo" ], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { "200": { - "description": "Phones List", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/phoneList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -36916,23 +43233,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesPhones", - "group": null, + "method": "createUpgrade", + "group": "mongo", "cookies": false, "type": "", - "demo": "locale\/list-countries-phones.md", + "demo": "mongo\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "auth": { "Project": [] } @@ -36940,28 +43255,57 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "type": "string", + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } } }, - "\/locale\/currencies": { + "\/mysql": { "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", + "summary": "List databases", + "operationId": "mysqlList", "tags": [ - "locale" + "mysql" ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "description": "List all dedicated databases. Results support pagination.", "responses": { "200": { - "description": "Currencies List", + "description": "Dedicated databases list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/currencyList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" } } } @@ -36969,23 +43313,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCurrencies", - "group": null, + "method": "list", + "group": "mysql", "cookies": false, "type": "", - "demo": "locale\/list-currencies.md", + "demo": "mysql\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [] } @@ -36993,28 +43335,39 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", + }, + "post": { + "summary": "Create database", + "operationId": "mysqlCreate", "tags": [ - "locale" + "mysql" ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", "responses": { - "200": { - "description": "Languages List", + "201": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/languageList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -37022,23 +43375,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLanguages", - "group": null, + "method": "create", + "group": "mysql", "cookies": false, "type": "", - "demo": "locale\/list-languages.md", + "demo": "mysql\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "databases.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [] } @@ -37046,132 +43397,141 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } - ] - } - }, - "\/manager\/blocks": { - "post": { - "summary": "Create a new resource block for a project", - "operationId": "managerCreateBlock", - "tags": [ - "manager" ], - "description": "Creates a new resource block.", - "responses": { - "201": { - "description": "Block", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/block" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBlock", - "group": null, - "cookies": false, - "type": "", - "demo": "manager\/create-block.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "", - "platforms": [ - "console" - ], - "packaging": false, - "public": true - }, "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "projectId": { + "databaseId": { "type": "string", - "description": "Project ID", - "x-example": "<PROJECT_ID>" + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { + "idGenerator": "ID.unique" + } }, - "resourceType": { + "name": { "type": "string", - "description": "Resource type to block (e.g., projects, functions, databases, storage, etc.)", - "x-example": "projects", - "enum": [ - "projects", - "functions", - "sites", - "databases", - "buckets", - "providers", - "topics", - "subscribers", - "messages" - ], - "x-enum-name": "BlockResourceType", - "x-enum-keys": [ - "projects", - "functions", - "sites", - "databases", - "buckets", - "providers", - "topics", - "subscribers", - "messages" - ] + "description": "Database display name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "resourceId": { + "version": { "type": "string", - "description": "Optional resource ID (if omitted, all resources of this type will be blocked)", - "default": "", - "x-example": "<RESOURCE_ID>" + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true }, - "reason": { + "standbyRegion": { "type": "string", - "description": "Optional reason why the resource is blocked", - "default": "", - "x-example": "<REASON>" + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true }, - "expiredAt": { - "type": "string", - "description": "Optional expiration date for the block", - "default": "", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "default": 15, + "x-example": 5, + "format": "int32" + }, + "pitr": { + "type": "boolean", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "default": true, + "x-example": false + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, + "x-example": false + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" } }, "required": [ - "projectId", - "resourceType" + "databaseId", + "name" ] } } } } - }, - "delete": { - "summary": "Delete resource blocks for a project", - "operationId": "managerDeleteBlock", + } + }, + "\/mysql\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "mysqlListSpecifications", "tags": [ - "manager" + "mysql" ], - "description": "Deletes resource blocks for a project.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "BlockDelete", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/blockDelete" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -37179,94 +43539,48 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteBlock", - "group": null, + "method": "listSpecifications", + "group": "mysql", "cookies": false, "type": "", - "demo": "manager\/delete-block.md", + "demo": "mysql\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true + "public": true, + "auth": { + "Project": [] + } }, - "parameters": [ - { - "name": "projectId", - "description": "Project ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "query" - }, - { - "name": "resourceType", - "description": "Resource type to unblock", - "required": true, - "schema": { - "type": "string", - "x-example": "projects", - "enum": [ - "projects", - "functions", - "sites", - "databases", - "buckets", - "providers", - "topics", - "subscribers", - "messages" - ], - "x-enum-name": "BlockResourceType", - "x-enum-keys": [ - "projects", - "functions", - "sites", - "databases", - "buckets", - "providers", - "topics", - "subscribers", - "messages" - ] - }, - "in": "query" - }, + "security": [ { - "name": "resourceId", - "description": "Optional resource ID (if omitted, all blocks of this type will be removed)", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE_ID>", - "default": "" - }, - "in": "query" + "Project": [], + "Key": [] } ] } }, - "\/manager\/blocks\/{projectId}": { + "\/mysql\/{databaseId}": { "get": { - "summary": "List all resource blocks for a project", - "operationId": "managerListBlocks", + "summary": "Get database", + "operationId": "mysqlGet", "tags": [ - "manager" + "mysql" ], - "description": "Lists all resource blocks for a project.", + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", "responses": { "200": { - "description": "Blocks list", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/blockList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -37274,51 +43588,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "listBlocks", - "group": null, + "method": "get", + "group": "mysql", "cookies": false, "type": "", - "demo": "manager\/list-blocks.md", + "demo": "mysql\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true + "public": true, + "auth": { + "Project": [] + } }, + "security": [ + { + "Project": [], + "Key": [] + } + ], "parameters": [ { - "name": "projectId", - "description": "Project ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] - } - }, - "\/manager\/cache": { - "delete": { - "summary": "Clear internal cache", - "operationId": "managerDeleteCache", + }, + "patch": { + "summary": "Update database", + "operationId": "mysqlUpdate", "tags": [ - "manager" + "mysql" ], - "description": "Clears internal cache.", + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", "responses": { "200": { - "description": "File", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -37326,237 +43647,276 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteCache", - "group": "cache", + "method": "update", + "group": "mysql", "cookies": false, "type": "", - "demo": "manager\/delete-cache.md", + "demo": "mysql\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true + "public": true, + "auth": { + "Project": [] + } }, - "parameters": [ - { - "name": "region", - "description": "Target region.", - "required": false, - "schema": { - "type": "string", - "x-example": "fra", - "enum": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ], - "x-enum-name": "Region", - "x-enum-keys": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ] - }, - "in": "query" - }, - { - "name": "cache", - "description": "Cache target.", - "required": false, - "schema": { - "type": "string", - "x-example": "cache", - "enum": [ - "cache", - "timelimit", - "locks", - "pubsub", - "queue", - "all" - ], - "x-enum-name": "CacheTarget", - "x-enum-keys": [ - "cache", - "timelimit", - "locks", - "pubsub", - "queue", - "all" - ], - "default": "cache" - }, - "in": "query" - }, - { - "name": "all", - "description": "Clear the entire selected cache target.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": false - }, - "in": "query" - }, - { - "name": "database", - "description": "Database cache scope.", - "required": false, - "schema": { - "type": "string", - "x-example": "console", - "enum": [ - "console", - "project", - "logs" - ], - "x-enum-name": "CacheDatabase", - "x-enum-keys": [ - "console", - "project", - "logs" - ], - "default": "console" - }, - "in": "query" - }, - { - "name": "projectId", - "description": "Project ID for project or logs database cache.", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>", - "default": "" - }, - "in": "query" - }, + "security": [ { - "name": "collectionId", - "description": "Collection ID.", - "required": false, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>", - "default": "" - }, - "in": "query" - }, + "Project": [], + "Key": [] + } + ], + "parameters": [ { - "name": "documentId", - "description": "Document ID.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>", - "default": "" + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] - } - }, - "\/manager\/users\/status": { - "patch": { - "summary": "Update a user status by ID or email", - "operationId": "managerUpdateUserStatus", - "tags": [ - "manager" ], - "description": "Updates a console user status using a user ID or email address.", - "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { + "type": "boolean", + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", + "x-example": false, + "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "mysqlDelete", + "tags": [ + "mysql" + ], + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "updateUserStatus", - "group": "users", + "method": "delete", + "group": "mysql", "cookies": false, "type": "", - "demo": "manager\/update-user-status.md", + "demo": "mysql\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } }, - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": "", - "x-example": "<USER_ID>" - }, - "email": { - "type": "string", - "description": "User email address.", - "default": "", - "x-example": "<EMAIL>" - }, - "status": { - "type": "boolean", - "description": "User status. Set to `false` to block and `true` to unblock.", - "x-example": false - }, - "reason": { - "type": "string", - "description": "Optional reason when blocking a user. Accepted for parity with the CLI task but not persisted.", - "default": "", - "x-example": "<REASON>" - } - }, - "required": [ - "status" - ] - } - } + "security": [ + { + "Project": [], + "Key": [] } - } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/messages": { + "\/mysql\/{databaseId}\/backups": { "get": { - "summary": "List messages", - "operationId": "messagingListMessages", + "summary": "List backups", + "operationId": "mysqlListBackups", "tags": [ - "messaging" + "mysql" ], - "description": "Get a list of all messages from the current Appwrite project.", + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Message list", + "description": "BackupList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/messageList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" } } } @@ -37564,22 +43924,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMessages", - "group": "messages", + "method": "listBackups", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/list-messages.md", + "demo": "mysql\/list-backups.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "auth": { "Project": [] } @@ -37591,9 +43950,19 @@ } ], "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", "required": false, "schema": { "type": "array", @@ -37603,47 +43972,23 @@ "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] - } - }, - "\/messaging\/messages\/email": { + }, "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", + "summary": "Create backup", + "operationId": "mysqlCreateBackup", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new email message.", + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", "responses": { - "201": { - "description": "Message", + "202": { + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -37651,22 +43996,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEmail", - "group": "messages", + "method": "createBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/create-email.md", + "demo": "mysql\/create-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "auth": { "Project": [] } @@ -37677,130 +44021,52 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>" - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { + "type": { "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" } - }, - "required": [ - "messageId", - "subject", - "content" - ] + } } } } } } }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", + "\/mysql\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "mysqlListBackupPolicies", "tags": [ - "messaging" + "mysql" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "Message", + "description": "Backup policy list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -37808,22 +44074,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmail", - "group": "messages", + "method": "listBackupPolicies", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/update-email.md", + "demo": "mysql\/list-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "auth": { "Project": [] } @@ -37836,129 +44101,44 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/push": { + ] + }, "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", + "summary": "Create backup policy", + "operationId": "mysqlCreateBackupPolicy", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new push notification.", + "description": "Create a scheduled backup policy for a dedicated database.", "responses": { "201": { - "description": "Message", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -37966,22 +44146,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPush", - "group": "messages", + "method": "createBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/create-push.md", + "demo": "mysql\/create-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "auth": { "Project": [] } @@ -37992,152 +44171,66 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "messageId": { + "policyId": { "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", - "default": "", - "x-example": "<SOUND>" + "idGenerator": "ID.unique" + } }, - "color": { + "name": { "type": "string", - "description": "Color for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<COLOR>" + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "tag": { + "schedule": { "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", - "default": "", - "x-example": "<TAG>" + "description": "Schedule CRON syntax.", + "x-example": null }, - "badge": { + "retention": { "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null, + "description": "Days to keep backups before deletion.", + "x-example": 1, "format": "int32" }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { + "type": { "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" }, - "critical": { + "enabled": { "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, "x-example": false - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [ - "normal", - "high" - ] } }, "required": [ - "messageId" + "policyId", + "name", + "schedule", + "retention" ] } } @@ -38145,21 +44238,90 @@ } } }, - "\/messaging\/messages\/push\/{messageId}": { + "\/mysql\/{databaseId}\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "mysqlGetBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Get a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mysql\/get-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", + "summary": "Update backup policy", + "operationId": "mysqlUpdateBackupPolicy", "tags": [ - "messaging" + "mysql" ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Update a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Message", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -38167,22 +44329,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePush", - "group": "messages", + "method": "updateBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/update-push.md", + "demo": "mysql\/update-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "auth": { "Project": [] } @@ -38195,12 +44356,22 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, "in": "path" } @@ -38211,250 +44382,139 @@ "schema": { "type": "object", "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { + "name": { "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "x-example": "<COLOR>", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", "x-nullable": true }, - "tag": { + "schedule": { "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "x-example": "<TAG>", - "x-nullable": true + "description": "Schedule CRON syntax.", + "x-example": null }, - "badge": { + "retention": { "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "x-example": null, + "description": "Days to keep backups before deletion.", + "x-example": 1, "format": "int32", "x-nullable": true }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "critical": { + "enabled": { "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "description": "Is policy enabled? When disabled, no backups will be taken.", "x-example": false, "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [ - "normal", - "high" - ], - "x-nullable": true } } } } } } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mysqlDeleteBackupPolicy", + "tags": [ + "mysql" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mysql\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", + "\/mysql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mysqlUpdateBackupStorage", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new SMS message.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { - "201": { - "description": "Message", + "200": { + "description": "BackupStorageConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createSms", - "group": "messages", + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/create-sms.md", + "demo": "mysql\/update-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], + "public": true, "auth": { "Project": [] } @@ -38465,69 +44525,68 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "messageId": { + "provider": { "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" }, - "content": { + "bucket": { "type": "string", - "description": "SMS Content.", - "x-example": "<CONTENT>" + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "region": { + "type": "string", + "description": "Storage region.", + "default": "", + "x-example": "<REGION>" }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "<ENDPOINT>" }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" }, - "scheduledAt": { + "secretKey": { "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" } }, "required": [ - "messageId", - "content" + "provider", + "bucket", + "accessKey", + "secretKey" ] } } @@ -38535,111 +44594,107 @@ } } }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", + "\/mysql\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "mysqlGetBackup", "tags": [ - "messaging" + "mysql" ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "Message", + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateSms", - "group": "messages", + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/update-sms.md", + "demo": "mysql\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "mysqlDeleteBackup", + "tags": [ + "mysql" + ], + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackup", + "group": "backups", + "cookies": false, + "type": "", + "demo": "mysql\/delete-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" ], "auth": { "Project": [] @@ -38653,90 +44708,43 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/messaging\/messages\/{messageId}": { + "\/mysql\/{databaseId}\/branches": { "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", + "summary": "List branches", + "operationId": "mysqlListBranches", "tags": [ - "messaging" + "mysql" ], - "description": "Get a message by its unique ID.\n", + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", "responses": { "200": { - "description": "Message", + "description": "BranchList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" } } } @@ -38744,22 +44752,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getMessage", - "group": "messages", + "method": "listBranches", + "group": "branches", "cookies": false, "type": "", - "demo": "messaging\/get-message.md", + "demo": "mysql\/list-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "auth": { "Project": [] } @@ -38772,47 +44779,53 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] }, - "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", + "post": { + "summary": "Create branch", + "operationId": "mysqlCreateBranch", "tags": [ - "messaging" + "mysql" ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", "responses": { - "204": { - "description": "No content" + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "messages", + "method": "createBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "messaging\/delete.md", + "demo": "mysql\/create-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "auth": { "Project": [] } @@ -38825,33 +44838,60 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "type": "string", + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" + } + } + } + } + } + } } }, - "\/messaging\/messages\/{messageId}\/logs": { - "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", + "\/mysql\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "mysqlDeleteBranch", "tags": [ - "messaging" + "mysql" ], - "description": "Get the message activity logs listed by its unique ID.", + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", "responses": { - "200": { - "description": "Logs List", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -38859,22 +44899,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", + "method": "deleteBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "messaging\/list-message-logs.md", + "demo": "mysql\/delete-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "auth": { "Project": [] } @@ -38887,57 +44926,43 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "branchId", + "description": "Branch ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<BRANCH_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/messaging\/messages\/{messageId}\/targets": { - "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", + "\/mysql\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mysqlUpdateCredentials", "tags": [ - "messaging" + "mysql" ], - "description": "Get a list of the targets associated with a message.", + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", "responses": { "200": { - "description": "Target list", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/targetList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -38945,22 +44970,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTargets", - "group": "messages", + "method": "updateCredentials", + "group": "mysql", "cookies": false, "type": "", - "demo": "messaging\/list-targets.md", + "demo": "mysql\/update-credentials.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "auth": { "Project": [] } @@ -38973,57 +44997,33 @@ ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "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: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] } }, - "\/messaging\/providers": { - "get": { - "summary": "List providers", - "operationId": "messagingListProviders", + "\/mysql\/{databaseId}\/executions": { + "post": { + "summary": "Create execution", + "operationId": "mysqlCreateExecution", "tags": [ - "messaging" + "mysql" ], - "description": "Get a list of all providers from the current Appwrite project.", + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", "responses": { "200": { - "description": "Provider list", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/providerList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" } } } @@ -39031,22 +45031,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProviders", - "group": "providers", + "method": "createExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "messaging\/list-providers.md", + "demo": "mysql\/create-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "auth": { "Project": [] } @@ -39059,153 +45058,88 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string", + "description": "SQL statement to execute. Exactly one statement per request.", + "x-example": "<SQL>" + }, + "bindings": { + "type": "object", + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "timeoutSeconds": { + "type": "integer", + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "sql" + ] + } + } + } + } } }, - "\/messaging\/providers\/apns": { + "\/mysql\/{databaseId}\/failovers": { "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", + "summary": "Create failover", + "operationId": "mysqlCreateFailover", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new Apple Push Notification service provider.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "201": { - "description": "Provider", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "messaging\/create-apns-provider.md", + "demo": "mysql\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [] } @@ -39216,180 +45150,74 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { + "targetReplicaId": { "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", "x-nullable": true } - }, - "required": [ - "providerId", - "name" - ] + } } } } } } }, - "\/messaging\/providers\/apns\/{providerId}": { + "\/mysql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", + "summary": "Update maintenance", + "operationId": "mysqlUpdateMaintenance", "tags": [ - "messaging" + "mysql" ], - "description": "Update a Apple Push Notification service provider by its unique ID.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Provider", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", + "method": "updateMaintenance", + "group": "mysql", "cookies": false, "type": "", - "demo": "messaging\/update-apns-provider.md", + "demo": "mysql\/update-maintenance.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [] } @@ -39402,12 +45230,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -39418,157 +45246,65 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { + "day": { "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false, - "x-nullable": true + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" } - } + }, + "required": [ + "day", + "hourUtc" + ] } } } } } }, - "\/messaging\/providers\/fcm": { + "\/mysql\/{databaseId}\/migrations": { "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", + "summary": "Create migration", + "operationId": "mysqlCreateMigration", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new Firebase Cloud Messaging provider.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", + "method": "createMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "messaging\/create-fcm-provider.md", + "demo": "mysql\/create-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [] } @@ -39579,42 +45315,38 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { + "targetType": { "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" }, - "name": { + "specification": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", "x-nullable": true } }, "required": [ - "providerId", - "name" + "targetType" ] } } @@ -39622,106 +45354,138 @@ } } }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", + "\/mysql\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "mysqlListOperations", + "tags": [ + "mysql" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOperations", + "group": "operations", + "cookies": false, + "type": "", + "demo": "mysql\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/mysql\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "mysqlGetPitr", "tags": [ - "messaging" + "mysql" ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", "responses": { "200": { - "description": "Provider", + "description": "PITRWindows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", + "method": "getPitr", + "group": "pitr", "cookies": false, "type": "", - "demo": "messaging\/update-fcm-provider.md", + "demo": "mysql\/get-pitr.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [] } @@ -39734,63 +45498,33 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", + "\/mysql\/{databaseId}\/pooler": { + "get": { + "summary": "Get pooler", + "operationId": "mysqlGetPooler", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new Mailgun provider.", + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -39798,22 +45532,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", + "method": "getPooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "messaging\/create-mailgun-provider.md", + "demo": "mysql\/get-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "auth": { "Project": [] } @@ -39824,101 +45557,33 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { + ] + }, "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", + "summary": "Update pooler", + "operationId": "mysqlUpdatePooler", "tags": [ - "messaging" + "mysql" ], - "description": "Update a Mailgun provider by its unique ID.", + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", "responses": { "200": { - "description": "Provider", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -39926,22 +45591,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", + "method": "updatePooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "messaging\/update-mailgun-provider.md", + "demo": "mysql\/update-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "auth": { "Project": [] } @@ -39954,12 +45618,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -39970,60 +45634,55 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "apiKey": { + "mode": { "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "x-example": "transaction", + "x-nullable": true }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" + "maxConnections": { + "type": "integer", + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "x-example": 10, + "format": "int32", + "x-nullable": true }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "x-example": 1, + "format": "int32", "x-nullable": true }, - "enabled": { + "readWriteSplitting": { "type": "boolean", - "description": "Set as enabled.", + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", "x-example": false, "x-nullable": true }, - "fromName": { + "poolerCpuRequest": { "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "x-example": "<POOLER_CPU_REQUEST>", + "x-nullable": true }, - "fromEmail": { + "poolerCpuLimit": { "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "x-example": "<POOLER_CPU_LIMIT>", + "x-nullable": true }, - "replyToName": { + "poolerMemoryRequest": { "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "x-example": "<POOLER_MEMORY_REQUEST>", + "x-nullable": true }, - "replyToEmail": { + "poolerMemoryLimit": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "x-example": "<POOLER_MEMORY_LIMIT>", + "x-nullable": true } } } @@ -40032,21 +45691,21 @@ } } }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", + "\/mysql\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "mysqlGetReplicas", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new MSG91 provider.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -40054,22 +45713,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "messaging\/create-msg-91-provider.md", + "demo": "mysql\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "auth": { "Project": [] } @@ -40080,75 +45738,138 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } + ] } }, - "\/messaging\/providers\/msg91\/{providerId}": { - "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", + "\/mysql\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "mysqlListRestorations", "tags": [ - "messaging" + "mysql" ], - "description": "Update a MSG91 provider by its unique ID.", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "Dedicated database restorations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRestorations", + "group": "restorations", + "cookies": false, + "type": "", + "demo": "mysql\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create restoration", + "operationId": "mysqlCreateRestoration", + "tags": [ + "mysql" + ], + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Provider", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -40156,22 +45877,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "messaging\/update-msg-91-provider.md", + "demo": "mysql\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "auth": { "Project": [] } @@ -40184,12 +45904,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -40200,35 +45920,24 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "templateId": { + "type": { "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" }, - "senderId": { + "backupId": { "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true }, - "authKey": { + "targetTime": { "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } } } @@ -40237,21 +45946,21 @@ } } }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", + "\/mysql\/{databaseId}\/restorations\/{restorationId}": { + "get": { + "summary": "Get restoration", + "operationId": "mysqlGetRestoration", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new Resend provider.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -40259,22 +45968,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createResendProvider", - "group": "providers", + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "messaging\/create-resend-provider.md", + "demo": "mysql\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", "auth": { "Project": [] } @@ -40285,89 +45993,45 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RESTORATION_ID>" + }, + "in": "path" } - } + ] } }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", + "\/mysql\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "mysqlGetStatus", "tags": [ - "messaging" + "mysql" ], - "description": "Update a Resend provider by its unique ID.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "Provider", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/databaseStatus" } } } @@ -40375,22 +46039,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", + "method": "getStatus", + "group": "mysql", "cookies": false, "type": "", - "demo": "messaging\/update-resend-provider.md", + "demo": "mysql\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", "auth": { "Project": [] } @@ -40403,87 +46066,33 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } + ] } }, - "\/messaging\/providers\/sendgrid": { + "\/mysql\/{databaseId}\/upgrades": { "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", + "summary": "Create upgrade", + "operationId": "mysqlCreateUpgrade", "tags": [ - "messaging" + "mysql" ], - "description": "Create a new Sendgrid provider.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -40491,22 +46100,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", + "method": "createUpgrade", + "group": "mysql", "cookies": false, "type": "", - "demo": "messaging\/create-sendgrid-provider.md", + "demo": "mysql\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "auth": { "Project": [] } @@ -40517,67 +46125,32 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { + "targetVersion": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" } }, "required": [ - "providerId", - "name" + "targetVersion" ] } } @@ -40585,21 +46158,21 @@ } } }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", + "\/notifications": { + "get": { + "summary": "List notifications", + "operationId": "notificationsList", "tags": [ - "messaging" + "notifications" ], - "description": "Update a Sendgrid provider by its unique ID.", + "description": "Get the list of notifications for the currently logged in console user. Use queries to filter the results by attributes such as read status, view timestamps, or creation date.\n", "responses": { "200": { - "description": "Provider", + "description": "Notifications List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/notificationList" } } } @@ -40607,115 +46180,62 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", + "method": "list", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/update-sendgrid-provider.md", + "demo": "notifications\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "account", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/notifications\/list-notifications.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: read, type, channel, messageId, projectId, resourceType, resourceId, parentResourceType, parentResourceId, firstSeen, lastSeen", + "required": false, "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } + "in": "query" } - } + ] } }, - "\/messaging\/providers\/ses": { - "post": { - "summary": "Create Amazon SES provider", - "operationId": "messagingCreateSesProvider", + "\/notifications\/{notificationId}": { + "patch": { + "summary": "Update notification", + "operationId": "notificationsUpdate", "tags": [ - "messaging" + "notifications" ], - "description": "Create a new Amazon SES provider.", + "description": "Update a notification by its unique ID. Use the `read` parameter to mark the notification as read or unread.\n", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Notification", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/notification" } } } @@ -40723,105 +46243,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSesProvider", - "group": "providers", + "method": "update", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-ses-provider.md", + "demo": "notifications\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "account", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/notifications\/update-notification.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "accessKey": { - "type": "string", - "description": "AWS access key ID.", - "default": "", - "x-example": "<ACCESS_KEY>" - }, - "secretKey": { - "type": "string", - "description": "AWS secret access key.", - "default": "", - "x-example": "<SECRET_KEY>" - }, - "region": { - "type": "string", - "description": "AWS region, for example us-east-1.", - "default": "", - "x-example": "<REGION>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { + "parameters": [ + { + "name": "notificationId", + "description": "Notification ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<NOTIFICATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "read": { "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "description": "Notification read status.", + "x-example": false } }, "required": [ - "providerId", - "name" + "read" ] } } @@ -40829,21 +46300,21 @@ } } }, - "\/messaging\/providers\/ses\/{providerId}": { - "patch": { - "summary": "Update Amazon SES provider", - "operationId": "messagingUpdateSesProvider", + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "tags": [ - "messaging" + "oauth2" ], - "description": "Update an Amazon SES provider by its unique ID.", + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Provider", + "description": "OAuth2 Approve", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2Approve" } } } @@ -40851,40 +46322,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSesProvider", - "group": "providers", + "method": "approve", + "group": "authorization", "cookies": false, "type": "", - "demo": "messaging\/update-ses-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "demo": "oauth2\/approve.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-ses-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" } @@ -40895,200 +46367,307 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "accessKey": { - "type": "string", - "description": "AWS access key ID.", - "default": "", - "x-example": "<ACCESS_KEY>" - }, - "secretKey": { - "type": "string", - "description": "AWS secret access key.", - "default": "", - "x-example": "<SECRET_KEY>" - }, - "region": { - "type": "string", - "description": "AWS region, for example us-east-1.", - "default": "", - "x-example": "<REGION>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { + "grant_id": { "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "<GRANT_ID>" }, - "replyToName": { + "authorization_details": { "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", "default": "", - "x-example": "<REPLY_TO_NAME>" + "x-example": "<AUTHORIZATION_DETAILS>" }, - "replyToEmail": { + "scope": { "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "description": "Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.", "default": "", - "x-example": "<REPLY_TO_EMAIL>" + "x-example": "<SCOPE>" } - } + }, + "required": [ + "grant_id" + ] } } } } } }, - "\/messaging\/providers\/smtp": { - "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", + "\/oauth2\/{project_id}\/authorize": { + "get": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizeGet", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new SMTP provider.", + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", + "method": "authorize", + "group": "authorization", "cookies": false, "type": "", - "demo": "messaging\/create-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" + "public": true, + "auth": { + "ProjectPath": [] + } + }, + "security": [ + { + "ProjectPath": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } + { + "name": "client_id", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "required": false, + "schema": { + "type": "string", + "x-example": "<CLIENT_ID>", + "default": "" }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" + "in": "query" + }, + { + "name": "redirect_uri", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "response_type", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "scope", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SCOPE>", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "<STATE>", + "default": "" + }, + "in": "query" + }, + { + "name": "nonce", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "required": false, + "schema": { + "type": "string", + "x-example": "<NONCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "<CODE_CHALLENGE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "s256", + "default": "" + }, + "in": "query" + }, + { + "name": "prompt", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROMPT>", + "default": "" + }, + "in": "query" + }, + { + "name": "max_age", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0 + }, + "in": "query" + }, + { + "name": "authorization_details", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "required": false, + "schema": { + "type": "string", + "x-example": "<AUTHORIZATION_DETAILS>", + "default": "" + }, + "in": "query" + }, + { + "name": "resource", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "required": false, + "schema": { + "type": "string", + "default": [] + }, + "in": "query" + }, + { + "name": "audience", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "<AUDIENCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "request_uri", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "required": false, + "schema": { + "type": "string", + "x-example": "<REQUEST_URI>", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizePost", + "tags": [ + "oauth2" + ], + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Authorize", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Authorize" } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "authorizePost", + "group": "authorization", + "cookies": false, + "type": "", + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client", + "server" ], + "packaging": false, + "public": true, "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" } ], "requestBody": { @@ -41097,254 +46676,157 @@ "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { + "client_id": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "<CLIENT_ID>" }, - "host": { + "redirect_uri": { "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1, - "format": "int32" + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" }, - "username": { + "response_type": { "type": "string", - "description": "Authentication username.", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", "default": "", - "x-example": "<USERNAME>" + "x-example": "" }, - "password": { + "scope": { "type": "string", - "description": "Authentication password.", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", "default": "", - "x-example": "password", - "format": "password" + "x-example": "<SCOPE>" }, - "encryption": { + "state": { "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [ - "none", - "ssl", - "tls" - ] + "description": "OAuth2 state. You receive this back in the redirect URI.", + "default": "", + "x-example": "<STATE>" }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false + "nonce": { + "type": "string", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "default": "", + "x-example": "<NONCE>" }, - "mailer": { + "code_challenge": { "type": "string", - "description": "The value to use for the X-Mailer header.", + "description": "PKCE code challenge. Required when OAuth2 app is public.", "default": "", - "x-example": "<MAILER>" + "x-example": "<CODE_CHALLENGE>" }, - "fromName": { + "code_challenge_method": { "type": "string", - "description": "Sender Name.", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", "default": "", - "x-example": "<FROM_NAME>" + "x-example": "s256" }, - "fromEmail": { + "prompt": { "type": "string", - "description": "Sender email address.", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", "default": "", - "x-example": "email@example.com", - "format": "email" + "x-example": "<PROMPT>" }, - "replyToName": { + "max_age": { + "type": "integer", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "authorization_details": { "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", "default": "", - "x-example": "<REPLY_TO_NAME>" + "x-example": "<AUTHORIZATION_DETAILS>" }, - "replyToEmail": { + "resource": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", "default": "", - "x-example": "email@example.com", - "format": "email" + "x-example": "<AUDIENCE>" }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "request_uri": { + "type": "string", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "default": "", + "x-example": "<REQUEST_URI>" } - }, - "required": [ - "providerId", - "name", - "host" - ] + } } } } } } }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", + "\/oauth2\/{project_id}\/device_authorization": { + "post": { + "summary": "OAuth2 Device Authorization", + "operationId": "oauth2CreateDeviceAuthorization", "tags": [ - "messaging" + "oauth2" ], - "description": "Update a SMTP provider by its unique ID.", + "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", "responses": { "200": { - "description": "Provider", + "description": "OAuth2 Device Authorization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", + "method": "createDeviceAuthorization", + "group": "authorization", "cookies": false, "type": "", - "demo": "messaging\/update-smtp-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-device-authorization.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } - }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true - } - ], + "public": true, "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" } @@ -41355,150 +46837,374 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { + "client_id": { "type": "string", - "description": "Authentication password.", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", "default": "", - "x-example": "password", - "format": "password" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [ - "none", - "ssl", - "tls" - ] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false, - "x-nullable": true + "x-example": "<CLIENT_ID>" }, - "mailer": { + "scope": { "type": "string", - "description": "The value to use for the X-Mailer header.", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", "default": "", - "x-example": "<MAILER>" + "x-example": "<SCOPE>" }, - "fromName": { + "authorization_details": { "type": "string", - "description": "Sender Name.", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", "default": "", - "x-example": "<FROM_NAME>" + "x-example": "<AUTHORIZATION_DETAILS>" }, - "fromEmail": { + "resource": { "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null }, - "replyToName": { + "audience": { "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { + "x-example": "<AUDIENCE>" + } + } + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", + "tags": [ + "oauth2" + ], + "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", + "responses": { + "201": { + "description": "OAuth2 Grant", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Grant" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createGrant", + "group": "grants", + "cookies": false, + "type": "", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectPath": [] + } + }, + "security": [ + { + "ProjectPath": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "user_code": { "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "description": "User code displayed on the device.", + "x-example": "<USER_CODE>" } + }, + "required": [ + "user_code" + ] + } + } + } + } + } + }, + "\/oauth2\/{project_id}\/grants\/{grant_id}": { + "get": { + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", + "tags": [ + "oauth2" + ], + "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", + "responses": { + "200": { + "description": "OAuth2 Grant", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Grant" } } } } - } - } - }, - "\/messaging\/providers\/telesign": { + }, + "deprecated": false, + "x-appwrite": { + "method": "getGrant", + "group": "grants", + "cookies": false, + "type": "", + "demo": "oauth2\/get-grant.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectPath": [] + } + }, + "security": [ + { + "ProjectPath": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "required": true, + "schema": { + "type": "string", + "x-example": "<GRANT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/oauth2\/{project_id}\/logout": { + "get": { + "summary": "OAuth2 Logout", + "operationId": "oauth2LogoutGet", + "tags": [ + "oauth2" + ], + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "logout", + "group": "tokens", + "cookies": false, + "type": "", + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": [ + "console", + "client" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "ProjectPath": [] + } + }, + "security": [ + { + "ProjectPath": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "id_token_hint", + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "required": false, + "schema": { + "type": "string", + "x-example": "<ID_TOKEN_HINT>", + "default": "" + }, + "in": "query" + }, + { + "name": "logout_hint", + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "x-example": "<LOGOUT_HINT>", + "default": "" + }, + "in": "query" + }, + { + "name": "client_id", + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", + "required": false, + "schema": { + "type": "string", + "x-example": "<CLIENT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "post_logout_redirect_uri", + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", + "required": false, + "schema": { + "type": "string", + "x-example": "<STATE>", + "default": "" + }, + "in": "query" + }, + { + "name": "ui_locales", + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "required": false, + "schema": { + "type": "string", + "x-example": "<UI_LOCALES>", + "default": "" + }, + "in": "query" + } + ] + }, "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", + "summary": "OAuth2 Logout", + "operationId": "oauth2LogoutPost", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new Telesign provider.", + "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", + "method": "logoutPost", + "group": "tokens", "cookies": false, "type": "", - "demo": "messaging\/create-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/logout.md", + "rate-limit": 10, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", - "server" + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", + "produces": [ + "application\/json" + ], "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" } ], "requestBody": { @@ -41507,70 +47213,65 @@ "schema": { "type": "object", "properties": { - "providerId": { + "id_token_hint": { "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", + "default": "", + "x-example": "<ID_TOKEN_HINT>" }, - "name": { + "logout_hint": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", + "default": "", + "x-example": "<LOGOUT_HINT>" }, - "from": { + "client_id": { "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", "default": "", - "x-example": "+12065550100", - "format": "phone" + "x-example": "<CLIENT_ID>" }, - "customerId": { + "post_logout_redirect_uri": { "type": "string", - "description": "Telesign customer ID.", + "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", "default": "", - "x-example": "<CUSTOMER_ID>" + "x-example": "https:\/\/example.com", + "format": "url" }, - "apiKey": { + "state": { "type": "string", - "description": "Telesign API key.", + "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", "default": "", - "x-example": "<API_KEY>" + "x-example": "<STATE>" }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "ui_locales": { + "type": "string", + "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", + "default": "", + "x-example": "<UI_LOCALES>" } - }, - "required": [ - "providerId", - "name" - ] + } } } } } } }, - "\/messaging\/providers\/telesign\/{providerId}": { - "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", + "\/oauth2\/{project_id}\/organizations": { + "get": { + "summary": "OAuth2 List Accessible Organizations", + "operationId": "oauth2ListOrganizations", "tags": [ - "messaging" + "oauth2" ], - "description": "Update a Telesign provider by its unique ID.", + "description": "List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.", "responses": { "200": { - "description": "Provider", + "description": "OAuth2 accessible organizations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2OrganizationList" } } } @@ -41578,102 +47279,98 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", + "method": "listOrganizations", + "group": "platform", "cookies": false, "type": "", - "demo": "messaging\/update-telesign-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-organizations.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "oauth2.organizations.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of organizations to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of organizations to skip before returning results. Used for pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { - "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - } - } + ] } }, - "\/messaging\/providers\/textmagic": { + "\/oauth2\/{project_id}\/par": { "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", + "summary": "OAuth2 PAR", + "operationId": "oauth2CreatePAR", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new Textmagic provider.", + "description": "Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.", "responses": { "201": { - "description": "Provider", + "description": "OAuth2 PAR", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2PAR" } } } @@ -41681,80 +47378,134 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", + "method": "createPAR", + "group": "authorization", "cookies": false, "type": "", - "demo": "messaging\/create-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-par.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { + "client_id": { "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "x-example": "<CLIENT_ID>" }, - "name": { + "redirect_uri": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "x-example": "https:\/\/example.com", + "format": "url" }, - "from": { + "response_type": { "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "description": "OAuth2 \/ OIDC response type.", + "x-example": "code" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", "default": "", - "x-example": "+12065550100", - "format": "phone" + "x-example": "<SCOPE>" }, - "username": { + "state": { "type": "string", - "description": "Textmagic username.", + "description": "OAuth2 state. You receive this back in the redirect URI.", "default": "", - "x-example": "<USERNAME>" + "x-example": "<STATE>" }, - "apiKey": { + "nonce": { "type": "string", - "description": "Textmagic apiKey.", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", "default": "", - "x-example": "<API_KEY>" + "x-example": "<NONCE>" }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "code_challenge": { + "type": "string", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "default": "", + "x-example": "<CODE_CHALLENGE>" + }, + "code_challenge_method": { + "type": "string", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "default": "", + "x-example": "s256" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "default": "", + "x-example": "<PROMPT>" + }, + "max_age": { + "type": "integer", + "description": "OIDC max_age parameter for customization of consent screen.", + "x-example": 0, + "format": "int32", "x-nullable": true + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" } }, "required": [ - "providerId", - "name" + "client_id", + "redirect_uri", + "response_type" ] } } @@ -41762,21 +47513,21 @@ } } }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", + "\/oauth2\/{project_id}\/projects": { + "get": { + "summary": "OAuth2 List Accessible Projects", + "operationId": "oauth2ListProjects", "tags": [ - "messaging" + "oauth2" ], - "description": "Update a Textmagic provider by its unique ID.", + "description": "List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.", "responses": { "200": { - "description": "Provider", + "description": "OAuth2 accessible projects list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2ProjectList" } } } @@ -41784,40 +47535,140 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", + "method": "listProjects", + "group": "platform", "cookies": false, "type": "", - "demo": "messaging\/update-textmagic-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-projects.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "oauth2.projects.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of projects to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of projects to skip before returning results. Used for pagination.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", + "tags": [ + "oauth2" + ], + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "responses": { + "200": { + "description": "OAuth2 Reject", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Reject" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "reject", + "group": "authorization", + "cookies": false, + "type": "", + "demo": "oauth2\/reject.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "ProjectPath": [] + } + }, + "security": [ + { + "ProjectPath": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" }, "in": "path" } @@ -41828,58 +47679,37 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { + "grant_id": { "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "<GRANT_ID>" } - } + }, + "required": [ + "grant_id" + ] } } } } } }, - "\/messaging\/providers\/twilio": { + "\/oauth2\/{project_id}\/revoke": { "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", + "summary": "OAuth2 Revoke", + "operationId": "oauth2Revoke", "tags": [ - "messaging" + "oauth2" ], - "description": "Create a new Twilio provider.", + "description": "Revoke an OAuth2 access token or refresh token.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "type": "string", + "format": "binary" } } } @@ -41887,80 +47717,78 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", + "method": "revoke", + "group": "tokens", "cookies": false, "type": "", - "demo": "messaging\/create-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/revoke.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { + "token": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "The access or refresh token to revoke.", + "x-example": "<TOKEN>" }, - "from": { + "token_type_hint": { "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "description": "Type of token to revoke (access_token or refresh_token).", "default": "", - "x-example": "+12065550100", - "format": "phone" + "x-example": "access_token" }, - "accountSid": { + "client_id": { "type": "string", - "description": "Twilio account secret ID.", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", "default": "", - "x-example": "<ACCOUNT_SID>" + "x-example": "<CLIENT_ID>" }, - "authToken": { + "client_secret": { "type": "string", - "description": "Twilio authentication token.", + "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "x-example": "<CLIENT_SECRET>" } }, "required": [ - "providerId", - "name" + "token" ] } } @@ -41968,21 +47796,21 @@ } } }, - "\/messaging\/providers\/twilio\/{providerId}": { - "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", + "\/oauth2\/{project_id}\/token": { + "post": { + "summary": "OAuth2 Token", + "operationId": "oauth2CreateToken", "tags": [ - "messaging" + "oauth2" ], - "description": "Update a Twilio provider by its unique ID.", + "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", "responses": { "200": { - "description": "Provider", + "description": "OAuth2 Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/oauth2Token" } } } @@ -41990,40 +47818,42 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", + "method": "createToken", + "group": "tokens", "cookies": false, "type": "", - "demo": "messaging\/update-twilio-provider.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-token.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "auth": { - "Project": [] + "ProjectPath": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" } @@ -42034,58 +47864,91 @@ "schema": { "type": "object", "properties": { - "name": { + "grant_type": { "type": "string", - "description": "Provider name.", + "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", + "x-example": "<GRANT_TYPE>" + }, + "code": { + "type": "string", + "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", "default": "", - "x-example": "<NAME>" + "x-example": "<CODE>" }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "refresh_token": { + "type": "string", + "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", + "default": "", + "x-example": "<REFRESH_TOKEN>" }, - "accountSid": { + "device_code": { "type": "string", - "description": "Twilio account secret ID.", + "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", "default": "", - "x-example": "<ACCOUNT_SID>" + "x-example": "<DEVICE_CODE>" }, - "authToken": { + "client_id": { "type": "string", - "description": "Twilio authentication token.", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", "default": "", - "x-example": "<AUTH_TOKEN>" + "x-example": "<CLIENT_ID>" }, - "from": { + "client_secret": { "type": "string", - "description": "Sender number.", + "description": "OAuth2 client secret. Required for confidential apps.", "default": "", - "x-example": "<FROM>" + "x-example": "<CLIENT_SECRET>" + }, + "code_verifier": { + "type": "string", + "description": "PKCE code verifier. Required for public apps.", + "default": "", + "x-example": "<CODE_VERIFIER>" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI. Required for `authorization_code` grant type.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" } - } + }, + "required": [ + "grant_type" + ] } } } } } }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", + "\/organization": { + "get": { + "summary": "Get organization", + "operationId": "organizationGet", "tags": [ - "messaging" + "organization" ], - "description": "Create a new Vonage provider.", + "description": "Get the current organization.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/organization" } } } @@ -42093,22 +47956,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-vonage-provider.md", + "demo": "organization\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "organization.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "auth": { "Project": [] } @@ -42116,79 +47978,25 @@ "security": [ { "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "Key": [], + "Organization": [] } - } - } - }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", + ] + }, + "put": { + "summary": "Update organization", + "operationId": "organizationUpdate", "tags": [ - "messaging" + "organization" ], - "description": "Update a Vonage provider by its unique ID.", + "description": "Update the current organization's name.", "responses": { "200": { - "description": "Provider", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/organization" } } } @@ -42196,22 +48004,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", + "method": "update", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/update-vonage-provider.md", + "demo": "organization\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "organization.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "auth": { "Project": [] } @@ -42219,19 +48026,8 @@ "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" + "Key": [], + "Organization": [] } ], "requestBody": { @@ -42242,56 +48038,75 @@ "properties": { "name": { "type": "string", - "description": "Provider name.", - "default": "", + "description": "New organization name. Max length: 128 chars.", "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" } - } + }, + "required": [ + "name" + ] } } } } + }, + "delete": { + "summary": "Delete organization", + "operationId": "organizationDelete", + "tags": [ + "organization" + ], + "description": "Delete the current organization. All projects that belong to the organization are deleted as well.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "organization\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ] } }, - "\/messaging\/providers\/{providerId}": { + "\/organization\/installations": { "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", + "summary": "List Installations", + "operationId": "organizationListInstallations", "tags": [ - "messaging" + "organization" ], - "description": "Get a provider by its unique ID.\n", + "description": "List app installations on the organization. Any organization member can read installations.", "responses": { "200": { - "description": "Provider", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -42299,22 +48114,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getProvider", - "group": "providers", + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "messaging\/get-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "auth": { "Project": [] } @@ -42322,52 +48137,76 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query 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": "string", - "x-example": "<PROVIDER_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", "tags": [ - "messaging" + "organization" ], - "description": "Delete a provider by its unique ID.", + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteProvider", - "group": "providers", + "method": "createInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "messaging\/delete-provider.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "auth": { "Project": [] } @@ -42375,38 +48214,117 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "<APP_ID>" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", + "tags": [ + "organization" + ], + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } ] - } - }, - "\/messaging\/providers\/{providerId}\/logs": { - "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", "tags": [ - "messaging" + "organization" ], - "description": "Get the provider activity logs listed by its unique ID.", + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { "200": { - "description": "Logs List", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -42414,22 +48332,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", + "method": "updateInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "messaging\/list-provider-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "auth": { "Project": [] } @@ -42437,85 +48355,75 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] } ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" - }, - { - "name": "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] - } - }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", - "tags": [ - "messaging" ], - "description": "Get the subscriber activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "<AUTHORIZATION_DETAILS>", + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "messaging\/list-subscriber-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -42523,62 +48431,41 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "Organization": [] } ], "parameters": [ { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<SUBSCRIBER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" - }, - { - "name": "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] } }, - "\/messaging\/topics": { + "\/organization\/keys": { "get": { - "summary": "List topics", - "operationId": "messagingListTopics", + "summary": "List organization keys", + "operationId": "organizationListKeys", "tags": [ - "messaging" + "organization" ], - "description": "Get a list of all topics from the current Appwrite project.", + "description": "Get a list of all API keys from the current organization.", "responses": { "200": { - "description": "Topic list", + "description": "API Keys List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topicList" + "$ref": "#\/components\/schemas\/keyList" } } } @@ -42586,22 +48473,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTopics", - "group": "topics", + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/list-topics.md", + "demo": "organization\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "organization.keys.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "auth": { "Project": [] } @@ -42609,13 +48495,14 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", "required": false, "schema": { "type": "array", @@ -42626,17 +48513,6 @@ }, "in": "query" }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -42651,19 +48527,19 @@ ] }, "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", + "summary": "Create organization key", + "operationId": "organizationCreateKey", "tags": [ - "messaging" + "organization" ], - "description": "Create a new topic.", + "description": "Create a new organization API key.", "responses": { "201": { - "description": "Topic", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/key" } } } @@ -42671,22 +48547,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTopic", - "group": "topics", + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/create-topic.md", + "demo": "organization\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "organization.keys.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "auth": { "Project": [] } @@ -42694,7 +48569,8 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "requestBody": { @@ -42703,34 +48579,76 @@ "schema": { "type": "object", "properties": { - "topicId": { + "keyId": { "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "<TOPIC_ID>", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<KEY_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, "name": { "type": "string", - "description": "Topic Name.", + "description": "Key name. Max length: 128 chars.", "x-example": "<NAME>" }, - "subscribe": { + "scopes": { "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [ - "users" - ], - "x-example": "[\"any\"]", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ], + "x-enum-name": "OrganizationKeyScopes", + "x-enum-keys": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ] } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } }, "required": [ - "topicId", - "name" + "keyId", + "name", + "scopes" ] } } @@ -42738,21 +48656,21 @@ } } }, - "\/messaging\/topics\/{topicId}": { + "\/organization\/keys\/{keyId}": { "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", + "summary": "Get organization key", + "operationId": "organizationGetKey", "tags": [ - "messaging" + "organization" ], - "description": "Get a topic by its unique ID.\n", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.", "responses": { "200": { - "description": "Topic", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/key" } } } @@ -42760,22 +48678,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTopic", - "group": "topics", + "method": "getKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/get-topic.md", + "demo": "organization\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "organization.keys.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "auth": { "Project": [] } @@ -42783,36 +48700,37 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "keyId", + "description": "Key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<KEY_ID>" }, "in": "path" } ] }, - "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", + "put": { + "summary": "Update organization key", + "operationId": "organizationUpdateKey", "tags": [ - "messaging" + "organization" ], - "description": "Update a topic by its unique ID.\n", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", "responses": { "200": { - "description": "Topic", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/key" } } } @@ -42820,22 +48738,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTopic", - "group": "topics", + "method": "updateKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/update-topic.md", + "demo": "organization\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "organization.keys.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "auth": { "Project": [] } @@ -42843,17 +48760,18 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "keyId", + "description": "Key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<KEY_ID>" }, "in": "path" } @@ -42866,32 +48784,78 @@ "properties": { "name": { "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>", - "x-nullable": true + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "subscribe": { + "scopes": { "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, "items": { - "type": "string" - }, + "type": "string", + "enum": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ], + "x-enum-name": "OrganizationKeyScopes", + "x-enum-keys": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } - } + }, + "required": [ + "name", + "scopes" + ] } } } } }, "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", + "summary": "Delete organization key", + "operationId": "organizationDeleteKey", "tags": [ - "messaging" + "organization" ], - "description": "Delete a topic by its unique ID.", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", "responses": { "204": { "description": "No content" @@ -42899,84 +48863,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteTopic", - "group": "topics", - "cookies": false, - "type": "", - "demo": "messaging\/delete-topic.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - } - ] - } - }, - "\/messaging\/topics\/{topicId}\/logs": { - "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", - "tags": [ - "messaging" - ], - "description": "Get the topic activity logs listed by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", + "method": "deleteKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/list-topic-logs.md", + "demo": "organization\/delete-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "organization.keys.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "auth": { "Project": [] } @@ -42984,62 +48885,39 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "keyId", + "description": "Key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<KEY_ID>" }, "in": "path" - }, - { - "name": "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] } }, - "\/messaging\/topics\/{topicId}\/subscribers": { + "\/organization\/memberships": { "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", + "summary": "List organization memberships", + "operationId": "organizationListMemberships", "tags": [ - "messaging" + "organization" ], - "description": "Get a list of all subscribers from the current Appwrite project.", + "description": "Get a list of all memberships from the current organization.", "responses": { "200": { - "description": "Subscriber list", + "description": "Memberships List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriberList" + "$ref": "#\/components\/schemas\/membershipList" } } } @@ -43047,22 +48925,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", + "method": "listMemberships", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/list-subscribers.md", + "demo": "organization\/list-memberships.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "organization.memberships.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "auth": { "Project": [] } @@ -43070,23 +48947,14 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, roles", "required": false, "schema": { "type": "array", @@ -43122,19 +48990,19 @@ ] }, "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + "summary": "Create organization membership", + "operationId": "organizationCreateMembership", "tags": [ - "messaging" + "organization" ], - "description": "Create a new subscriber.", + "description": "Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.", "responses": { "201": { - "description": "Subscriber", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/membership" } } } @@ -43142,23 +49010,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "createMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", - "rate-limit": 0, + "demo": "organization\/create-membership.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "organization.memberships.write", "platforms": [ - "server", - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [] } @@ -43166,21 +49032,8 @@ "security": [ { "Project": [], - "JWT": [], - "Session": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" + "Key": [], + "Organization": [] } ], "requestBody": { @@ -43189,23 +49042,50 @@ "schema": { "type": "object", "properties": { - "subscriberId": { + "email": { "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "description": "Email of the new organization member.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "userId": { + "type": "string", + "description": "ID of the user to be added to the organization.", + "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", + "format": "phone" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" } }, - "targetId": { + "url": { "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "name": { + "type": "string", + "description": "Name of the new organization member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" } }, "required": [ - "subscriberId", - "targetId" + "roles" ] } } @@ -43213,21 +49093,21 @@ } } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "\/organization\/memberships\/{membershipId}": { "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", + "summary": "Get organization membership", + "operationId": "organizationGetMembership", "tags": [ - "messaging" + "organization" ], - "description": "Get a subscriber by its unique ID.\n", + "description": "Get a membership from the current organization by its unique ID.", "responses": { "200": { - "description": "Subscriber", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/membership" } } } @@ -43235,22 +49115,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", + "method": "getMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/get-subscriber.md", + "demo": "organization\/get-membership.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "organization.memberships.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "auth": { "Project": [] } @@ -43258,39 +49137,112 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" - }, + } + ] + }, + "patch": { + "summary": "Update organization membership", + "operationId": "organizationUpdateMembership", + "tags": [ + "organization" + ], + "description": "Modify the roles of a member in the current organization.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "cookies": false, + "type": "", + "demo": "organization\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "subscriberId", - "description": "Subscriber ID.", + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<SUBSCRIBER_ID>" + "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 organization. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } }, "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + "summary": "Delete organization membership", + "operationId": "organizationDeleteMembership", "tags": [ - "messaging" + "organization" ], - "description": "Delete a subscriber by its unique ID.", + "description": "Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.", "responses": { "204": { "description": "No content" @@ -43298,23 +49250,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", + "method": "deleteMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/delete-subscriber.md", + "demo": "organization\/delete-membership.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "organization.memberships.write", "platforms": [ - "server", - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [] } @@ -43322,50 +49272,39 @@ "security": [ { "Project": [], - "JWT": [], - "Session": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<SUBSCRIBER_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" } ] } }, - "\/migrations": { + "\/organization\/projects": { "get": { - "summary": "List migrations", - "operationId": "migrationsList", + "summary": "List organization projects", + "operationId": "organizationListProjects", "tags": [ - "migrations" + "organization" ], - "description": "List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.", + "description": "Get a list of all projects. You can use the query params to filter your results.", "responses": { "200": { - "description": "Migrations List", + "description": "Projects List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migrationList" + "$ref": "#\/components\/schemas\/projectList" } } } @@ -43373,34 +49312,36 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": null, + "method": "listProjects", + "group": "projects", "cookies": false, "type": "", - "demo": "migrations\/list.md", + "demo": "organization\/list-projects.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", + "scope": "projects.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Organization": [] } ], "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, labels, search, accessedAt", "required": false, "schema": { "type": "array", @@ -43434,23 +49375,21 @@ "in": "query" } ] - } - }, - "\/migrations\/appwrite": { + }, "post": { - "summary": "Create Appwrite migration", - "operationId": "migrationsCreateAppwriteMigration", + "summary": "Create organization project", + "operationId": "organizationCreateProject", "tags": [ - "migrations" + "organization" ], - "description": "Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. ", + "description": "Create a new project.", "responses": { - "202": { - "description": "Migration", + "201": { + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/project" } } } @@ -43458,28 +49397,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "createAppwriteMigration", - "group": null, + "method": "createProject", + "group": "projects", "cookies": false, "type": "", - "demo": "migrations\/create-appwrite-migration.md", + "demo": "organization\/create-project.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "projects.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Organization": [] } ], "requestBody": { @@ -43488,158 +49429,258 @@ "schema": { "type": "object", "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "auth-methods", - "policies", - "oauth2-provider", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable", - "platform", - "api-key", - "webhook", - "smtp", - "backup-policy", - "project-variable", - "project-protocols", - "project-labels", - "project-services", - "project-email-template", - "rule" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [ - "user", - "team", - "membership", - "auth-methods", - "policies", - "oauth2-provider", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable", - "platform", - "api-key", - "webhook", - "smtp", - "backup-policy", - "project-variable", - "project-protocols", - "project-labels", - "project-services", - "project-email-template", - "rule" - ] - } - }, - "endpoint": { - "type": "string", - "description": "Source Appwrite endpoint", - "x-example": "https:\/\/example.com", - "format": "url" - }, "projectId": { "type": "string", - "description": "Source Project ID", - "x-example": "<PROJECT_ID>" + "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 }, - "apiKey": { + "name": { "type": "string", - "description": "Source API Key", - "x-example": "<API_KEY>" + "description": "Project name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "onDuplicate": { + "region": { + "type": "string", + "description": "Project Region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region", + "x-enum-keys": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ] + } + }, + "required": [ + "projectId", + "name" + ] + } + } + } + } + } + }, + "\/organization\/projects\/{projectId}": { + "get": { + "summary": "Get organization project", + "operationId": "organizationGetProject", + "tags": [ + "organization" + ], + "description": "Get a project.", + "responses": { + "200": { + "description": "Project", + "content": { + "": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getProject", + "group": "projects", + "cookies": false, + "type": "", + "demo": "organization\/get-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update organization project", + "operationId": "organizationUpdateProject", + "tags": [ + "organization" + ], + "description": "Update a project by its unique ID.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateProject", + "group": "projects", + "cookies": false, + "type": "", + "demo": "organization\/update-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "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": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", - "default": "fail", - "x-example": "fail", - "enum": [ - "fail", - "skip", - "overwrite" - ], - "x-enum-name": "OnDuplicate", - "x-enum-keys": [ - "fail", - "skip", - "overwrite" - ] + "description": "Project name. Max length: 128 chars.", + "x-example": "<NAME>" } }, "required": [ - "resources", - "endpoint", - "projectId", - "apiKey" + "name" ] } } } } + }, + "delete": { + "summary": "Delete organization project", + "operationId": "organizationDeleteProject", + "tags": [ + "organization" + ], + "description": "Delete a project by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteProject", + "group": "projects", + "cookies": false, + "type": "", + "demo": "organization\/delete-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] } }, - "\/migrations\/appwrite\/report": { + "\/organizations": { "get": { - "summary": "Get Appwrite migration report", - "operationId": "migrationsGetAppwriteReport", + "summary": "List Orgnizations", + "operationId": "organizationsList", "tags": [ - "migrations" + "organizations" ], - "description": "Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "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": "Migration Report", + "description": "Organizations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migrationReport" + "$ref": "#\/components\/schemas\/organizationList" } } } @@ -43647,21 +49688,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAppwriteReport", + "method": "list", "group": null, "cookies": false, "type": "", - "demo": "migrations\/get-appwrite-report.md", + "demo": "organizations\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [] } @@ -43673,149 +49714,52 @@ ], "parameters": [ { - "name": "resources", - "description": "List of resources to migrate", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform", + "required": false, "schema": { "type": "array", "items": { - "type": "string", - "enum": [ - "user", - "team", - "membership", - "auth-methods", - "policies", - "oauth2-provider", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable", - "platform", - "api-key", - "webhook", - "smtp", - "backup-policy", - "project-variable", - "project-protocols", - "project-labels", - "project-services", - "project-email-template", - "rule" - ], - "x-enum-name": "AppwriteMigrationResource", - "x-enum-keys": [ - "user", - "team", - "membership", - "auth-methods", - "policies", - "oauth2-provider", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "documentsdb", - "vectorsdb", - "bucket", - "file", - "function", - "deployment", - "environment-variable", - "provider", - "topic", - "subscriber", - "message", - "site", - "site-deployment", - "site-variable", - "platform", - "api-key", - "webhook", - "smtp", - "backup-policy", - "project-variable", - "project-protocols", - "project-labels", - "project-services", - "project-email-template", - "rule" - ] - } - }, - "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>" + "type": "string" + }, + "default": [] }, "in": "query" }, { - "name": "key", - "description": "Source's API Key", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<KEY>" + "x-example": "<SEARCH>", + "default": "" }, "in": "query" } ] - } - }, - "\/migrations\/csv\/exports": { + }, "post": { - "summary": "Export documents to CSV", - "operationId": "migrationsCreateCSVExport", + "summary": "Create Organization", + "operationId": "organizationsCreate", "tags": [ - "migrations" + "organizations" ], - "description": "Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.", + "description": "Create a new organization.\n", "responses": { - "202": { - "description": "Migration", + "201": { + "description": "Organization, or PaymentAuthentication", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/organization" + }, + { + "$ref": "#\/components\/schemas\/paymentAuthentication" + } + ] } } } @@ -43823,21 +49767,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCSVExport", + "method": "create", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-csv-export.md", - "rate-limit": 0, + "demo": "organizations\/create.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "teams.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-export.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "auth": { "Project": [] } @@ -43853,68 +49797,85 @@ "schema": { "type": "object", "properties": { - "resourceId": { + "organizationId": { "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "x-example": "<ID1:ID2>" + "description": "Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<ORGANIZATION_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "filename": { + "name": { "type": "string", - "description": "The name of the file to be created for the export, excluding the .csv extension.", - "x-example": "<FILENAME>" + "description": "Organization name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "billingPlan": { + "type": "string", + "description": "Organization billing plan chosen", + "x-example": "tier-0" }, - "queries": { + "paymentMethodId": { + "type": "string", + "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", + "x-example": "<PAYMENT_METHOD_ID>", + "x-nullable": true + }, + "billingAddressId": { + "type": "string", + "description": "Unique ID of billing address", + "default": "", + "x-example": "<BILLING_ADDRESS_ID>", + "x-nullable": true + }, + "invites": { "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Additional member invites", "default": [], "x-example": null, "items": { "type": "string" } }, - "delimiter": { - "type": "string", - "description": "The character that separates each column value. Default is comma.", - "default": ",", - "x-example": "<DELIMITER>" - }, - "enclosure": { + "couponId": { "type": "string", - "description": "The character that encloses each column value. Default is double quotes.", - "default": "\"", - "x-example": "<ENCLOSURE>" + "description": "Coupon id", + "x-example": "<COUPON_ID>", + "x-nullable": true }, - "escape": { + "taxId": { "type": "string", - "description": "The escape character for the enclosure character. Default is double quotes.", - "default": "\"", - "x-example": "<ESCAPE>" + "description": "Tax Id associated to billing.", + "x-example": "<TAX_ID>", + "x-nullable": true }, - "header": { - "type": "boolean", - "description": "Whether to include the header row with column names. Default is true.", - "default": true, - "x-example": false + "budget": { + "type": "integer", + "description": "Budget limit for additional usage set for the organization", + "x-example": 0, + "format": "int32", + "x-nullable": true }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "default": true, - "x-example": false + "platform": { + "type": "string", + "description": "Platform type", + "default": "appwrite", + "x-example": "appwrite", + "enum": [ + "appwrite", + "imagine" + ], + "x-enum-name": "Platform", + "x-enum-keys": [ + "appwrite", + "imagine" + ] } }, "required": [ - "resourceId", - "filename" + "organizationId", + "name", + "billingPlan" ] } } @@ -43922,21 +49883,21 @@ } } }, - "\/migrations\/csv\/imports": { - "post": { - "summary": "Import documents from a CSV", - "operationId": "migrationsCreateCSVImport", + "\/organizations\/estimations\/create-organization": { + "patch": { + "summary": "Estimate create Organization", + "operationId": "organizationsEstimationCreateOrganization", "tags": [ - "migrations" + "organizations" ], - "description": "Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.", + "description": "Get estimation for creating an organization.", "responses": { - "202": { - "description": "Migration", + "200": { + "description": "Estimation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/estimation" } } } @@ -43944,21 +49905,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCSVImport", + "method": "estimationCreateOrganization", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-csv-import.md", - "rate-limit": 0, + "demo": "organizations\/estimation-create-organization.md", + "rate-limit": 120, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "teams.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv-import.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-create-organization.md", "auth": { "Project": [] } @@ -43974,71 +49935,128 @@ "schema": { "type": "object", "properties": { - "bucketId": { + "billingPlan": { "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "x-example": "<BUCKET_ID>" + "description": "Organization billing plan chosen", + "x-example": "tier-0" }, - "fileId": { + "paymentMethodId": { "type": "string", - "description": "File ID.", - "x-example": "<FILE_ID>" + "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", + "x-example": "<PAYMENT_METHOD_ID>", + "x-nullable": true }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "x-example": "<ID1:ID2>" + "invites": { + "type": "array", + "description": "Additional member invites", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "default": false, - "x-example": false + "couponId": { + "type": "string", + "description": "Coupon id", + "x-example": "<COUPON_ID>", + "x-nullable": true }, - "onDuplicate": { + "platform": { "type": "string", - "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", - "default": "fail", - "x-example": "fail", + "description": "Platform type", + "default": "appwrite", + "x-example": "appwrite", "enum": [ - "fail", - "skip", - "overwrite" + "appwrite", + "imagine" ], - "x-enum-name": "OnDuplicate", + "x-enum-name": "Platform", "x-enum-keys": [ - "fail", - "skip", - "overwrite" + "appwrite", + "imagine" ] } }, "required": [ - "bucketId", - "fileId", - "resourceId" + "billingPlan" ] } } } - } + } + } + }, + "\/organizations\/{organizationId}": { + "delete": { + "summary": "Delete team", + "operationId": "organizationsDelete", + "tags": [ + "organizations" + ], + "description": "Delete an organization.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "organizations\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organizations.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] } }, - "\/migrations\/firebase": { - "post": { - "summary": "Create Firebase migration", - "operationId": "migrationsCreateFirebaseMigration", + "\/organizations\/{organizationId}\/addons": { + "get": { + "summary": "List addons", + "operationId": "organizationsListAddons", "tags": [ - "migrations" + "organizations" ], - "description": "Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. ", + "description": "List all billing addons for an organization.\n", "responses": { - "202": { - "description": "Migration", + "200": { + "description": "Addons list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/addonList" } } } @@ -44046,21 +50064,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createFirebaseMigration", + "method": "listAddons", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-firebase-migration.md", + "demo": "organizations\/list-addons.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-addons.md", "auth": { "Project": [] } @@ -44070,76 +50088,35 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "serviceAccount": { - "type": "string", - "description": "JSON of the Firebase service account credentials", - "x-example": "<SERVICE_ACCOUNT>" - } - }, - "required": [ - "resources", - "serviceAccount" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" } - } + ] } }, - "\/migrations\/firebase\/report": { - "get": { - "summary": "Get Firebase migration report", - "operationId": "migrationsGetFirebaseReport", + "\/organizations\/{organizationId}\/addons\/baa": { + "post": { + "summary": "Create BAA addon", + "operationId": "organizationsCreateBaaAddon", "tags": [ - "migrations" + "organizations" ], - "description": "Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.", + "description": "Create the BAA billing addon for an organization.\n", "responses": { - "200": { - "description": "Migration Report", + "201": { + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migrationReport" + "$ref": "#\/components\/schemas\/addon" } } } @@ -44147,21 +50124,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFirebaseReport", + "method": "createBaaAddon", "group": null, "cookies": false, "type": "", - "demo": "migrations\/get-firebase-report.md", - "rate-limit": 0, + "demo": "organizations\/create-baa-addon.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-baa-addon.md", "auth": { "Project": [] } @@ -44173,70 +50150,33 @@ ], "parameters": [ { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "FirebaseMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "in": "query" - }, - { - "name": "serviceAccount", - "description": "JSON of the Firebase service account credentials", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<SERVICE_ACCOUNT>" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/migrations\/json\/exports": { + "\/organizations\/{organizationId}\/addons\/premium-geo-db": { "post": { - "summary": "Export documents to JSON", - "operationId": "migrationsCreateJSONExport", + "summary": "Create Premium Geo DB addon", + "operationId": "organizationsCreatePremiumGeoDBAddon", "tags": [ - "migrations" + "organizations" ], - "description": "Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.\n", + "description": "Create a Premium Geo DB addon for an organization.\n", "responses": { - "202": { - "description": "Migration", + "201": { + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/addon" } } } @@ -44244,21 +50184,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createJSONExport", + "method": "createPremiumGeoDBAddon", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-json-export.md", - "rate-limit": 0, + "demo": "organizations\/create-premium-geo-db-addon.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-export.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-premium-geo-db-addon.md", "auth": { "Project": [] } @@ -44268,72 +50208,35 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.", - "x-example": "<ID1:ID2>" - }, - "filename": { - "type": "string", - "description": "The name of the file to be created for the export, excluding the .json extension.", - "x-example": "<FILENAME>" - }, - "columns": { - "type": "array", - "description": "List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https:\/\/appwrite.io\/docs\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "notify": { - "type": "boolean", - "description": "Set to true to receive an email when the export is complete. Default is true.", - "default": true, - "x-example": false - } - }, - "required": [ - "resourceId", - "filename" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" } - } + ] } }, - "\/migrations\/json\/imports": { - "post": { - "summary": "Import documents from a JSON", - "operationId": "migrationsCreateJSONImport", + "\/organizations\/{organizationId}\/addons\/{addonId}": { + "get": { + "summary": "Get addon", + "operationId": "organizationsGetAddon", "tags": [ - "migrations" + "organizations" ], - "description": "Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.\n", + "description": "Get the details of a billing addon for an organization.\n", "responses": { - "202": { - "description": "Migration", + "200": { + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/addon" } } } @@ -44341,21 +50244,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createJSONImport", + "method": "getAddon", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-json-import.md", + "demo": "organizations\/get-addon.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-json-import.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-addon.md", "auth": { "Project": [] } @@ -44365,99 +50268,61 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", - "x-example": "<BUCKET_ID>" - }, - "fileId": { - "type": "string", - "description": "File ID.", - "x-example": "<FILE_ID>" - }, - "resourceId": { - "type": "string", - "description": "Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.", - "x-example": "<ID1:ID2>" - }, - "internalFile": { - "type": "boolean", - "description": "Is the file stored in an internal bucket?", - "default": false, - "x-example": false - }, - "onDuplicate": { - "type": "string", - "description": "Behavior when a row with an existing $id is encountered. \"fail\" (default): abort on first conflict. \"skip\": silently ignore. \"overwrite\": replace existing row.", - "default": "fail", - "x-example": "fail", - "enum": [ - "fail", - "skip", - "overwrite" - ], - "x-enum-name": "OnDuplicate", - "x-enum-keys": [ - "fail", - "skip", - "overwrite" - ] - } - }, - "required": [ - "bucketId", - "fileId", - "resourceId" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ADDON_ID>" + }, + "in": "path" } - } - } - }, - "\/migrations\/nhost": { - "post": { - "summary": "Create NHost migration", - "operationId": "migrationsCreateNHostMigration", + ] + }, + "delete": { + "summary": "Delete addon", + "operationId": "organizationsDeleteAddon", "tags": [ - "migrations" + "organizations" ], - "description": "Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. ", + "description": "Delete a billing addon for an organization.\n", "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createNHostMigration", + "method": "deleteAddon", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-n-host-migration.md", - "rate-limit": 0, + "demo": "organizations\/delete-addon.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-addon.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -44467,116 +50332,45 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "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", - "format": "password" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "subdomain", - "region", - "adminSecret", - "database", - "username", - "password" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ADDON_ID>" + }, + "in": "path" } - } + ] } }, - "\/migrations\/nhost\/report": { - "get": { - "summary": "Get NHost migration report", - "operationId": "migrationsGetNHostReport", + "\/organizations\/{organizationId}\/addons\/{addonId}\/confirmations": { + "post": { + "summary": "Confirm addon payment after 3DS authentication", + "operationId": "organizationsConfirmAddonPayment", "tags": [ - "migrations" + "organizations" ], - "description": "Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "description": "Confirm payment for a billing addon for an organization.\n", "responses": { "200": { - "description": "Migration Report", + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migrationReport" + "$ref": "#\/components\/schemas\/addon" } } } @@ -44584,21 +50378,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getNHostReport", + "method": "confirmAddonPayment", "group": null, "cookies": false, "type": "", - "demo": "migrations\/get-n-host-report.md", - "rate-limit": 0, + "demo": "organizations\/confirm-addon-payment.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/confirm-addon-payment.md", "auth": { "Project": [] } @@ -44610,134 +50404,126 @@ ], "parameters": [ { - "name": "resources", - "description": "List of resources to migrate.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "NHostMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "in": "query" - }, - { - "name": "subdomain", - "description": "Source's Subdomain.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBDOMAIN>" - }, - "in": "query" - }, - { - "name": "region", - "description": "Source's Region.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<REGION>" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "adminSecret", - "description": "Source's Admin Secret.", + "name": "addonId", + "description": "Addon ID", "required": true, "schema": { "type": "string", - "x-example": "<ADMIN_SECRET>" + "x-example": "<ADDON_ID>" }, - "in": "query" - }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/addons\/{addon}\/price": { + "get": { + "summary": "Get addon price", + "operationId": "organizationsGetAddonPrice", + "tags": [ + "organizations" + ], + "description": "Get the price details for a billing addon for an organization.\n", + "responses": { + "200": { + "description": "AddonPrice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonPrice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAddonPrice", + "group": null, + "cookies": false, + "type": "", + "demo": "organizations\/get-addon-price.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-addon-price.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "database", - "description": "Source's Database Name.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE>" - }, - "in": "query" - }, + "Project": [] + } + ], + "parameters": [ { - "name": "username", - "description": "Source's Database Username.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<USERNAME>" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "password", - "description": "Source's Database Password.", + "name": "addon", + "description": "Addon key identifier (e.g. baa).", "required": true, "schema": { "type": "string", - "format": "password", - "x-example": "password" - }, - "in": "query" - }, - { - "name": "port", - "description": "Source's Database Port.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5432 + "x-example": "baa", + "enum": [ + "baa", + "premiumgeodb", + "premiumgeodborg", + "backup_recovery" + ], + "x-enum-name": "Addon", + "x-enum-keys": [ + "baa", + "premiumgeodb", + "premiumgeodborg", + "backup_recovery" + ] }, - "in": "query" + "in": "path" } ] } }, - "\/migrations\/supabase": { - "post": { - "summary": "Create Supabase migration", - "operationId": "migrationsCreateSupabaseMigration", + "\/organizations\/{organizationId}\/aggregations": { + "get": { + "summary": "List aggregations", + "operationId": "organizationsListAggregations", "tags": [ - "migrations" + "organizations" ], - "description": "Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. ", + "description": "Get a list of all aggregations for an organization.", "responses": { - "202": { - "description": "Migration", + "200": { + "description": "Aggregation team list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/aggregationTeamList" } } } @@ -44745,21 +50531,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSupabaseMigration", + "method": "listAggregations", "group": null, "cookies": false, "type": "", - "demo": "migrations\/create-supabase-migration.md", + "demo": "organizations\/list-aggregations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-aggregations.md", "auth": { "Project": [] } @@ -44769,111 +50555,48 @@ "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "description": "List of resources to migrate", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "endpoint": { - "type": "string", - "description": "Source's Supabase Endpoint", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "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", - "format": "password" - }, - "port": { - "type": "integer", - "description": "Source's Database Port", - "default": 5432, - "x-example": null, - "format": "int32" - } - }, - "required": [ - "resources", - "endpoint", - "apiKey", - "databaseHost", - "username", - "password" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "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: teamId, aggregationId, from, to", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - } + ] } }, - "\/migrations\/supabase\/report": { + "\/organizations\/{organizationId}\/aggregations\/{aggregationId}": { "get": { - "summary": "Get Supabase migration report", - "operationId": "migrationsGetSupabaseReport", + "summary": "Get aggregation", + "operationId": "organizationsGetAggregation", "tags": [ - "migrations" + "organizations" ], - "description": "Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. ", + "description": "Get a specific aggregation using it's aggregation ID.", "responses": { "200": { - "description": "Migration Report", + "description": "Team", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migrationReport" + "$ref": "#\/components\/schemas\/aggregationTeam" } } } @@ -44881,21 +50604,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSupabaseReport", + "method": "getAggregation", "group": null, "cookies": false, "type": "", - "demo": "migrations\/get-supabase-report.md", + "demo": "organizations\/get-aggregation.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-aggregation.md", "auth": { "Project": [] } @@ -44907,125 +50630,66 @@ ], "parameters": [ { - "name": "resources", - "description": "List of resources to migrate", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ], - "x-enum-name": "SupabaseMigrationResource", - "x-enum-keys": [ - "user", - "database", - "table", - "column", - "index", - "row", - "document", - "attribute", - "collection", - "bucket", - "file" - ] - } - }, - "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.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_HOST>" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "username", - "description": "Source's Database Username.", + "name": "aggregationId", + "description": "Invoice unique ID", "required": true, "schema": { "type": "string", - "x-example": "<USERNAME>" + "x-example": "<AGGREGATION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "password", - "description": "Source's Database Password.", - "required": true, + "name": "limit", + "description": "Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.", + "required": false, "schema": { - "type": "string", - "format": "password", - "x-example": "password" + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 5 }, "in": "query" }, { - "name": "port", - "description": "Source's Database Port.", + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination.", "required": false, "schema": { "type": "integer", "format": "int32", - "default": 5432 + "default": 0 }, "in": "query" } ] } }, - "\/migrations\/{migrationId}": { - "get": { - "summary": "Get migration", - "operationId": "migrationsGet", + "\/organizations\/{organizationId}\/billing-address": { + "patch": { + "summary": "Set team's billing address", + "operationId": "organizationsSetBillingAddress", "tags": [ - "migrations" + "organizations" ], - "description": "Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. ", + "description": "Set a billing address for an organization.", "responses": { "200": { - "description": "Migration", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/migration" + "$ref": "#\/components\/schemas\/organization" } } } @@ -45033,21 +50697,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "setBillingAddress", "group": null, "cookies": false, "type": "", - "demo": "migrations\/get.md", + "demo": "organizations\/set-billing-address.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.read", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-address.md", "auth": { "Project": [] } @@ -45059,53 +50723,68 @@ ], "parameters": [ { - "name": "migrationId", - "description": "Migration unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<MIGRATION_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "billingAddressId": { + "type": "string", + "description": "Unique ID of billing address", + "x-example": "<BILLING_ADDRESS_ID>" + } + }, + "required": [ + "billingAddressId" + ] + } + } + } + } }, - "patch": { - "summary": "Update retry migration", - "operationId": "migrationsRetry", + "delete": { + "summary": "Delete team's billing address", + "operationId": "organizationsDeleteBillingAddress", "tags": [ - "migrations" + "organizations" ], - "description": "Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.", + "description": "Delete a team's billing address.", "responses": { - "202": { - "description": "Migration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/migration" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "retry", + "method": "deleteBillingAddress", "group": null, "cookies": false, "type": "", - "demo": "migrations\/retry.md", + "demo": "organizations\/delete-billing-address.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-billing-address.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -45116,47 +50795,56 @@ } ], "parameters": [ - { - "name": "migrationId", - "description": "Migration unique ID.", + { + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<MIGRATION_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete migration", - "operationId": "migrationsDelete", + } + }, + "\/organizations\/{organizationId}\/billing-addresses\/{billingAddressId}": { + "get": { + "summary": "Get billing address", + "operationId": "organizationsGetBillingAddress", "tags": [ - "migrations" + "organizations" ], - "description": "Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. ", + "description": "Get a billing address using it's ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Address", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/billingAddress" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "getBillingAddress", "group": null, "cookies": false, "type": "", - "demo": "migrations\/delete.md", + "demo": "organizations\/get-billing-address.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "migrations.write", + "scope": "billing.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-billing-address.md", "auth": { "Project": [] } @@ -45168,33 +50856,43 @@ ], "parameters": [ { - "name": "migrationId", - "description": "Migration ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<MIGRATION_ID>" + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "billingAddressId", + "description": "Unique ID of billing address", + "required": true, + "schema": { + "type": "string", + "x-example": "<BILLING_ADDRESS_ID>" }, "in": "path" } ] } }, - "\/oauth2\/{project_id}\/approve": { - "post": { - "summary": "Approve OAuth2", - "operationId": "oauth2Approve", + "\/organizations\/{organizationId}\/billing-email": { + "patch": { + "summary": "Set team's billing email", + "operationId": "organizationsSetBillingEmail", "tags": [ - "oauth2" + "organizations" ], - "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Set the current billing email for the organization.", "responses": { "200": { - "description": "OAuth2 Approve", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Approve" + "$ref": "#\/components\/schemas\/organization" } } } @@ -45202,41 +50900,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "approve", + "method": "setBillingEmail", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/approve.md", + "demo": "organizations\/set-billing-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "billing.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-email.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } @@ -45247,20 +50942,15 @@ "schema": { "type": "object", "properties": { - "grant_id": { - "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "<GRANT_ID>" - }, - "authorization_details": { + "billingEmail": { "type": "string", - "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", - "default": "", - "x-example": "<AUTHORIZATION_DETAILS>" + "description": "Billing email for the organization.", + "x-example": "email@example.com", + "format": "email" } }, "required": [ - "grant_id" + "billingEmail" ] } } @@ -45268,21 +50958,21 @@ } } }, - "\/oauth2\/{project_id}\/authorize": { - "get": { - "summary": "OAuth2 Authorize", - "operationId": "oauth2Authorize", + "\/organizations\/{organizationId}\/budget": { + "patch": { + "summary": "Update organization budget", + "operationId": "organizationsUpdateBudget", "tags": [ - "oauth2" + "organizations" ], - "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Update the budget limit for an organization.", "responses": { "200": { - "description": "OAuth2 Authorize", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Authorize" + "$ref": "#\/components\/schemas\/organization" } } } @@ -45290,190 +50980,91 @@ }, "deprecated": false, "x-appwrite": { - "method": "authorize", + "method": "updateBudget", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/authorize.md", + "demo": "organizations\/update-budget.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "billing.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-budget.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization Unique ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" - }, - { - "name": "client_id", - "description": "OAuth2 client ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<CLIENT_ID>" - }, - "in": "query" - }, - { - "name": "redirect_uri", - "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "response_type", - "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", - "required": true, - "schema": { - "type": "string", - "x-example": "code" - }, - "in": "query" - }, - { - "name": "scope", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SCOPE>" - }, - "in": "query" - }, - { - "name": "state", - "description": "OAuth2 state. You receive this back in the redirect URI.", - "required": false, - "schema": { - "type": "string", - "x-example": "<STATE>", - "default": "" - }, - "in": "query" - }, - { - "name": "nonce", - "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", - "required": false, - "schema": { - "type": "string", - "x-example": "<NONCE>", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge", - "description": "PKCE code challenge. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "<CODE_CHALLENGE>", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge_method", - "description": "PKCE code challenge method. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "s256", - "default": "" - }, - "in": "query" - }, - { - "name": "prompt", - "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROMPT>", - "default": "" - }, - "in": "query" - }, - { - "name": "max_age", - "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0 - }, - "in": "query" - }, - { - "name": "authorization_details", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", - "required": false, - "schema": { - "type": "string", - "x-example": "<AUTHORIZATION_DETAILS>", - "default": "" - }, - "in": "query" - }, - { - "name": "resource", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "required": false, - "schema": { - "type": "string", - "default": [] - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "budget": { + "type": "integer", + "description": "Budget limit for additional usage set for the organization", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "alerts": { + "type": "array", + "description": "Budget alert limit percentage", + "default": [ + 75 + ], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "budget" + ] + } + } + } + } } }, - "\/oauth2\/{project_id}\/device_authorization": { - "post": { - "summary": "OAuth2 Device Authorization", - "operationId": "oauth2CreateDeviceAuthorization", + "\/organizations\/{organizationId}\/credits": { + "get": { + "summary": "List credits", + "operationId": "organizationsListCredits", "tags": [ - "oauth2" + "organizations" ], - "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", + "description": "List all credits for an organization.\n", "responses": { "200": { - "description": "OAuth2 Device Authorization", + "description": "CreditList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" + "$ref": "#\/components\/schemas\/creditList" } } } @@ -45481,98 +51072,70 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDeviceAuthorization", + "method": "listCredits", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/create-device-authorization.md", + "demo": "organizations\/list-credits.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "billing.read", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-credits.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" + }, + { + "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: teamId, couponId, credits, expiration, status", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" - }, - "scope": { - "type": "string", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "default": "", - "x-example": "<SCOPE>" - }, - "authorization_details": { - "type": "string", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", - "default": "", - "x-example": "<AUTHORIZATION_DETAILS>" - }, - "resource": { - "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null - } - } - } - } - } - } - } - }, - "\/oauth2\/{project_id}\/grants": { + ] + }, "post": { - "summary": "Create OAuth2 Grant", - "operationId": "oauth2CreateGrant", + "summary": "Add credits from coupon", + "operationId": "organizationsAddCredit", "tags": [ - "oauth2" + "organizations" ], - "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", + "description": "Add credit to an organization using a coupon.", "responses": { "201": { - "description": "OAuth2 Grant", + "description": "Credit", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" + "$ref": "#\/components\/schemas\/credit" } } } @@ -45580,41 +51143,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "createGrant", + "method": "addCredit", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/create-grant.md", + "demo": "organizations\/add-credit.md", "rate-limit": 10, - "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "oauth2.write", + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/add-credit.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } @@ -45625,14 +51185,14 @@ "schema": { "type": "object", "properties": { - "user_code": { + "couponId": { "type": "string", - "description": "User code displayed on the device.", - "x-example": "<USER_CODE>" + "description": "ID of the coupon", + "x-example": "<COUPON_ID>" } }, "required": [ - "user_code" + "couponId" ] } } @@ -45640,21 +51200,21 @@ } } }, - "\/oauth2\/{project_id}\/grants\/{grant_id}": { + "\/organizations\/{organizationId}\/credits\/available": { "get": { - "summary": "Get OAuth2 Grant", - "operationId": "oauth2GetGrant", + "summary": "Get available credits", + "operationId": "organizationsGetAvailableCredits", "tags": [ - "oauth2" + "organizations" ], - "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", + "description": "Get total available valid credits for an organization.", "responses": { "200": { - "description": "OAuth2 Grant", + "description": "CreditAvailable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" + "$ref": "#\/components\/schemas\/creditAvailable" } } } @@ -45662,197 +51222,129 @@ }, "deprecated": false, "x-appwrite": { - "method": "getGrant", + "method": "getAvailableCredits", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/get-grant.md", + "demo": "organizations\/get-available-credits.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "billing.read", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-available-credits.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client that created grant during authorization exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "grant_id", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<GRANT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } ] } }, - "\/oauth2\/{project_id}\/logout": { + "\/organizations\/{organizationId}\/credits\/{creditId}": { "get": { - "summary": "OAuth2 Logout", - "operationId": "oauth2Logout", + "summary": "Get credit details", + "operationId": "organizationsGetCredit", "tags": [ - "oauth2" + "organizations" ], - "description": "OpenID Connect RP-Initiated Logout. Ends the user session and revokes the tokens issued to the app identified by the `id_token_hint`, then redirects the user to `post_logout_redirect_uri` when it matches a URI registered on the app.", + "description": "Get credit details.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Credit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/credit" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "logout", + "method": "getCredit", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/logout.md", + "demo": "organizations\/get-credit.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "billing.read", "platforms": [ - "console", - "client" + "console" ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-credit.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" }, { - "name": "id_token_hint", - "description": "ID Token previously issued to the app, used as proof of the logout request. Required to end the session; signature and issuer are validated while expiry is ignored.", - "required": false, - "schema": { - "type": "string", - "x-example": "<ID_TOKEN_HINT>", - "default": "" - }, - "in": "query" - }, - { - "name": "logout_hint", - "description": "Hint about the user that is logging out. Accepted for OIDC compatibility.", - "required": false, - "schema": { - "type": "string", - "x-example": "<LOGOUT_HINT>", - "default": "" - }, - "in": "query" - }, - { - "name": "client_id", - "description": "OAuth2 client ID. When both `client_id` and `id_token_hint` are provided, they must identify the same app.", - "required": false, - "schema": { - "type": "string", - "x-example": "<CLIENT_ID>", - "default": "" - }, - "in": "query" - }, - { - "name": "post_logout_redirect_uri", - "description": "URI to redirect the user to after logout. Must exactly match a URI registered in the app's `postLogoutRedirectUris`.", - "required": false, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com", - "default": "" - }, - "in": "query" - }, - { - "name": "state", - "description": "Opaque value passed back unchanged in the `state` query param of the post-logout redirect.", - "required": false, - "schema": { - "type": "string", - "x-example": "<STATE>", - "default": "" - }, - "in": "query" - }, - { - "name": "ui_locales", - "description": "Preferred languages for any logout UI, as space-separated BCP47 tags. Accepted for OIDC compatibility.", - "required": false, + "name": "creditId", + "description": "Credit Unique ID", + "required": true, "schema": { "type": "string", - "x-example": "<UI_LOCALES>", - "default": "" + "x-example": "<CREDIT_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/oauth2\/{project_id}\/reject": { - "post": { - "summary": "Reject OAuth2", - "operationId": "oauth2Reject", + "\/organizations\/{organizationId}\/estimations\/delete-organization": { + "patch": { + "summary": "Estimate delete team", + "operationId": "organizationsEstimationDeleteOrganization", "tags": [ - "oauth2" + "organizations" ], - "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Get estimation for deleting an organization.", "responses": { "200": { - "description": "OAuth2 Reject", + "description": "DeleteOrganization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Reject" + "$ref": "#\/components\/schemas\/estimationDeleteOrganization" } } } @@ -45860,82 +51352,59 @@ }, "deprecated": false, "x-appwrite": { - "method": "reject", + "method": "estimationDeleteOrganization", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/reject.md", - "rate-limit": 0, + "demo": "organizations\/estimation-delete-organization.md", + "rate-limit": 120, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "organizations.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-delete-organization.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "grant_id": { - "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "<GRANT_ID>" - } - }, - "required": [ - "grant_id" - ] - } - } - } - } + ] } }, - "\/oauth2\/{project_id}\/revoke": { - "post": { - "summary": "OAuth2 Revoke", - "operationId": "oauth2Revoke", + "\/organizations\/{organizationId}\/estimations\/update-plan": { + "patch": { + "summary": "Estimate for update plan", + "operationId": "organizationsEstimationUpdatePlan", "tags": [ - "oauth2" + "organizations" ], - "description": "Revoke an OAuth2 access token or refresh token.", + "description": "Get estimation for updating the organization plan.", "responses": { "200": { - "description": "File", + "description": "UpdatePlan", "content": { "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/estimationUpdatePlan" } } } @@ -45943,42 +51412,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "revoke", + "method": "estimationUpdatePlan", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/revoke.md", - "rate-limit": 0, + "demo": "organizations\/estimation-update-plan.md", + "rate-limit": 120, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "billing.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-update-plan.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } @@ -45989,32 +51454,29 @@ "schema": { "type": "object", "properties": { - "token": { - "type": "string", - "description": "The access or refresh token to revoke.", - "x-example": "<TOKEN>" - }, - "token_type_hint": { + "billingPlan": { "type": "string", - "description": "Type of token to revoke (access_token or refresh_token).", - "default": "", - "x-example": "access_token" + "description": "Organization billing plan chosen", + "x-example": "tier-0" }, - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" + "invites": { + "type": "array", + "description": "Additional member invites", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "client_secret": { + "couponId": { "type": "string", - "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", - "default": "", - "x-example": "<CLIENT_SECRET>" + "description": "Coupon id", + "x-example": "<COUPON_ID>", + "x-nullable": true } }, "required": [ - "token" + "billingPlan" ] } } @@ -46022,21 +51484,21 @@ } } }, - "\/oauth2\/{project_id}\/token": { + "\/organizations\/{organizationId}\/feedbacks\/downgrade": { "post": { - "summary": "OAuth2 Token", - "operationId": "oauth2CreateToken", + "summary": "Create downgrade feedback", + "operationId": "organizationsCreateDowngradeFeedback", "tags": [ - "oauth2" + "organizations" ], - "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", + "description": "Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.\n", "responses": { - "200": { - "description": "OAuth2 Token", + "201": { + "description": "Downgrade Feedback", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Token" + "$ref": "#\/components\/schemas\/downgradeFeedback" } } } @@ -46044,42 +51506,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "createToken", + "method": "createDowngradeFeedback", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/create-token.md", + "demo": "organizations\/create-downgrade-feedback.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "billing.write", "platforms": [ - "console", - "client", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-downgrade-feedback.md", "auth": { - "ProjectPath": [] + "Project": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "organizationId", + "description": "Organization Unique ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } @@ -46090,63 +51548,32 @@ "schema": { "type": "object", "properties": { - "grant_type": { - "type": "string", - "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", - "x-example": "<GRANT_TYPE>" - }, - "code": { - "type": "string", - "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", - "default": "", - "x-example": "<CODE>" - }, - "refresh_token": { - "type": "string", - "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", - "default": "", - "x-example": "<REFRESH_TOKEN>" - }, - "device_code": { - "type": "string", - "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", - "default": "", - "x-example": "<DEVICE_CODE>" - }, - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" - }, - "client_secret": { + "reason": { "type": "string", - "description": "OAuth2 client secret. Required for confidential apps.", - "default": "", - "x-example": "<CLIENT_SECRET>" + "description": "Feedback reason", + "x-example": "<REASON>" }, - "code_verifier": { + "message": { "type": "string", - "description": "PKCE code verifier. Required for public apps.", - "default": "", - "x-example": "<CODE_VERIFIER>" + "description": "Feedback message", + "x-example": "<MESSAGE>" }, - "redirect_uri": { + "fromPlanId": { "type": "string", - "description": "Redirect URI. Required for `authorization_code` grant type.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" + "description": "Plan downgrading from", + "x-example": "<FROM_PLAN_ID>" }, - "resource": { + "toPlanId": { "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null + "description": "Plan downgrading to", + "x-example": "<TO_PLAN_ID>" } }, "required": [ - "grant_type" + "reason", + "message", + "fromPlanId", + "toPlanId" ] } } @@ -46154,21 +51581,21 @@ } } }, - "\/organization\/keys": { + "\/organizations\/{organizationId}\/invoices": { "get": { - "summary": "List organization keys", - "operationId": "organizationListKeys", + "summary": "List invoices", + "operationId": "organizationsListInvoices", "tags": [ - "organization" + "organizations" ], - "description": "Get a list of all API keys from the current organization.", + "description": "List all invoices for an organization.", "responses": { "200": { - "description": "API Keys List", + "description": "Billing invoices list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/keyList" + "$ref": "#\/components\/schemas\/invoiceList" } } } @@ -46176,35 +51603,44 @@ }, "deprecated": false, "x-appwrite": { - "method": "listKeys", - "group": "keys", + "method": "listInvoices", + "group": null, "cookies": false, "type": "", - "demo": "organization\/list-keys.md", + "demo": "organizations\/list-invoices.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.read", + "scope": "billing.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-invoices.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "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: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount", "required": false, "schema": { "type": "array", @@ -46214,34 +51650,25 @@ "default": [] }, "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] - }, - "post": { - "summary": "Create organization key", - "operationId": "organizationCreateKey", + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}": { + "get": { + "summary": "Get invoice", + "operationId": "organizationsGetInvoice", "tags": [ - "organization" + "organizations" ], - "description": "Create a new organization API key.", + "description": "Get an invoice by its unique ID.", "responses": { - "201": { - "description": "Key", + "200": { + "description": "Invoice", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/invoice" } } } @@ -46249,117 +51676,69 @@ }, "deprecated": false, "x-appwrite": { - "method": "createKey", - "group": "keys", + "method": "getInvoice", + "group": null, "cookies": false, "type": "", - "demo": "organization\/create-key.md", + "demo": "organizations\/get-invoice.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", + "scope": "billing.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<KEY_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "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", - "enum": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ], - "x-enum-name": "OrganizationKeyScopes", - "x-enum-keys": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<INVOICE_ID>" + }, + "in": "path" } - } + ] } }, - "\/organization\/keys\/{keyId}": { + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/download": { "get": { - "summary": "Get organization key", - "operationId": "organizationGetKey", + "summary": "Download invoice in PDF", + "operationId": "organizationsGetInvoiceDownload", "tags": [ - "organization" + "organizations" ], - "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.", + "description": "Download invoice in PDF", "responses": { "200": { - "description": "Key", + "description": "paymentMethod", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/paymentMethod" } } } @@ -46367,58 +51746,71 @@ }, "deprecated": false, "x-appwrite": { - "method": "getKey", - "group": "keys", + "method": "getInvoiceDownload", + "group": null, "cookies": false, - "type": "", - "demo": "organization\/get-key.md", + "type": "location", + "demo": "organizations\/get-invoice-download.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.read", + "scope": "billing.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-download.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "ImpersonateUserId": [] } ], "parameters": [ { - "name": "keyId", - "description": "Key unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<KEY_ID>" + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<INVOICE_ID>" }, "in": "path" } ] - }, - "put": { - "summary": "Update organization key", - "operationId": "organizationUpdateKey", + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/payments": { + "post": { + "summary": "Initiate payment for failed invoice to pay live from console", + "operationId": "organizationsCreateInvoicePayment", "tags": [ - "organization" + "organizations" ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "description": "Initiate payment for failed invoice to pay live from console", "responses": { "200": { - "description": "Key", + "description": "Invoice", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/invoice" } } } @@ -46426,39 +51818,48 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateKey", - "group": "keys", + "method": "createInvoicePayment", + "group": null, "cookies": false, "type": "", - "demo": "organization\/update-key.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "organizations\/create-invoice-payment.md", + "rate-limit": 10, + "rate-time": 86400, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-invoice-payment.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "keyId", - "description": "Key unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<KEY_ID>" + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<INVOICE_ID>" }, "in": "path" } @@ -46469,129 +51870,106 @@ "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", - "enum": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ], - "x-enum-name": "OrganizationKeyScopes", - "x-enum-keys": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ] - } - }, - "expire": { + "paymentMethodId": { "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "description": "Payment method ID", + "x-example": "<PAYMENT_METHOD_ID>" } }, "required": [ - "name", - "scopes" + "paymentMethodId" ] } } } } - }, - "delete": { - "summary": "Delete organization key", - "operationId": "organizationDeleteKey", + } + }, + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/status": { + "patch": { + "summary": "Validate the payment for an invoice and update status", + "operationId": "organizationsValidateInvoice", "tags": [ - "organization" + "organizations" ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "description": "Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Invoice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/invoice" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteKey", - "group": "keys", + "method": "validateInvoice", + "group": null, "cookies": false, "type": "", - "demo": "organization\/delete-key.md", + "demo": "organizations\/validate-invoice.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-invoice-status.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "keyId", - "description": "Key unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<KEY_ID>" + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<INVOICE_ID>" }, "in": "path" } ] } }, - "\/organization\/projects": { + "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/view": { "get": { - "summary": "List organization projects", - "operationId": "organizationListProjects", + "summary": "View invoice in PDF", + "operationId": "organizationsGetInvoiceView", "tags": [ - "organization" + "organizations" ], - "description": "Get a list of all projects. You can use the query params to filter your results.", + "description": "View invoice in PDF", "responses": { "200": { - "description": "Projects List", + "description": "paymentMethod", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/projectList" + "$ref": "#\/components\/schemas\/paymentMethod" } } } @@ -46599,83 +51977,71 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProjects", - "group": "projects", + "method": "getInvoiceView", + "group": null, "cookies": false, - "type": "", - "demo": "organization\/list-projects.md", + "type": "location", + "demo": "organizations\/get-invoice-view.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "billing.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-view.md", "auth": { - "Project": [] + "Project": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "ImpersonateUserId": [] } ], "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, labels, search", - "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, + "name": "organizationId", + "description": "Organization ID", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "invoiceId", + "description": "Invoice unique ID", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<INVOICE_ID>" }, - "in": "query" + "in": "path" } ] - }, - "post": { - "summary": "Create organization project", - "operationId": "organizationCreateProject", + } + }, + "\/organizations\/{organizationId}\/payment-method": { + "patch": { + "summary": "Set team's payment method", + "operationId": "organizationsSetDefaultPaymentMethod", "tags": [ - "organization" + "organizations" ], - "description": "Create a new project.", + "description": "Set a organization's default payment method.", "responses": { - "201": { - "description": "Project", + "200": { + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/organization" } } } @@ -46683,29 +52049,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "createProject", - "group": "projects", + "method": "setDefaultPaymentMethod", + "group": null, "cookies": false, "type": "", - "demo": "organization\/create-project.md", + "demo": "organizations\/set-default-payment-method.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-default-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" } ], "requestBody": { @@ -46714,64 +52091,34 @@ "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>" - }, - "region": { + "paymentMethodId": { "type": "string", - "description": "Project Region.", - "x-example": "fra", - "enum": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ], - "x-enum-name": "Region", - "x-enum-keys": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ] + "description": "Unique ID of payment method", + "x-example": "<PAYMENT_METHOD_ID>" } }, "required": [ - "projectId", - "name" + "paymentMethodId" ] } } } } - } - }, - "\/organization\/projects\/{projectId}": { - "get": { - "summary": "Get organization project", - "operationId": "organizationGetProject", + }, + "delete": { + "summary": "Delete team's default payment method", + "operationId": "organizationsDeleteDefaultPaymentMethod", "tags": [ - "organization" + "organizations" ], - "description": "Get a project.", + "description": "Delete the default payment method for an organization.", "responses": { "200": { - "description": "Project", + "description": "Organization", "content": { - "": { + "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/organization" } } } @@ -46779,58 +52126,59 @@ }, "deprecated": false, "x-appwrite": { - "method": "getProject", - "group": "projects", + "method": "deleteDefaultPaymentMethod", + "group": null, "cookies": false, "type": "", - "demo": "organization\/get-project.md", + "demo": "organizations\/delete-default-payment-method.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-default-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "projectId", - "description": "Project unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } ] - }, + } + }, + "\/organizations\/{organizationId}\/payment-method\/backup": { "patch": { - "summary": "Update organization project", - "operationId": "organizationUpdateProject", + "summary": "Set team's backup payment method", + "operationId": "organizationsSetBackupPaymentMethod", "tags": [ - "organization" + "organizations" ], - "description": "Update a project by its unique ID.", + "description": "Set an organization's backup payment method.\n", "responses": { "200": { - "description": "Project", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/organization" } } } @@ -46838,39 +52186,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateProject", - "group": "projects", + "method": "setBackupPaymentMethod", + "group": null, "cookies": false, "type": "", - "demo": "organization\/update-project.md", + "demo": "organizations\/set-backup-payment-method.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "billing.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-backup-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "projectId", - "description": "Project unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" }, "in": "path" } @@ -46881,14 +52228,14 @@ "schema": { "type": "object", "properties": { - "name": { + "paymentMethodId": { "type": "string", - "description": "Project name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Unique ID of payment method", + "x-example": "<PAYMENT_METHOD_ID>" } }, "required": [ - "name" + "paymentMethodId" ] } } @@ -46896,73 +52243,149 @@ } }, "delete": { - "summary": "Delete organization project", - "operationId": "organizationDeleteProject", + "summary": "Delete team's backup payment method", + "operationId": "organizationsDeleteBackupPaymentMethod", "tags": [ - "organization" + "organizations" ], - "description": "Delete a project by its unique ID.", + "description": "Delete a backup payment method for an organization.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackupPaymentMethod", + "group": null, + "cookies": false, + "type": "", + "demo": "organizations\/delete-backup-payment-method.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-backup-payment-method.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/payment-methods\/{paymentMethodId}": { + "get": { + "summary": "Get payment method", + "operationId": "organizationsGetPaymentMethod", + "tags": [ + "organizations" + ], + "description": "Get an organization's payment method using it's payment method ID.", + "responses": { + "200": { + "description": "paymentMethod", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/paymentMethod" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteProject", - "group": "projects", + "method": "getPaymentMethod", + "group": null, "cookies": false, "type": "", - "demo": "organization\/delete-project.md", + "demo": "organizations\/get-payment-method.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "billing.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "projectId", - "description": "Project unique ID.", + "name": "organizationId", + "description": "Organization ID", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + }, + { + "name": "paymentMethodId", + "description": "Unique ID of payment method", + "required": true, + "schema": { + "type": "string", + "x-example": "<PAYMENT_METHOD_ID>" }, "in": "path" } ] } }, - "\/organizations": { + "\/organizations\/{organizationId}\/plan": { "get": { - "summary": "List Orgnizations", - "operationId": "organizationsList", + "summary": "Get organization billing plan details", + "operationId": "organizationsGetPlan", "tags": [ "organizations" ], - "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.", + "description": "Get the details of the current billing plan for an organization.", "responses": { "200": { - "description": "Organizations list", + "description": "billingPlan", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organizationList" + "$ref": "#\/components\/schemas\/billingPlan" } } } @@ -46970,11 +52393,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "getPlan", "group": null, "cookies": false, "type": "", - "demo": "organizations\/list.md", + "demo": "organizations\/get-plan.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -46984,7 +52407,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-plan.md", "auth": { "Project": [] } @@ -46996,52 +52419,31 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform", - "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, + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<ORGANIZATION_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create Organization", - "operationId": "organizationsCreate", + "patch": { + "summary": "Update organization billing plan", + "operationId": "organizationsUpdatePlan", "tags": [ "organizations" ], - "description": "Create a new organization.\n", + "description": "Update the billing plan for an organization.", "responses": { - "201": { - "description": "Organization, or PaymentAuthentication", + "200": { + "description": "Organization", "content": { "application\/json": { "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/organization" - }, - { - "$ref": "#\/components\/schemas\/paymentAuthentication" - } - ] + "$ref": "#\/components\/schemas\/organization" } } } @@ -47049,21 +52451,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "updatePlan", "group": null, "cookies": false, "type": "", - "demo": "organizations\/create.md", + "demo": "organizations\/update-plan.md", "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-plan.md", "auth": { "Project": [] } @@ -47073,25 +52475,24 @@ "Project": [] } ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "organizationId": { - "type": "string", - "description": "Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<ORGANIZATION_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Organization name. Max length: 128 chars.", - "x-example": "<NAME>" - }, "billingPlan": { "type": "string", "description": "Organization billing plan chosen", @@ -47107,8 +52508,7 @@ "type": "string", "description": "Unique ID of billing address", "default": "", - "x-example": "<BILLING_ADDRESS_ID>", - "x-nullable": true + "x-example": "<BILLING_ADDRESS_ID>" }, "invites": { "type": "array", @@ -47137,26 +52537,9 @@ "x-example": 0, "format": "int32", "x-nullable": true - }, - "platform": { - "type": "string", - "description": "Platform type", - "default": "appwrite", - "x-example": "appwrite", - "enum": [ - "appwrite", - "imagine" - ], - "x-enum-name": "Platform", - "x-enum-keys": [ - "appwrite", - "imagine" - ] } }, "required": [ - "organizationId", - "name", "billingPlan" ] } @@ -47165,21 +52548,21 @@ } } }, - "\/organizations\/estimations\/create-organization": { + "\/organizations\/{organizationId}\/plan\/cancel": { "patch": { - "summary": "Estimate create Organization", - "operationId": "organizationsEstimationCreateOrganization", + "summary": "Cancel organization plan change", + "operationId": "organizationsCancelDowngrade", "tags": [ "organizations" ], - "description": "Get estimation for creating an organization.", + "description": "Cancel the downgrade initiated for an organization.", "responses": { "200": { - "description": "Estimation", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/estimation" + "$ref": "#\/components\/schemas\/organization" } } } @@ -47187,21 +52570,81 @@ }, "deprecated": false, "x-appwrite": { - "method": "estimationCreateOrganization", + "method": "cancelDowngrade", "group": null, "cookies": false, "type": "", - "demo": "organizations\/estimation-create-organization.md", - "rate-limit": 10, + "demo": "organizations\/cancel-downgrade.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "billing.write", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-create-organization.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/cancel-downgrade.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization Unique ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/organizations\/{organizationId}\/plan\/estimations": { + "post": { + "summary": "Create billing plan estimation (upgrade or downgrade)", + "operationId": "organizationsCreatePlanEstimation", + "tags": [ + "organizations" + ], + "description": "Create a billing plan estimation for upgrading or downgrading an organization plan.\n", + "responses": { + "200": { + "description": "EstimationPlanChange", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/estimationPlanChange" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPlanEstimation", + "group": null, + "cookies": false, + "type": "", + "demo": "organizations\/create-plan-estimation.md", + "rate-limit": 120, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "billing.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-plan-estimation.md", "auth": { "Project": [] } @@ -47211,6 +52654,18 @@ "Project": [] } ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { @@ -47219,15 +52674,9 @@ "properties": { "billingPlan": { "type": "string", - "description": "Organization billing plan chosen", + "description": "Target billing plan", "x-example": "tier-0" }, - "paymentMethodId": { - "type": "string", - "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", - "x-example": "<PAYMENT_METHOD_ID>", - "x-nullable": true - }, "invites": { "type": "array", "description": "Additional member invites", @@ -47242,21 +52691,6 @@ "description": "Coupon id", "x-example": "<COUPON_ID>", "x-nullable": true - }, - "platform": { - "type": "string", - "description": "Platform type", - "default": "appwrite", - "x-example": "appwrite", - "enum": [ - "appwrite", - "imagine" - ], - "x-enum-name": "Platform", - "x-enum-keys": [ - "appwrite", - "imagine" - ] } }, "required": [ @@ -47268,39 +52702,43 @@ } } }, - "\/organizations\/{organizationId}": { - "delete": { - "summary": "Delete team", - "operationId": "organizationsDelete", + "\/organizations\/{organizationId}\/regions": { + "get": { + "summary": "List Regions", + "operationId": "organizationsListRegions", "tags": [ "organizations" ], - "description": "Delete an organization.", + "description": "Get all available regions for an organization.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Regions list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/consoleRegionList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "listRegions", "group": null, "cookies": false, "type": "", - "demo": "organizations\/delete.md", + "demo": "organizations\/list-regions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organizations.write", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-regions.md", "auth": { "Project": [] } @@ -47324,21 +52762,21 @@ ] } }, - "\/organizations\/{organizationId}\/addons": { + "\/organizations\/{organizationId}\/roles": { "get": { - "summary": "List addons", - "operationId": "organizationsListAddons", + "summary": "Get Scopes", + "operationId": "organizationsGetScopes", "tags": [ "organizations" ], - "description": "List all billing addons for an organization.\n", + "description": "Get Scopes", "responses": { "200": { - "description": "Addons list", + "description": "Roles", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/addonList" + "$ref": "#\/components\/schemas\/roles" } } } @@ -47346,21 +52784,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listAddons", + "method": "getScopes", "group": null, "cookies": false, "type": "", - "demo": "organizations\/list-addons.md", + "demo": "organizations\/get-scopes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-addons.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-scopes.md", "auth": { "Project": [] } @@ -47373,32 +52811,43 @@ "parameters": [ { "name": "organizationId", - "description": "Organization ID", + "description": "Organization id", "required": true, "schema": { "type": "string", "x-example": "<ORGANIZATION_ID>" }, "in": "path" + }, + { + "name": "projectId", + "description": "Project id", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>", + "default": "" + }, + "in": "query" } ] } }, - "\/organizations\/{organizationId}\/addons\/baa": { - "post": { - "summary": "Create BAA addon", - "operationId": "organizationsCreateBaaAddon", + "\/organizations\/{organizationId}\/taxId": { + "patch": { + "summary": "Set team's tax Id", + "operationId": "organizationsSetBillingTaxId", "tags": [ "organizations" ], - "description": "Create the BAA billing addon for an organization.\n", + "description": "Set an organization's billing tax ID.", "responses": { - "201": { - "description": "Addon", + "200": { + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/addon" + "$ref": "#\/components\/schemas\/organization" } } } @@ -47406,12 +52855,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "createBaaAddon", + "method": "setBillingTaxId", "group": null, "cookies": false, "type": "", - "demo": "organizations\/create-baa-addon.md", - "rate-limit": 10, + "demo": "organizations\/set-billing-tax-id.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "billing.write", @@ -47420,7 +52869,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-baa-addon.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-tax-id.md", "auth": { "Project": [] } @@ -47441,24 +52890,44 @@ }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "taxId": { + "type": "string", + "description": "Tax Id associated to billing.", + "x-example": "<TAX_ID>", + "x-nullable": true + } + }, + "required": [ + "taxId" + ] + } + } + } + } } }, - "\/organizations\/{organizationId}\/addons\/{addonId}": { + "\/organizations\/{organizationId}\/usage": { "get": { - "summary": "Get addon", - "operationId": "organizationsGetAddon", + "summary": "Get team's usage data", + "operationId": "organizationsGetUsage", "tags": [ "organizations" ], - "description": "Get the details of a billing addon for an organization.\n", + "description": "Get the usage data for an organization.", "responses": { "200": { - "description": "Addon", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/addon" + "$ref": "#\/components\/schemas\/usageOrganization" } } } @@ -47466,21 +52935,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAddon", + "method": "getUsage", "group": null, "cookies": false, "type": "", - "demo": "organizations\/get-addon.md", + "demo": "organizations\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "teams.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-addon.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-usage.md", "auth": { "Project": [] } @@ -47502,97 +52971,177 @@ "in": "path" }, { - "name": "addonId", - "description": "Addon ID", - "required": true, + "name": "startDate", + "description": "Starting date for the usage", + "required": false, "schema": { "type": "string", - "x-example": "<ADDON_ID>" + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "in": "path" + "in": "query" + }, + { + "name": "endDate", + "description": "End date for the usage", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "in": "query" } ] - }, - "delete": { - "summary": "Delete addon", - "operationId": "organizationsDeleteAddon", + } + }, + "\/organizations\/{organizationId}\/validate": { + "patch": { + "summary": "Validate payment for the organization after creation or upgrade", + "operationId": "organizationsValidatePayment", "tags": [ "organizations" ], - "description": "Delete a billing addon for an organization.\n", + "description": "Validate payment for team after creation or upgrade.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "validatePayment", + "group": null, + "cookies": false, + "type": "", + "demo": "organizations\/validate-payment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/validate-payment.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "organizationId", + "description": "Organization ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ORGANIZATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "invites": { + "type": "array", + "description": "Additional member invites", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/ping": { + "get": { + "summary": "Test the connection between the Appwrite and the SDK.", + "operationId": "pingGet", + "tags": [ + "ping" + ], + "description": "Send a ping to project as part of onboarding.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteAddon", + "method": "get", "group": null, "cookies": false, "type": "", - "demo": "organizations\/delete-addon.md", - "rate-limit": 10, + "demo": "ping\/get.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "global", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-addon.md", - "produces": [ - "application\/json" - ], "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "addonId", - "description": "Addon ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ADDON_ID>" - }, - "in": "path" + "Project": [], + "Key": [], + "JWT": [], + "Session": [] } ] } }, - "\/organizations\/{organizationId}\/addons\/{addonId}\/confirmations": { - "post": { - "summary": "Confirm addon payment after 3DS authentication", - "operationId": "organizationsConfirmAddonPayment", + "\/postgresql": { + "get": { + "summary": "List databases", + "operationId": "postgresqlList", "tags": [ - "organizations" + "postgresql" ], - "description": "Confirm payment for a billing addon for an organization.\n", + "description": "List all dedicated databases. Results support pagination.", "responses": { "200": { - "description": "Addon", + "description": "Dedicated databases list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/addon" + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" } } } @@ -47600,69 +53149,61 @@ }, "deprecated": false, "x-appwrite": { - "method": "confirmAddonPayment", - "group": null, + "method": "list", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/confirm-addon-payment.md", - "rate-limit": 10, + "demo": "postgresql\/list.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/confirm-addon-payment.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "addonId", - "description": "Addon ID", - "required": true, + "name": "queries", + "description": "Array of query strings.", + "required": false, "schema": { - "type": "string", - "x-example": "<ADDON_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] - } - }, - "\/organizations\/{organizationId}\/addons\/{addon}\/price": { - "get": { - "summary": "Get addon price", - "operationId": "organizationsGetAddonPrice", + }, + "post": { + "summary": "Create database", + "operationId": "postgresqlCreate", "tags": [ - "organizations" + "postgresql" ], - "description": "Get the price details for a billing addon for an organization.\n", + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", "responses": { - "200": { - "description": "AddonPrice", + "201": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/addonPrice" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -47670,78 +53211,163 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAddonPrice", - "group": null, + "method": "create", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/get-addon-price.md", + "demo": "postgresql\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-addon-price.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], - "parameters": [ - { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "addon", - "description": "Addon key identifier (e.g. baa).", - "required": true, - "schema": { - "type": "string", - "x-example": "baa", - "enum": [ - "baa", - "backup_recovery" - ], - "x-enum-name": "Addon", - "x-enum-keys": [ - "baa", - "backup_recovery" - ] - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Database display name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "version": { + "type": "string", + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "default": 15, + "x-example": 5, + "format": "int32" + }, + "pitr": { + "type": "boolean", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "default": true, + "x-example": false + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, + "x-example": false + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "databaseId", + "name" + ] + } + } } - ] + } } }, - "\/organizations\/{organizationId}\/aggregations": { + "\/postgresql\/specifications": { "get": { - "summary": "List aggregations", - "operationId": "organizationsListAggregations", + "summary": "List specifications", + "operationId": "postgresqlListSpecifications", "tags": [ - "organizations" + "postgresql" ], - "description": "Get a list of all aggregations for an organization.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "Aggregation team list", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/aggregationTeamList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -47749,72 +53375,48 @@ }, "deprecated": false, "x-appwrite": { - "method": "listAggregations", - "group": null, + "method": "listSpecifications", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/list-aggregations.md", + "demo": "postgresql\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-aggregations.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "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: teamId, aggregationId, from, to", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" + "Project": [], + "Key": [] } ] } }, - "\/organizations\/{organizationId}\/aggregations\/{aggregationId}": { + "\/postgresql\/{databaseId}": { "get": { - "summary": "Get aggregation", - "operationId": "organizationsGetAggregation", + "summary": "Get database", + "operationId": "postgresqlGet", "tags": [ - "organizations" + "postgresql" ], - "description": "Get a specific aggregation using it's aggregation ID.", + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", "responses": { "200": { - "description": "Team", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/aggregationTeam" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -47822,92 +53424,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAggregation", - "group": null, + "method": "get", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/get-aggregation.md", + "demo": "postgresql\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-aggregation.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "aggregationId", - "description": "Invoice unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<AGGREGATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 5 - }, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - }, - "in": "query" } ] - } - }, - "\/organizations\/{organizationId}\/billing-address": { + }, "patch": { - "summary": "Set team's billing address", - "operationId": "organizationsSetBillingAddress", + "summary": "Update database", + "operationId": "postgresqlUpdate", "tags": [ - "organizations" + "postgresql" ], - "description": "Set a billing address for an organization.", + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", "responses": { "200": { - "description": "Organization", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -47915,38 +53483,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "setBillingAddress", - "group": null, + "method": "update", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/set-billing-address.md", + "demo": "postgresql\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-address.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -47957,27 +53526,169 @@ "schema": { "type": "object", "properties": { - "billingAddressId": { + "name": { "type": "string", - "description": "Unique ID of billing address", - "x-example": "<BILLING_ADDRESS_ID>" + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "status": { + "type": "string", + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { + "type": "boolean", + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", + "x-example": false, + "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true } - }, - "required": [ - "billingAddressId" - ] + } } } } } }, "delete": { - "summary": "Delete team's billing address", - "operationId": "organizationsDeleteBillingAddress", + "summary": "Delete database", + "operationId": "postgresqlDelete", "tags": [ - "organizations" + "postgresql" ], - "description": "Delete a team's billing address.", + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", "responses": { "204": { "description": "No content" @@ -47985,21 +53696,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteBillingAddress", - "group": null, + "method": "delete", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/delete-billing-address.md", + "demo": "postgresql\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-billing-address.md", "produces": [ "application\/json" ], @@ -48009,38 +53720,39 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] } }, - "\/organizations\/{organizationId}\/billing-addresses\/{billingAddressId}": { + "\/postgresql\/{databaseId}\/backups": { "get": { - "summary": "Get billing address", - "operationId": "organizationsGetBillingAddress", + "summary": "List backups", + "operationId": "postgresqlListBackups", "tags": [ - "organizations" + "postgresql" ], - "description": "Get a billing address using it's ID.", + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Address", + "description": "BackupList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/billingAddress" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" } } } @@ -48048,69 +53760,71 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBillingAddress", - "group": null, + "method": "listBackups", + "group": "backups", "cookies": false, "type": "", - "demo": "organizations\/get-billing-address.md", + "demo": "postgresql\/list-backups.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-billing-address.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "billingAddressId", - "description": "Unique ID of billing address", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, "schema": { - "type": "string", - "x-example": "<BILLING_ADDRESS_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] - } - }, - "\/organizations\/{organizationId}\/billing-email": { - "patch": { - "summary": "Set team's billing email", - "operationId": "organizationsSetBillingEmail", + }, + "post": { + "summary": "Create backup", + "operationId": "postgresqlCreateBackup", "tags": [ - "organizations" + "postgresql" ], - "description": "Set the current billing email for the organization.", + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -48118,38 +53832,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "setBillingEmail", - "group": null, + "method": "createBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "organizations\/set-billing-email.md", + "demo": "postgresql\/create-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-email.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -48160,129 +53875,34 @@ "schema": { "type": "object", "properties": { - "billingEmail": { + "type": { "type": "string", - "description": "Billing email for the organization.", - "x-example": "email@example.com", - "format": "email" + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" } - }, - "required": [ - "billingEmail" - ] - } - } - } - } - } - }, - "\/organizations\/{organizationId}\/budget": { - "patch": { - "summary": "Update organization budget", - "operationId": "organizationsUpdateBudget", - "tags": [ - "organizations" - ], - "description": "Update the budget limit for an organization.", - "responses": { - "200": { - "description": "Organization", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/organization" } } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateBudget", - "group": null, - "cookies": false, - "type": "", - "demo": "organizations\/update-budget.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-budget.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "organizationId", - "description": "Organization Unique ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "budget": { - "type": "integer", - "description": "Budget limit for additional usage set for the organization", - "x-example": 0, - "format": "int32", - "x-nullable": true - }, - "alerts": { - "type": "array", - "description": "Budget alert limit percentage", - "default": [ - 75 - ], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "budget" - ] - } - } - } } } }, - "\/organizations\/{organizationId}\/credits": { + "\/postgresql\/{databaseId}\/backups\/policies": { "get": { - "summary": "List credits", - "operationId": "organizationsListCredits", + "summary": "List backup policies", + "operationId": "postgresqlListBackupPolicies", "tags": [ - "organizations" + "postgresql" ], - "description": "List all credits for an organization.\n", + "description": "List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "CreditList", + "description": "Backup policy list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/creditList" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -48290,44 +53910,45 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCredits", - "group": null, + "method": "listBackupPolicies", + "group": "policies", "cookies": false, "type": "", - "demo": "organizations\/list-credits.md", + "demo": "postgresql\/list-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-credits.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status", + "description": "Array of query strings generated using the Query class provided by the SDK.", "required": false, "schema": { "type": "array", @@ -48341,19 +53962,19 @@ ] }, "post": { - "summary": "Add credits from coupon", - "operationId": "organizationsAddCredit", + "summary": "Create backup policy", + "operationId": "postgresqlCreateBackupPolicy", "tags": [ - "organizations" + "postgresql" ], - "description": "Add credit to an organization using a coupon.", + "description": "Create a scheduled backup policy for a dedicated database.", "responses": { "201": { - "description": "Credit", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/credit" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -48361,38 +53982,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "addCredit", - "group": null, + "method": "createBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "organizations\/add-credit.md", - "rate-limit": 10, + "demo": "postgresql\/create-backup-policy.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/add-credit.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -48403,14 +54025,48 @@ "schema": { "type": "object", "properties": { - "couponId": { + "policyId": { "type": "string", - "description": "ID of the coupon", - "x-example": "<COUPON_ID>" + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false } }, "required": [ - "couponId" + "policyId", + "name", + "schedule", + "retention" ] } } @@ -48418,21 +54074,21 @@ } } }, - "\/organizations\/{organizationId}\/credits\/available": { + "\/postgresql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get available credits", - "operationId": "organizationsGetAvailableCredits", + "summary": "Get backup policy", + "operationId": "postgresqlGetBackupPolicy", "tags": [ - "organizations" + "postgresql" ], - "description": "Get total available valid credits for an organization.", + "description": "Get a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "CreditAvailable", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/creditAvailable" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -48440,59 +54096,68 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAvailableCredits", - "group": null, + "method": "getBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "organizations\/get-available-credits.md", + "demo": "postgresql\/get-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-available-credits.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, "in": "path" } ] - } - }, - "\/organizations\/{organizationId}\/credits\/{creditId}": { - "get": { - "summary": "Get credit details", - "operationId": "organizationsGetCredit", + }, + "patch": { + "summary": "Update backup policy", + "operationId": "postgresqlUpdateBackupPolicy", "tags": [ - "organizations" + "postgresql" ], - "description": "Get credit details.", + "description": "Update a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Credit", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/credit" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -48500,129 +54165,170 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCredit", - "group": null, + "method": "updateBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "organizations\/get-credit.md", + "demo": "postgresql\/update-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-credit.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "creditId", - "description": "Credit Unique ID", + "name": "policyId", + "description": "Policy ID.", "required": true, "schema": { "type": "string", - "x-example": "<CREDIT_ID>" + "x-example": "<POLICY_ID>" }, "in": "path" } - ] - } - }, - "\/organizations\/{organizationId}\/estimations\/delete-organization": { - "patch": { - "summary": "Estimate delete team", - "operationId": "organizationsEstimationDeleteOrganization", - "tags": [ - "organizations" ], - "description": "Get estimation for deleting an organization.", - "responses": { - "200": { - "description": "DeleteOrganization", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/estimationDeleteOrganization" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", + "x-nullable": true + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "x-example": false, + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "postgresqlDeleteBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "estimationDeleteOrganization", - "group": null, + "method": "deleteBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "organizations\/estimation-delete-organization.md", - "rate-limit": 10, + "demo": "postgresql\/delete-backup-policy.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organizations.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-delete-organization.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Team ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, "in": "path" } ] } }, - "\/organizations\/{organizationId}\/estimations\/update-plan": { - "patch": { - "summary": "Estimate for update plan", - "operationId": "organizationsEstimationUpdatePlan", + "\/postgresql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "postgresqlUpdateBackupStorage", "tags": [ - "organizations" + "postgresql" ], - "description": "Get estimation for updating the organization plan.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { "200": { - "description": "UpdatePlan", + "description": "BackupStorageConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/estimationUpdatePlan" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" } } } @@ -48630,38 +54336,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "estimationUpdatePlan", - "group": null, + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "organizations\/estimation-update-plan.md", - "rate-limit": 10, + "demo": "postgresql\/update-backup-storage.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/estimation-update-plan.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -48672,29 +54379,50 @@ "schema": { "type": "object", "properties": { - "billingPlan": { + "provider": { "type": "string", - "description": "Organization billing plan chosen", - "x-example": "tier-0" + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" }, - "invites": { - "type": "array", - "description": "Additional member invites", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" }, - "couponId": { + "region": { "type": "string", - "description": "Coupon id", - "x-example": "<COUPON_ID>", - "x-nullable": true + "description": "Storage region.", + "default": "", + "x-example": "<REGION>" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "<ENDPOINT>" + }, + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" } }, "required": [ - "billingPlan" + "provider", + "bucket", + "accessKey", + "secretKey" ] } } @@ -48702,21 +54430,21 @@ } } }, - "\/organizations\/{organizationId}\/feedbacks\/downgrade": { - "post": { - "summary": "Create downgrade feedback", - "operationId": "organizationsCreateDowngradeFeedback", + "\/postgresql\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "postgresqlGetBackup", "tags": [ - "organizations" + "postgresql" ], - "description": "Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.\n", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { - "201": { - "description": "Downgrade Feedback", + "200": { + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/downgradeFeedback" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -48724,169 +54452,135 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDowngradeFeedback", - "group": null, + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "organizations\/create-downgrade-feedback.md", + "demo": "postgresql\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-downgrade-feedback.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization Unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "Feedback reason", - "x-example": "<REASON>" - }, - "message": { - "type": "string", - "description": "Feedback message", - "x-example": "<MESSAGE>" - }, - "fromPlanId": { - "type": "string", - "description": "Plan downgrading from", - "x-example": "<FROM_PLAN_ID>" - }, - "toPlanId": { - "type": "string", - "description": "Plan downgrading to", - "x-example": "<TO_PLAN_ID>" - } - }, - "required": [ - "reason", - "message", - "fromPlanId", - "toPlanId" - ] - } - } - } - } - } - }, - "\/organizations\/{organizationId}\/invoices": { - "get": { - "summary": "List invoices", - "operationId": "organizationsListInvoices", + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "postgresqlDeleteBackup", "tags": [ - "organizations" + "postgresql" ], - "description": "List all invoices for an organization.", + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", "responses": { - "200": { - "description": "Billing invoices list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/invoiceList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listInvoices", - "group": null, + "method": "deleteBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "organizations\/list-invoices.md", + "demo": "postgresql\/delete-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-invoices.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "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\/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount", - "required": false, + "name": "backupId", + "description": "Backup ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<BACKUP_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/organizations\/{organizationId}\/invoices\/{invoiceId}": { + "\/postgresql\/{databaseId}\/branches": { "get": { - "summary": "Get invoice", - "operationId": "organizationsGetInvoice", + "summary": "List branches", + "operationId": "postgresqlListBranches", "tags": [ - "organizations" + "postgresql" ], - "description": "Get an invoice by its unique ID.", + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", "responses": { "200": { - "description": "Invoice", + "description": "BranchList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/invoice" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" } } } @@ -48894,69 +54588,146 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInvoice", - "group": null, + "method": "listBranches", + "group": "branches", "cookies": false, "type": "", - "demo": "organizations\/get-invoice.md", + "demo": "postgresql\/list-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" - }, + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "postgresqlCreateBranch", + "tags": [ + "postgresql" + ], + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBranch", + "group": "branches", + "cookies": false, + "type": "", + "demo": "postgresql\/create-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "invoiceId", - "description": "Invoice unique ID", + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<INVOICE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { + "type": "string", + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" + } + } + } + } + } + } } }, - "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/download": { - "get": { - "summary": "Download invoice in PDF", - "operationId": "organizationsGetInvoiceDownload", + "\/postgresql\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "postgresqlDeleteBranch", "tags": [ - "organizations" + "postgresql" ], - "description": "Download invoice in PDF", + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", "responses": { - "200": { - "description": "paymentMethod", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/paymentMethod" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -48964,71 +54735,70 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInvoiceDownload", - "group": null, + "method": "deleteBranch", + "group": "branches", "cookies": false, - "type": "location", - "demo": "organizations\/get-invoice-download.md", + "type": "", + "demo": "postgresql\/delete-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-download.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "invoiceId", - "description": "Invoice unique ID", + "name": "branchId", + "description": "Branch ID.", "required": true, "schema": { "type": "string", - "x-example": "<INVOICE_ID>" + "x-example": "<BRANCH_ID>" }, "in": "path" } ] } }, - "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/payments": { - "post": { - "summary": "Initiate payment for failed invoice to pay live from console", - "operationId": "organizationsCreateInvoicePayment", + "\/postgresql\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "postgresqlUpdateCredentials", "tags": [ - "organizations" + "postgresql" ], - "description": "Initiate payment for failed invoice to pay live from console", + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", "responses": { "200": { - "description": "Invoice", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/invoice" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49036,88 +54806,60 @@ }, "deprecated": false, "x-appwrite": { - "method": "createInvoicePayment", - "group": null, + "method": "updateCredentials", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/create-invoice-payment.md", - "rate-limit": 10, - "rate-time": 86400, + "demo": "postgresql\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-invoice-payment.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "invoiceId", - "description": "Invoice unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<INVOICE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "paymentMethodId": { - "type": "string", - "description": "Payment method ID", - "x-example": "<PAYMENT_METHOD_ID>" - } - }, - "required": [ - "paymentMethodId" - ] - } - } - } - } + ] } }, - "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/status": { - "patch": { - "summary": "Validate the payment for an invoice and update status", - "operationId": "organizationsValidateInvoice", + "\/postgresql\/{databaseId}\/executions": { + "post": { + "summary": "Create execution", + "operationId": "postgresqlCreateExecution", "tags": [ - "organizations" + "postgresql" ], - "description": "Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.", + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", "responses": { "200": { - "description": "Invoice", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/invoice" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" } } } @@ -49125,69 +54867,93 @@ }, "deprecated": false, "x-appwrite": { - "method": "validateInvoice", - "group": null, + "method": "createExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "organizations\/validate-invoice.md", + "demo": "postgresql\/create-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-invoice-status.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "invoiceId", - "description": "Invoice unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<INVOICE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sql": { + "type": "string", + "description": "SQL statement to execute. Exactly one statement per request.", + "x-example": "<SQL>" + }, + "bindings": { + "type": "object", + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "timeoutSeconds": { + "type": "integer", + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "sql" + ] + } + } + } + } } }, - "\/organizations\/{organizationId}\/invoices\/{invoiceId}\/view": { + "\/postgresql\/{databaseId}\/extensions": { "get": { - "summary": "View invoice in PDF", - "operationId": "organizationsGetInvoiceView", + "summary": "List extensions", + "operationId": "postgresqlListExtensions", "tags": [ - "organizations" + "postgresql" ], - "description": "View invoice in PDF", + "description": "List installed and available extensions for a PostgreSQL database.", "responses": { "200": { - "description": "paymentMethod", + "description": "Extensions", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/paymentMethod" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExtensions" } } } @@ -49195,71 +54961,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInvoiceView", - "group": null, + "method": "listExtensions", + "group": "extensions", "cookies": false, - "type": "location", - "demo": "organizations\/get-invoice-view.md", + "type": "", + "demo": "postgresql\/list-extensions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-invoice-view.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "invoiceId", - "description": "Invoice unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<INVOICE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] - } - }, - "\/organizations\/{organizationId}\/payment-method": { - "patch": { - "summary": "Set team's payment method", - "operationId": "organizationsSetDefaultPaymentMethod", + }, + "post": { + "summary": "Create extension", + "operationId": "postgresqlCreateExtension", "tags": [ - "organizations" + "postgresql" ], - "description": "Set a organization's default payment method.", + "description": "Install a database extension. Only available for PostgreSQL databases. The install runs asynchronously; poll the extensions list endpoint for status.", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49267,38 +55020,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "setDefaultPaymentMethod", - "group": null, + "method": "createExtension", + "group": "extensions", "cookies": false, "type": "", - "demo": "organizations\/set-default-payment-method.md", + "demo": "postgresql\/create-extension.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-default-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -49309,34 +55063,36 @@ "schema": { "type": "object", "properties": { - "paymentMethodId": { + "name": { "type": "string", - "description": "Unique ID of payment method", - "x-example": "<PAYMENT_METHOD_ID>" + "description": "Extension name (e.g., pgvector, postgis, uuid-ossp).", + "x-example": "<NAME>" } }, "required": [ - "paymentMethodId" + "name" ] } } } } - }, + } + }, + "\/postgresql\/{databaseId}\/extensions\/{extensionName}": { "delete": { - "summary": "Delete team's default payment method", - "operationId": "organizationsDeleteDefaultPaymentMethod", + "summary": "Delete extension", + "operationId": "postgresqlDeleteExtension", "tags": [ - "organizations" + "postgresql" ], - "description": "Delete the default payment method for an organization.", + "description": "Uninstall a database extension from a PostgreSQL database. The uninstall runs asynchronously; poll the extensions list endpoint for status.", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49344,59 +55100,70 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDefaultPaymentMethod", - "group": null, + "method": "deleteExtension", + "group": "extensions", "cookies": false, "type": "", - "demo": "organizations\/delete-default-payment-method.md", + "demo": "postgresql\/delete-extension.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-default-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "extensionName", + "description": "Extension name to uninstall.", + "required": true, + "schema": { + "type": "string", + "x-example": "<EXTENSION_NAME>" }, "in": "path" } ] } }, - "\/organizations\/{organizationId}\/payment-method\/backup": { - "patch": { - "summary": "Set team's backup payment method", - "operationId": "organizationsSetBackupPaymentMethod", + "\/postgresql\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "postgresqlCreateFailover", "tags": [ - "organizations" + "postgresql" ], - "description": "Set an organization's backup payment method.\n", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49404,38 +55171,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "setBackupPaymentMethod", - "group": null, + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "organizations\/set-backup-payment-method.md", + "demo": "postgresql\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-backup-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -49446,34 +55214,34 @@ "schema": { "type": "object", "properties": { - "paymentMethodId": { + "targetReplicaId": { "type": "string", - "description": "Unique ID of payment method", - "x-example": "<PAYMENT_METHOD_ID>" + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true } - }, - "required": [ - "paymentMethodId" - ] + } } } } } - }, - "delete": { - "summary": "Delete team's backup payment method", - "operationId": "organizationsDeleteBackupPaymentMethod", + } + }, + "\/postgresql\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "postgresqlUpdateMaintenance", "tags": [ - "organizations" + "postgresql" ], - "description": "Delete a backup payment method for an organization.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Organization", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49481,59 +55249,86 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteBackupPaymentMethod", - "group": null, + "method": "updateMaintenance", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/delete-backup-payment-method.md", + "demo": "postgresql\/update-maintenance.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/delete-backup-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } } }, - "\/organizations\/{organizationId}\/payment-methods\/{paymentMethodId}": { - "get": { - "summary": "Get payment method", - "operationId": "organizationsGetPaymentMethod", + "\/postgresql\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "postgresqlCreateMigration", "tags": [ - "organizations" + "postgresql" ], - "description": "Get an organization's payment method using it's payment method ID.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", "responses": { "200": { - "description": "paymentMethod", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/paymentMethod" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -49541,69 +55336,85 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPaymentMethod", - "group": null, + "method": "createMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "organizations\/get-payment-method.md", + "demo": "postgresql\/create-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.read", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-payment-method.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", - "required": true, - "schema": { - "type": "string", - "x-example": "<ORGANIZATION_ID>" - }, - "in": "path" - }, - { - "name": "paymentMethodId", - "description": "Unique ID of payment method", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PAYMENT_METHOD_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" + }, + "specification": { + "type": "string", + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } } }, - "\/organizations\/{organizationId}\/plan": { + "\/postgresql\/{databaseId}\/operations": { "get": { - "summary": "Get organization billing plan details", - "operationId": "organizationsGetPlan", + "summary": "List operations", + "operationId": "postgresqlListOperations", "tags": [ - "organizations" + "postgresql" ], - "description": "Get the details of the current billing plan for an organization.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "billingPlan", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/billingPlan" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -49611,57 +55422,94 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPlan", - "group": null, + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "organizations\/get-plan.md", + "demo": "postgresql\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-plan.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization Unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - }, - "patch": { - "summary": "Update organization billing plan", - "operationId": "organizationsUpdatePlan", + } + }, + "\/postgresql\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "postgresqlGetPitr", "tags": [ - "organizations" + "postgresql" ], - "description": "Update the billing plan for an organization.", + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", "responses": { "200": { - "description": "Organization", + "description": "PITRWindows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" } } } @@ -49669,118 +55517,60 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePlan", - "group": null, + "method": "getPitr", + "group": "pitr", "cookies": false, "type": "", - "demo": "organizations\/update-plan.md", - "rate-limit": 10, + "demo": "postgresql\/get-pitr.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/update-plan.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization Unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "billingPlan": { - "type": "string", - "description": "Organization billing plan chosen", - "x-example": "tier-0" - }, - "paymentMethodId": { - "type": "string", - "description": "Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.", - "x-example": "<PAYMENT_METHOD_ID>", - "x-nullable": true - }, - "billingAddressId": { - "type": "string", - "description": "Unique ID of billing address", - "default": "", - "x-example": "<BILLING_ADDRESS_ID>" - }, - "invites": { - "type": "array", - "description": "Additional member invites", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "couponId": { - "type": "string", - "description": "Coupon id", - "x-example": "<COUPON_ID>", - "x-nullable": true - }, - "taxId": { - "type": "string", - "description": "Tax Id associated to billing.", - "x-example": "<TAX_ID>", - "x-nullable": true - }, - "budget": { - "type": "integer", - "description": "Budget limit for additional usage set for the organization", - "x-example": 0, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "billingPlan" - ] - } - } - } - } + ] } }, - "\/organizations\/{organizationId}\/plan\/cancel": { - "patch": { - "summary": "Cancel organization plan change", - "operationId": "organizationsCancelDowngrade", + "\/postgresql\/{databaseId}\/pooler": { + "get": { + "summary": "Get pooler", + "operationId": "postgresqlGetPooler", "tags": [ - "organizations" + "postgresql" ], - "description": "Cancel the downgrade initiated for an organization.", + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", "responses": { "200": { - "description": "Organization", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -49788,59 +55578,58 @@ }, "deprecated": false, "x-appwrite": { - "method": "cancelDowngrade", - "group": null, + "method": "getPooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "organizations\/cancel-downgrade.md", + "demo": "postgresql\/get-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/cancel-downgrade.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization Unique ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] - } - }, - "\/organizations\/{organizationId}\/plan\/estimations": { - "post": { - "summary": "Create billing plan estimation (upgrade or downgrade)", - "operationId": "organizationsCreatePlanEstimation", + }, + "patch": { + "summary": "Update pooler", + "operationId": "postgresqlUpdatePooler", "tags": [ - "organizations" + "postgresql" ], - "description": "Create a billing plan estimation for upgrading or downgrading an organization plan.\n", + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", "responses": { "200": { - "description": "EstimationPlanChange", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/estimationPlanChange" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -49848,38 +55637,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPlanEstimation", - "group": null, + "method": "updatePooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "organizations\/create-plan-estimation.md", - "rate-limit": 10, + "demo": "postgresql\/update-pooler.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/create-plan-estimation.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -49890,51 +55680,78 @@ "schema": { "type": "object", "properties": { - "billingPlan": { + "mode": { "type": "string", - "description": "Target billing plan", - "x-example": "tier-0" + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "x-example": "transaction", + "x-nullable": true }, - "invites": { - "type": "array", - "description": "Additional member invites", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "maxConnections": { + "type": "integer", + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "x-example": 10, + "format": "int32", + "x-nullable": true }, - "couponId": { + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "readWriteSplitting": { + "type": "boolean", + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", + "x-example": false, + "x-nullable": true + }, + "poolerCpuRequest": { "type": "string", - "description": "Coupon id", - "x-example": "<COUPON_ID>", + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "x-example": "<POOLER_CPU_REQUEST>", + "x-nullable": true + }, + "poolerCpuLimit": { + "type": "string", + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "x-example": "<POOLER_CPU_LIMIT>", + "x-nullable": true + }, + "poolerMemoryRequest": { + "type": "string", + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "x-example": "<POOLER_MEMORY_REQUEST>", + "x-nullable": true + }, + "poolerMemoryLimit": { + "type": "string", + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "x-example": "<POOLER_MEMORY_LIMIT>", "x-nullable": true } - }, - "required": [ - "billingPlan" - ] + } } } } } } }, - "\/organizations\/{organizationId}\/regions": { + "\/postgresql\/{databaseId}\/replicas": { "get": { - "summary": "List Regions", - "operationId": "organizationsListRegions", + "summary": "Get replicas", + "operationId": "postgresqlGetReplicas", "tags": [ - "organizations" + "postgresql" ], - "description": "Get all available regions for an organization.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Regions list", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/consoleRegionList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -49942,59 +55759,60 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRegions", - "group": null, + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "organizations\/list-regions.md", + "demo": "postgresql\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/list-regions.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Team ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] } }, - "\/organizations\/{organizationId}\/roles": { + "\/postgresql\/{databaseId}\/restorations": { "get": { - "summary": "Get Scopes", - "operationId": "organizationsGetScopes", + "summary": "List restorations", + "operationId": "postgresqlListRestorations", "tags": [ - "organizations" + "postgresql" ], - "description": "Get Scopes", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Roles", + "description": "Dedicated database restorations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/roles" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" } } } @@ -50002,70 +55820,102 @@ }, "deprecated": false, "x-appwrite": { - "method": "getScopes", - "group": null, + "method": "listRestorations", + "group": "restorations", "cookies": false, "type": "", - "demo": "organizations\/get-scopes.md", + "demo": "postgresql\/list-restorations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-scopes.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization id", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "projectId", - "description": "Project id", + "name": "status", + "description": "Filter by restoration status.", "required": false, "schema": { "type": "string", - "x-example": "<PROJECT_ID>", - "default": "" + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 }, "in": "query" } ] - } - }, - "\/organizations\/{organizationId}\/taxId": { - "patch": { - "summary": "Set team's tax Id", - "operationId": "organizationsSetBillingTaxId", + }, + "post": { + "summary": "Create restoration", + "operationId": "postgresqlCreateRestoration", "tags": [ - "organizations" + "postgresql" ], - "description": "Set an organization's billing tax ID.", + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Organization", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -50073,38 +55923,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "setBillingTaxId", - "group": null, + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "organizations\/set-billing-tax-id.md", + "demo": "postgresql\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "billing.write", + "scope": "databases.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/set-billing-tax-id.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -50115,37 +55966,47 @@ "schema": { "type": "object", "properties": { - "taxId": { + "type": { "type": "string", - "description": "Tax Id associated to billing.", - "x-example": "<TAX_ID>", + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" + }, + "backupId": { + "type": "string", + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } - }, - "required": [ - "taxId" - ] + } } } } } } }, - "\/organizations\/{organizationId}\/usage": { + "\/postgresql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get team's usage data", - "operationId": "organizationsGetUsage", + "summary": "Get restoration", + "operationId": "postgresqlGetRestoration", "tags": [ - "organizations" + "postgresql" ], - "description": "Get the usage data for an organization.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { "200": { - "description": "Organization", + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageOrganization" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -50153,81 +56014,70 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "organizations\/get-usage.md", + "demo": "postgresql\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/get-usage.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "startDate", - "description": "Starting date for the usage", - "required": false, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "in": "query" - }, - { - "name": "endDate", - "description": "End date for the usage", - "required": false, + "name": "restorationId", + "description": "Restoration ID.", + "required": true, "schema": { "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00" + "x-example": "<RESTORATION_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/organizations\/{organizationId}\/validate": { - "patch": { - "summary": "Validate payment for the organization after creation or upgrade", - "operationId": "organizationsValidatePayment", + "\/postgresql\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "postgresqlGetStatus", "tags": [ - "organizations" + "postgresql" ], - "description": "Validate payment for team after creation or upgrade.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "Organization", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/organization" + "$ref": "#\/components\/schemas\/databaseStatus" } } } @@ -50235,79 +56085,60 @@ }, "deprecated": false, "x-appwrite": { - "method": "validatePayment", - "group": null, + "method": "getStatus", + "group": "postgresql", "cookies": false, "type": "", - "demo": "organizations\/validate-payment.md", + "demo": "postgresql\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/organizations\/validate-payment.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "organizationId", - "description": "Organization ID", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ORGANIZATION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "invites": { - "type": "array", - "description": "Additional member invites", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - } - } - } - } - } - } + ] } }, - "\/ping": { - "get": { - "summary": "Test the connection between the Appwrite and the SDK.", - "operationId": "pingGet", + "\/postgresql\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "postgresqlCreateUpgrade", "tags": [ - "ping" + "postgresql" ], - "description": "Send a ping to project as part of onboarding.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { "200": { - "description": "Any", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -50315,19 +56146,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "createUpgrade", + "group": "postgresql", "cookies": false, "type": "", - "demo": "ping\/get.md", + "demo": "postgresql\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "global", + "scope": "databases.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, @@ -50338,11 +56168,40 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [], - "Session": [] + "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "type": "string", + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } } }, "\/presences": { @@ -51229,7 +57088,7 @@ }, "scopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { "type": "string", @@ -51246,10 +57105,12 @@ "policies.write", "project.policies.read", "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", "templates.read", "templates.write", - "oauth2.read", - "oauth2.write", + "stages.read", + "stages.write", "users.read", "users.write", "sessions.read", @@ -51327,9 +57188,14 @@ "dedicatedDatabases.execute", "domains.read", "domains.write", + "wafRules.read", + "wafRules.write", "events.read", "apps.read", "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -51346,10 +57212,12 @@ "policies.write", "project.policies.read", "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", "templates.read", "templates.write", - "oauth2.read", - "oauth2.write", + "stages.read", + "stages.write", "users.read", "users.write", "sessions.read", @@ -51427,9 +57295,14 @@ "dedicatedDatabases.execute", "domains.read", "domains.write", + "wafRules.read", + "wafRules.write", "events.read", "apps.read", "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", "usage.read" ] } @@ -51508,7 +57381,7 @@ "properties": { "scopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { "type": "string", @@ -51525,10 +57398,119 @@ "policies.write", "project.policies.read", "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", "templates.read", "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", "oauth2.read", "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", "users.read", "users.write", "sessions.read", @@ -51606,109 +57588,14 @@ "dedicatedDatabases.execute", "domains.read", "domains.write", + "wafRules.read", + "wafRules.write", "events.read", "apps.read", "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", "oauth2.read", "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", + "oauth2.introspect", "usage.read" ] } @@ -51861,7 +57748,7 @@ }, "scopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { "type": "string", @@ -51878,10 +57765,12 @@ "policies.write", "project.policies.read", "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", "templates.read", "templates.write", - "oauth2.read", - "oauth2.write", + "stages.read", + "stages.write", "users.read", "users.write", "sessions.read", @@ -51959,9 +57848,14 @@ "dedicatedDatabases.execute", "domains.read", "domains.write", + "wafRules.read", + "wafRules.write", "events.read", "apps.read", "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", "usage.read" ], "x-enum-name": "ProjectKeyScopes", @@ -51978,10 +57872,12 @@ "policies.write", "project.policies.read", "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", "templates.read", "templates.write", - "oauth2.read", - "oauth2.write", + "stages.read", + "stages.write", "users.read", "users.write", "sessions.read", @@ -52059,9 +57955,14 @@ "dedicatedDatabases.execute", "domains.read", "domains.write", + "wafRules.read", + "wafRules.write", "events.read", "apps.read", "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", "usage.read" ] } @@ -52579,7 +58480,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.oauth2.read", "platforms": [ "console", "server" @@ -52734,6 +58635,13 @@ "format": "int32", "x-nullable": true }, + "installationAccessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, "confidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -52766,6 +58674,15 @@ "x-example": 60, "format": "int32", "x-nullable": true + }, + "defaultScopes": { + "type": "array", + "description": "List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } } }, "required": [ @@ -52808,7 +58725,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -52886,7 +58803,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -52946,6 +58863,84 @@ } } }, + "\/project\/oauth2\/appwrite": { + "patch": { + "summary": "Update project OAuth2 Appwrite", + "operationId": "projectUpdateOAuth2Appwrite", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Appwrite configuration.", + "responses": { + "200": { + "description": "OAuth2Appwrite", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Appwrite" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Appwrite", + "group": "oauth2", + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-appwrite.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, "\/project\/oauth2\/auth0": { "patch": { "summary": "Update project OAuth2 Auth0", @@ -52976,7 +58971,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53060,7 +59055,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53144,7 +59139,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53222,7 +59217,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53300,7 +59295,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53378,7 +59373,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53456,7 +59451,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53534,7 +59529,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53612,7 +59607,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53690,7 +59685,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53768,7 +59763,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53846,7 +59841,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -53924,7 +59919,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54002,7 +59997,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54086,7 +60081,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54164,7 +60159,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54249,7 +60244,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54347,7 +60342,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54437,7 +60432,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54515,7 +60510,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54593,7 +60588,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54677,7 +60672,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54755,7 +60750,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54818,6 +60813,35 @@ "format": "url", "x-nullable": true }, + "prompt": { + "type": "array", + "description": "Array of OpenID Connect prompt values controlling the authentication and consent screens. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "none", + "login", + "consent", + "select_account" + ], + "x-enum-name": "ProjectOAuth2OidcPrompt", + "x-enum-keys": [ + "none", + "login", + "consent", + "select_account" + ] + }, + "x-nullable": true + }, + "maxAge": { + "type": "integer", + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, "enabled": { "type": "boolean", "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", @@ -54861,7 +60885,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -54951,7 +60975,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55029,7 +61053,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55107,7 +61131,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55185,7 +61209,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55263,7 +61287,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55341,7 +61365,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55419,7 +61443,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55497,7 +61521,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55575,7 +61599,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55653,7 +61677,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55731,7 +61755,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55809,7 +61833,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55887,7 +61911,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -55965,7 +61989,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -56043,7 +62067,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -56121,7 +62145,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -56367,7 +62391,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.oauth2.read", "platforms": [ "console", "server" @@ -56395,6 +62419,7 @@ "enum": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -56441,6 +62466,7 @@ "x-enum-keys": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -58132,7 +64158,7 @@ "properties": { "total": { "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", + "description": "Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.", "x-example": 1, "format": "int32", "x-nullable": true @@ -58436,8 +64462,8 @@ "properties": { "duration": { "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "x-example": 5, + "description": "Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.", + "x-example": 60, "format": "int32" } }, @@ -58579,10 +64605,9 @@ "properties": { "total": { "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 100.", "x-example": 1, - "format": "int32", - "x-nullable": true + "format": "int32" } }, "required": [ @@ -58652,8 +64677,8 @@ "properties": { "total": { "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, + "description": "Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.", + "x-example": 0, "format": "int32", "x-nullable": true } @@ -60519,39 +66544,103 @@ ] } }, - "\/projects\/{projectId}\/console-access": { - "patch": { - "summary": "Record console access to a project", - "operationId": "projectsUpdateConsoleAccess", + "\/projects\/{projectId}\/addons": { + "get": { + "summary": "List project addons", + "operationId": "projectsListAddons", "tags": [ "projects" ], - "description": "Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.\n", + "description": "List all billing addons for a project.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Addons list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "updateConsoleAccess", + "method": "listAddons", "group": null, "cookies": false, "type": "", - "demo": "projects\/update-console-access.md", + "demo": "projects\/list-addons.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/update-console-access.md", - "produces": [ - "application\/json" + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/list-addons.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/premium-geo-db": { + "post": { + "summary": "Create Premium Geo DB addon for project", + "operationId": "projectsCreatePremiumGeoDBAddon", + "tags": [ + "projects" + ], + "description": "Create a Premium Geo DB addon for a project.\n", + "responses": { + "201": { + "description": "Addon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addon" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPremiumGeoDBAddon", + "group": null, + "cookies": false, + "type": "", + "demo": "projects\/create-premium-geo-db-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/create-premium-geo-db-addon.md", "auth": { "Project": [] } @@ -60575,21 +66664,21 @@ ] } }, - "\/projects\/{projectId}\/dev-keys": { + "\/projects\/{projectId}\/addons\/{addonId}": { "get": { - "summary": "List dev keys", - "operationId": "projectsListDevKeys", + "summary": "Get project addon", + "operationId": "projectsGetAddon", "tags": [ "projects" ], - "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "description": "Get the details of a billing addon for a project.\n", "responses": { "200": { - "description": "Dev Keys List", + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/devKeyList" + "$ref": "#\/components\/schemas\/addon" } } } @@ -60597,20 +66686,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDevKeys", - "group": "devKeys", + "method": "getAddon", + "group": null, "cookies": false, "type": "", - "demo": "projects\/list-dev-keys.md", + "demo": "projects\/get-addon.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.read", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/get-addon.md", "auth": { "Project": [] } @@ -60623,7 +66713,7 @@ "parameters": [ { "name": "projectId", - "description": "Project unique ID.", + "description": "Project ID", "required": true, "schema": { "type": "string", @@ -60632,34 +66722,97 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", - "required": false, + "name": "addonId", + "description": "Addon ID", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<ADDON_ID>" }, - "in": "query" + "in": "path" } ] }, + "delete": { + "summary": "Delete project addon", + "operationId": "projectsDeleteAddon", + "tags": [ + "projects" + ], + "description": "Delete a billing addon for a project.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteAddon", + "group": null, + "cookies": false, + "type": "", + "demo": "projects\/delete-addon.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/delete-addon.md", + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/{addonId}\/confirmations": { "post": { - "summary": "Create dev key", - "operationId": "projectsCreateDevKey", + "summary": "Confirm project addon payment after 3DS authentication", + "operationId": "projectsConfirmAddonPayment", "tags": [ "projects" ], - "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", + "description": "Confirm payment for a billing addon for a project.\n", "responses": { - "201": { - "description": "DevKey", + "200": { + "description": "Addon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/devKey" + "$ref": "#\/components\/schemas\/addon" } } } @@ -60667,20 +66820,91 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDevKey", - "group": "devKeys", + "method": "confirmAddonPayment", + "group": null, + "cookies": false, + "type": "", + "demo": "projects\/confirm-addon-payment.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/confirm-addon-payment.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "addonId", + "description": "Addon ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<ADDON_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/addons\/{addon}\/price": { + "get": { + "summary": "Get project addon price", + "operationId": "projectsGetAddonPrice", + "tags": [ + "projects" + ], + "description": "Get the price details for a billing addon for a project, including the prorated amount for the remaining days in the current billing cycle.\n", + "responses": { + "200": { + "description": "AddonPrice", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/addonPrice" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAddonPrice", + "group": null, "cookies": false, "type": "", - "demo": "projects\/create-dev-key.md", + "demo": "projects\/get-addon-price.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", + "scope": "projects.read", "platforms": [ "console" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/get-addon-price.md", "auth": { "Project": [] } @@ -60693,41 +66917,153 @@ "parameters": [ { "name": "projectId", - "description": "Project unique ID.", + "description": "Project ID", "required": true, "schema": { "type": "string", "x-example": "<PROJECT_ID>" }, "in": "path" + }, + { + "name": "addon", + "description": "Addon key identifier (e.g. premiumGeoDB).", + "required": true, + "schema": { + "type": "string", + "x-example": "baa" + }, + "in": "path" } + ] + } + }, + "\/projects\/{projectId}\/console-access": { + "patch": { + "summary": "Record console access to a project", + "operationId": "projectsUpdateConsoleAccess", + "tags": [ + "projects" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] + "description": "Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.\n", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateConsoleAccess", + "group": null, + "cookies": false, + "type": "", + "demo": "projects\/update-console-access.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/projects\/update-console-access.md", + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/dev-keys": { + "get": { + "summary": "List dev keys", + "operationId": "projectsListDevKeys", + "tags": [ + "projects" + ], + "description": "List all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", + "responses": { + "200": { + "description": "Dev Keys List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/devKeyList" + } } } } - } + }, + "deprecated": false, + "x-appwrite": { + "method": "listDevKeys", + "group": "devKeys", + "cookies": false, + "type": "", + "demo": "projects\/list-dev-keys.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "devKeys.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] } }, "\/projects\/{projectId}\/dev-keys\/{keyId}": { @@ -61220,6 +67556,153 @@ ] } }, + "\/projects\/{projectId}\/stages": { + "get": { + "summary": "List stages", + "operationId": "projectsListStages", + "tags": [ + "projects" + ], + "description": "Get the onboarding stages for the current project, including each stage\u2019s SDK method key and status (for example pending, completed, or skipped).\n", + "responses": { + "200": { + "description": "Stages List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/stageList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listStages", + "group": "stages", + "cookies": false, + "type": "", + "demo": "projects\/list-stages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "stages.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-stages.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/projects\/{projectId}\/stages\/{stageId}": { + "patch": { + "summary": "Update stage", + "operationId": "projectsUpdateStage", + "tags": [ + "projects" + ], + "description": "Update an onboarding stage for the current project. Use this endpoint to skip a stage or leave it unchanged without performing the related API action.\n", + "responses": { + "200": { + "description": "Stage", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/stage" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateStage", + "group": "stages", + "cookies": false, + "type": "", + "demo": "projects\/update-stage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "stages.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-stage.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "stageId", + "description": "SDK method key (namespace.method).", + "required": true, + "schema": { + "type": "string", + "x-example": "<STAGE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "skip": { + "type": "boolean", + "description": "Mark the stage as skipped.", + "default": true, + "x-example": false + } + } + } + } + } + } + } + }, "\/projects\/{projectId}\/status": { "patch": { "summary": "Update the status of a project", @@ -62570,6 +69053,7 @@ "node-23", "node-24", "node-25", + "node-26", "php-8.0", "php-8.1", "php-8.2", @@ -62667,6 +69151,7 @@ "node-23", "node-24", "node-25", + "node-26", "php-8.0", "php-8.1", "php-8.2", @@ -63180,77 +69665,6 @@ ] } }, - "\/sites\/usage": { - "get": { - "summary": "Get sites usage", - "operationId": "sitesListUsage", - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSites", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageSites" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listUsage", - "group": null, - "cookies": false, - "type": "", - "demo": "sites\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, "\/sites\/{siteId}": { "get": { "summary": "Get site", @@ -63478,6 +69892,7 @@ "node-23", "node-24", "node-25", + "node-26", "php-8.0", "php-8.1", "php-8.2", @@ -63575,6 +69990,7 @@ "node-23", "node-24", "node-25", + "node-26", "php-8.0", "php-8.1", "php-8.2", @@ -64558,7 +70974,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": [ + "public", + "sites.read" + ], "platforms": [ "console", "server" @@ -64618,6 +71037,17 @@ "default": "source" }, "in": "query" + }, + { + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" } ] } @@ -64914,87 +71344,6 @@ ] } }, - "\/sites\/{siteId}\/usage": { - "get": { - "summary": "Get site usage", - "operationId": "sitesGetUsage", - "tags": [ - "sites" - ], - "description": "Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", - "responses": { - "200": { - "description": "UsageSite", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageSite" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "cookies": false, - "type": "", - "demo": "sites\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, "\/sites\/{siteId}\/variables": { "get": { "summary": "List variables", @@ -65975,7 +72324,7 @@ }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, folder, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", "required": false, "schema": { "type": "array", @@ -66101,6 +72450,12 @@ "type": "string" }, "x-nullable": true + }, + "folder": { + "type": "string", + "description": "Virtual folder to place the file in, for example \"photos\/2026\". Nest folders with `\/`. Defaults to the bucket root.", + "default": "", + "x-example": null } }, "required": [ @@ -66786,160 +73141,6 @@ ] } }, - "\/storage\/usage": { - "get": { - "summary": "Get storage usage stats", - "operationId": "storageGetUsage", - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", - "responses": { - "200": { - "description": "StorageUsage", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageStorage" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getUsage", - "group": null, - "cookies": false, - "type": "", - "demo": "storage\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/storage\/{bucketId}\/usage": { - "get": { - "summary": "Get bucket usage stats", - "operationId": "storageGetBucketUsage", - "tags": [ - "storage" - ], - "description": "Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", - "responses": { - "200": { - "description": "UsageBuckets", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageBuckets" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getBucketUsage", - "group": null, - "cookies": false, - "type": "", - "demo": "storage\/get-bucket-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", - "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", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, "\/tablesdb": { "get": { "summary": "List databases", @@ -67098,14 +73299,24 @@ "default": true, "x-example": false }, - "dedicatedDatabaseId": { + "specification": { "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", - "default": "", - "x-example": "<DEDICATED_DATABASE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ @@ -67118,6 +73329,55 @@ } } }, + "\/tablesdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "tablesDBListSpecifications", + "tags": [ + "tablesDB" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "tablesdb", + "cookies": false, + "type": "", + "demo": "tablesdb\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, "\/tablesdb\/transactions": { "get": { "summary": "List transactions", @@ -67565,21 +73825,21 @@ } } }, - "\/tablesdb\/usage": { + "\/tablesdb\/{databaseId}": { "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBListUsage", + "summary": "Get database", + "operationId": "tablesDBGet", "tags": [ "tablesDB" ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "UsageDatabases", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDatabases" + "$ref": "#\/components\/schemas\/database" } } } @@ -67587,90 +73847,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "listUsage", - "group": null, + "method": "get", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "tablesdb\/list-usage.md", + "demo": "tablesdb\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-usage.md", - "methods": [ - { - "name": "listUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "range" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabases" - } - ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/list-usage.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "range", - "description": "Date range.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", + }, + "put": { + "summary": "Update database", + "operationId": "tablesDBUpdate", "tags": [ "tablesDB" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Update a database by its unique ID.", "responses": { "200": { "description": "Database", @@ -67685,22 +73907,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "update", "group": "tablesdb", "cookies": false, "type": "", - "demo": "tablesdb\/get.md", + "demo": "tablesdb\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", "auth": { "Project": [] } @@ -67722,22 +73944,118 @@ }, "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.", + "default": true, + "x-example": false + }, + "specification": { + "type": "string", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + } + } + } + } + } + } }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", + "delete": { + "summary": "Delete database", + "operationId": "tablesDBDelete", "tags": [ "tablesDB" ], - "description": "Update a database by its unique ID.", + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", "responses": { - "200": { - "description": "Database", + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "tablesdb", + "cookies": false, + "type": "", + "demo": "tablesdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "tablesDBCreateFailover", + "tags": [ + "tablesDB" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", + "responses": { + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -67745,11 +74063,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "tablesdb", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "tablesdb\/update.md", + "demo": "tablesdb\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -67760,7 +74078,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", "auth": { "Project": [] } @@ -67789,30 +74106,229 @@ "schema": { "type": "object", "properties": { - "name": { + "targetReplicaId": { "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.", - "default": true, - "x-example": false + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true } } } } } } + } + }, + "\/tablesdb\/{databaseId}\/migrations": { + "get": { + "summary": "List migrations", + "operationId": "tablesDBListMigrations", + "tags": [ + "tablesDB" + ], + "description": "List the dedicated migrations for a TablesDB database. A database has at most one in-flight migration.", + "responses": { + "200": { + "description": "Database Migrations List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigrationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMigrations", + "group": "migrations", + "cookies": false, + "type": "", + "demo": "tablesdb\/list-migrations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create migration", + "operationId": "tablesDBCreateMigration", + "tags": [ + "tablesDB" + ], + "description": "Start migrating a serverless TablesDB database onto a dedicated MySQL compute. Data is copied to the target while the source stays live, with a brief read-only window during cutover.", + "responses": { + "201": { + "description": "Database Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMigration", + "group": "migrations", + "cookies": false, + "type": "", + "demo": "tablesdb\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "specification": { + "type": "string", + "description": "Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so `serverless` is not accepted.", + "x-example": "s-1vcpu-1gb" + } + }, + "required": [ + "specification" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/migrations\/{migrationId}": { + "get": { + "summary": "Get migration", + "operationId": "tablesDBGetMigration", + "tags": [ + "tablesDB" + ], + "description": "Get a single dedicated migration for a TablesDB database by its ID.", + "responses": { + "200": { + "description": "Database Migration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseMigration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getMigration", + "group": "migrations", + "cookies": false, + "type": "", + "demo": "tablesdb\/get-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] }, "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", + "summary": "Delete migration", + "operationId": "tablesDBDeleteMigration", "tags": [ "tablesDB" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Abort an in-flight TablesDB dedicated migration. Only allowed before cutover; once the migration has cut over it cannot be aborted.", "responses": { "204": { "description": "No content" @@ -67820,22 +74336,249 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "tablesdb", + "method": "deleteMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "tablesdb\/delete.md", + "demo": "tablesdb\/delete-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "databases.write", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "migrationId", + "description": "Migration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MIGRATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "tablesDBListOperations", + "tags": [ + "tablesDB" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOperations", + "group": "operations", + "cookies": false, + "type": "", + "demo": "tablesdb\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "tablesDBGetReplicas", + "tags": [ + "tablesDB" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getReplicas", + "group": "replicas", + "cookies": false, + "type": "", + "demo": "tablesdb\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/tablesdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "tablesDBGetStatus", + "tags": [ + "tablesDB" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStatus", + "group": "tablesdb", + "cookies": false, + "type": "", + "demo": "tablesdb\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", "auth": { "Project": [] } @@ -73517,92 +80260,6 @@ ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/logs": { - "get": { - "summary": "List table logs", - "operationId": "tablesDBListTableLogs", - "tags": [ - "tablesDB" - ], - "description": "Get the table activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listTableLogs", - "group": "tables", - "cookies": false, - "type": "", - "demo": "tablesdb\/list-table-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "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" - } - ] - } - }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", @@ -73871,7 +80528,6 @@ "rowId": { "type": "string", "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", "x-example": "<ROW_ID>", "x-appwrite": { "idGenerator": "ID.unique" @@ -73880,7 +80536,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "default": [], + "default": {}, "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { @@ -73907,7 +80563,11 @@ "x-example": "<TRANSACTION_ID>", "x-nullable": true } - } + }, + "required": [ + "rowId", + "data" + ] } } } @@ -74714,102 +81374,6 @@ ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { - "get": { - "summary": "List row logs", - "operationId": "tablesDBListRowLogs", - "tags": [ - "tablesDB" - ], - "description": "Get the row activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listRowLogs", - "group": "logs", - "cookies": false, - "type": "", - "demo": "tablesdb\/list-row-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row-logs.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "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" - } - ] - } - }, "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", @@ -74913,269 +81477,46 @@ "properties": { "value": { "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", - "tags": [ - "tablesDB" - ], - "description": "Increment a specific column of a row by a given value.", - "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", - "cookies": false, - "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "client", - "server", - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "JWT": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/usage": { - "get": { - "summary": "Get table usage stats", - "operationId": "tablesDBGetTableUsage", - "tags": [ - "tablesDB" - ], - "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "responses": { - "200": { - "description": "UsageTable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageTable" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getTableUsage", - "group": null, - "cookies": false, - "type": "", - "demo": "tablesdb\/get-table-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read" - ], - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table-usage.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/tablesdb\/{databaseId}\/usage": { - "get": { - "summary": "Get TablesDB usage stats", - "operationId": "tablesDBGetUsage", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", "tags": [ "tablesDB" ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Increment a specific column of a row by a given value.", "responses": { "200": { - "description": "UsageDatabase", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageDatabase" + "$ref": "#\/components\/schemas\/row" } } } @@ -75183,57 +81524,36 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "incrementRowColumn", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/get-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.read", - "collections.read" + "rows.write", + "documents.write" ], "platforms": [ + "client", + "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageDatabase" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "tablesdb\/get-usage.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Session": [], + "JWT": [], + "Key": [] } ], "parameters": [ @@ -75248,28 +81568,66 @@ "in": "path" }, { - "name": "range", - "description": "Date range.", - "required": false, + "name": "tableId", + "description": "Table ID.", + "required": true, "schema": { "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" + "x-example": "<TABLE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } } }, "\/teams": { @@ -75655,6 +82013,412 @@ ] } }, + "\/teams\/{teamId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "teamsListInstallations", + "tags": [ + "teams" + ], + "description": "List app installations on a team. Any team member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", + "tags": [ + "teams" + ], + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "<APP_ID>" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "teamsGetInstallation", + "tags": [ + "teams" + ], + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", + "tags": [ + "teams" + ], + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "<AUTHORIZATION_DETAILS>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", + "tags": [ + "teams" + ], + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ] + } + }, "\/teams\/{teamId}\/logs": { "get": { "summary": "List team logs", @@ -76817,7 +83581,7 @@ "tags": [ "usage" ], - "description": "Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 one point per dimension combination, no time axis. Useful for \"top 10 paths by bandwidth in the last 7 days\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one point per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down by one or more attributes (service, path, status, country, \u2026). Pass multiple metrics to render stacked charts in one round-trip. `resource` and `resourceId` filter the underlying events. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).", + "description": "Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 one point per dimension combination, no time axis. Useful for \"top 10 paths by bandwidth in the last 7 days\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one point per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down by one or more attributes (service, path, status, country, \u2026). `queries[]` filters the underlying events using the standard Utopia query syntax \u2014 `equal(\"path\", [\"\/v1\/storage\/files\"])`, `equal(\"resourceType\", [\"bucket\"])`, `equal(\"resourceId\", [\"abc123\"])`, `startsWith(\"path\", [\"\/v1\/storage\"])`, `equal(\"status\", [\"200\", \"201\"])`, `isNotNull(\"resourceId\")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).", "responses": { "200": { "description": "usageEventList", @@ -76871,24 +83635,15 @@ "in": "query" }, { - "name": "resource", - "description": "Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE>", - "default": "" - }, - "in": "query" - }, - { - "name": "resourceId", - "description": "Resource id filter.", + "name": "queries", + "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal(\"resourceType\", [\"bucket\"])`.", "required": false, "schema": { - "type": "string", - "x-example": "<RESOURCE_ID>", - "default": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, @@ -76904,7 +83659,7 @@ }, { "name": "dimensions", - "description": "Break-down dimensions (max 10). Allowed: path, method, status, service, resource, country, region, hostname, osName, clientType, clientName, deviceName, teamId, resourceId.", + "description": "Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.", "required": false, "schema": { "type": "array", @@ -76995,7 +83750,7 @@ "tags": [ "usage" ], - "description": "Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, \u2026); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for \"top 10 resources by current storage\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one snapshot per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resource`. `service` and `resource` enable per-service \/ per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). Pass multiple metrics to render stacked charts in one round-trip. `resourceId` and `teamId` parameters filter the underlying rows. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).", + "description": "Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, \u2026); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\nA metric with no stored samples in the window returns an empty `points[]`. A metric that really did read zero returns a point whose `value` is `0`, so \"no such series\" and \"a genuine zero\" are different answers.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for \"top 10 resources by current storage\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one snapshot per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service \/ per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases (0 is the primary; 1+ are replicas). `queries[]` filters the underlying rows using the standard Utopia query syntax \u2014 `equal(\"resourceType\", [\"bucket\"])`, `equal(\"resourceId\", [\"abc123\"])`, `equal(\"teamId\", [\"team_x\"])`, `equal(\"ordinal\", [\"0\"])`, `isNotNull(\"teamId\")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).", "responses": { "200": { "description": "usageGaugeList", @@ -77049,24 +83804,15 @@ "in": "query" }, { - "name": "resourceId", - "description": "Resource id filter.", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE_ID>", - "default": "" - }, - "in": "query" - }, - { - "name": "teamId", - "description": "Team id filter.", + "name": "queries", + "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal(\"resourceType\", [\"bucket\"])`.", "required": false, "schema": { - "type": "string", - "x-example": "<TEAM_ID>", - "default": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, @@ -77082,7 +83828,7 @@ }, { "name": "dimensions", - "description": "Break-down dimensions. Allowed: resourceId, teamId, service, resource.", + "description": "Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.", "required": false, "schema": { "type": "array", @@ -77173,14 +83919,382 @@ "tags": [ "users" ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt", + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": "password", + "format": "password" + }, + "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", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "x-example": "password", + "format": "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", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBcryptUser", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Bcrypt.", + "x-example": "password", + "format": "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", + "tags": [ + "users" + ], + "description": "Get identities for all users.", "responses": { "200": { - "description": "Users List", + "description": "Identities List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/userList" + "$ref": "#\/components\/schemas\/identityList" } } } @@ -77188,11 +84302,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "users", + "method": "listIdentities", + "group": "identities", "cookies": false, "type": "", - "demo": "users\/list.md", + "demo": "users\/list-identities.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77203,7 +84317,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "auth": { "Project": [] } @@ -77217,7 +84331,7 @@ "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", "required": false, "schema": { "type": "array", @@ -77251,14 +84365,71 @@ "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIdentity", + "group": "identities", + "cookies": false, + "type": "", + "demo": "users\/delete-identity.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "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", - "operationId": "usersCreate", + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", "tags": [ "users" ], - "description": "Create a new user.", + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { "201": { "description": "User", @@ -77273,11 +84444,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createMD5User", "group": "users", "cookies": false, "type": "", - "demo": "users\/create.md", + "demo": "users\/create-md-5-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77288,7 +84459,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "auth": { "Project": [] } @@ -77317,23 +84488,227 @@ "type": "string", "description": "User email.", "x-example": "email@example.com", - "format": "email", - "x-nullable": true + "format": "email" }, - "phone": { + "password": { "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true + "description": "User password hashed using MD5.", + "x-example": "password", + "format": "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", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPHPassUser", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create-ph-pass-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" }, "password": { "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", + "description": "User password hashed using PHPass.", + "x-example": "password", + "format": "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", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createScryptUser", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create-scrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", "x-example": "password", "format": "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, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "x-example": null, + "format": "int32" + }, "name": { "type": "string", "description": "User name. Max length: 128 chars.", @@ -77342,7 +84717,14 @@ } }, "required": [ - "userId" + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" ] } } @@ -77350,14 +84732,14 @@ } } }, - "\/users\/argon2": { + "\/users\/scrypt-modified": { "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { "201": { "description": "User", @@ -77372,11 +84754,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createArgon2User", + "method": "createScryptModifiedUser", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-argon-2-user.md", + "demo": "users\/create-scrypt-modified-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77387,7 +84769,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "auth": { "Project": [] } @@ -77420,10 +84802,25 @@ }, "password": { "type": "string", - "description": "User password hashed using Argon2.", + "description": "User password hashed using Scrypt Modified.", "x-example": "password", "format": "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.", @@ -77434,7 +84831,10 @@ "required": [ "userId", "email", - "password" + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" ] } } @@ -77442,14 +84842,14 @@ } } }, - "\/users\/bcrypt": { + "\/users\/sha": { "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { "201": { "description": "User", @@ -77464,11 +84864,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createBcryptUser", + "method": "createSHAUser", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-bcrypt-user.md", + "demo": "users\/create-sha-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77479,7 +84879,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "auth": { "Project": [] } @@ -77512,10 +84912,42 @@ }, "password": { "type": "string", - "description": "User password hashed using Bcrypt.", + "description": "User password hashed using SHA.", "x-example": "password", "format": "password" }, + "passwordVersion": { + "type": "string", + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ] + }, "name": { "type": "string", "description": "User name. Max length: 128 chars.", @@ -77534,21 +84966,21 @@ } } }, - "\/users\/identities": { + "\/users\/usage": { "get": { - "summary": "List identities", - "operationId": "usersListIdentities", + "summary": "Get users usage stats", + "operationId": "usersGetUsage", "tags": [ "users" ], - "description": "Get identities for all users.", + "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", "responses": { "200": { - "description": "Identities List", + "description": "UsageUsers", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/identityList" + "$ref": "#\/components\/schemas\/usageUsers" } } } @@ -77556,79 +84988,124 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIdentities", - "group": "identities", + "method": "getUsage", + "group": null, "cookies": false, "type": "", - "demo": "users\/list-identities.md", + "demo": "users\/get-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", + "name": "range", + "description": "Date range.", "required": false, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": "UsageRange", + "x-enum-keys": [ + "24h", + "30d", + "90d" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<USER_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/users\/identities\/{identityId}": { + }, "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", + "summary": "Delete user", + "operationId": "usersDelete", "tags": [ "users" ], - "description": "Delete an identity by its unique ID.", + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", "responses": { "204": { "description": "No content" @@ -77636,11 +85113,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", + "method": "delete", + "group": "users", "cookies": false, "type": "", - "demo": "users\/delete-identity.md", + "demo": "users\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77651,7 +85128,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "auth": { "Project": [] } @@ -77664,28 +85141,28 @@ ], "parameters": [ { - "name": "identityId", - "description": "Identity ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<IDENTITY_ID>" + "x-example": "<USER_ID>" }, "in": "path" } ] } }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Update the user email by its unique ID.", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -77698,11 +85175,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMD5User", + "method": "updateEmail", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-md-5-user.md", + "demo": "users\/update-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77713,7 +85190,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "auth": { "Project": [] } @@ -77724,43 +85201,33 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, "email": { "type": "string", "description": "User email.", "x-example": "email@example.com", "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" } }, "required": [ - "userId", - "email", - "password" + "email" ] } } @@ -77768,16 +85235,16 @@ } } }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", + "\/users\/{userId}\/impersonator": { + "patch": { + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -77790,11 +85257,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPHPassUser", + "method": "updateImpersonator", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-ph-pass-user.md", + "demo": "users\/update-impersonator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77805,7 +85272,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", "auth": { "Project": [] } @@ -77816,43 +85283,32 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "x-example": false } }, "required": [ - "userId", - "email", - "password" + "impersonator" ] } } @@ -77860,21 +85316,21 @@ } } }, - "\/users\/scrypt": { + "\/users\/{userId}\/jwts": { "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", + "summary": "Create user JWT", + "operationId": "usersCreateJWT", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", "responses": { "201": { - "description": "User", + "description": "JWT", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/jwt" } } } @@ -77882,11 +85338,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createScryptUser", - "group": "users", + "method": "createJWT", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-scrypt-user.md", + "demo": "users\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -77897,7 +85353,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "auth": { "Project": [] } @@ -77908,94 +85364,54 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "x-example": "password", - "format": "password" - }, - "passwordSalt": { + "sessionId": { "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, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "x-example": null, - "format": "int32" + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" }, - "passwordLength": { + "duration": { "type": "integer", - "description": "Optional hash length used to hash password.", - "x-example": null, + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, "format": "int32" - }, - "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", + "\/users\/{userId}\/labels": { + "put": { + "summary": "Update user labels", + "operationId": "usersUpdateLabels", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -78008,11 +85424,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createScryptModifiedUser", + "method": "updateLabels", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-scrypt-modified-user.md", + "demo": "users\/update-labels.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78023,7 +85439,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "auth": { "Project": [] } @@ -78034,78 +85450,235 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "x-example": "password", - "format": "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.", - "default": "", - "x-example": "<NAME>" } }, "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "cookies": false, + "type": "", + "demo": "users\/list-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] } }, - "\/users\/sha": { - "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Enable or disable MFA on a user account.", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -78116,13 +85689,13 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createSHAUser", + "method": "updateMfa", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-sha-user.md", + "demo": "users\/update-mfa.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78132,8 +85705,68 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], "auth": { "Project": [] } @@ -78144,75 +85777,32 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "x-example": "password", - "format": "password" - }, - "passwordVersion": { - "type": "string", - "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", - "x-example": "sha1", - "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ], - "x-enum-name": "PasswordHash", - "x-enum-keys": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" - ] - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false } }, "required": [ - "userId", - "email", - "password" + "mfa" ] } } @@ -78220,105 +85810,163 @@ } } }, - "\/users\/usage": { - "get": { - "summary": "Get users usage stats", - "operationId": "usersGetUsage", + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", "tags": [ "users" ], - "description": "Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.\n", + "description": "Delete an authenticator app.", "responses": { - "200": { - "description": "UsageUsers", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageUsers" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "deleteMfaAuthenticator", + "group": "mfa", "cookies": false, "type": "", - "demo": "users\/get-usage.md", + "demo": "users\/delete-mfa-authenticator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "users.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "range", - "description": "Date range.", - "required": false, + "name": "userId", + "description": "User ID.", + "required": true, "schema": { "type": "string", - "x-example": "24h", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Type of authenticator.", + "required": true, + "schema": { + "type": "string", + "x-example": "totp", "enum": [ - "24h", - "30d", - "90d" + "totp" ], - "x-enum-name": "UsageRange", + "x-enum-name": "AuthenticatorType", "x-enum-keys": [ - "24h", - "30d", - "90d" - ], - "default": "30d" + "totp" + ] }, - "in": "query" + "in": "path" } ] } }, - "\/users\/{userId}": { + "\/users\/{userId}\/mfa\/factors": { "get": { - "summary": "Get user", - "operationId": "usersGet", + "summary": "List factors", + "operationId": "usersListMfaFactors", "tags": [ "users" ], - "description": "Get a user by its unique ID.", + "description": "List the factors available on the account to be used as a MFA challange.", "responses": { "200": { - "description": "User", + "description": "MFAFactors", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/mfaFactors" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "get", - "group": "users", + "method": "listMfaFactors", + "group": "mfa", "cookies": false, "type": "", - "demo": "users\/get.md", + "demo": "users\/list-mfa-factors.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78328,61 +85976,64 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "auth": { "Project": [] } @@ -78407,44 +86058,100 @@ ] } }, - "\/users\/{userId}\/email": { - "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", "tags": [ "users" ], - "description": "Update the user email by its unique ID.", + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", "responses": { "200": { - "description": "User", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateEmail", - "group": "users", + "method": "getMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "users\/update-email.md", + "demo": "users\/get-mfa-recovery-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "users.read", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [] } @@ -78466,56 +86173,34 @@ }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - } - }, - "required": [ - "email" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", + ] + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", "tags": [ "users" ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", "responses": { "200": { - "description": "User", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateImpersonator", - "group": "users", + "method": "updateMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "users\/update-impersonator.md", + "demo": "users\/update-mfa-recovery-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78525,8 +86210,64 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + }, + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } + }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], "auth": { "Project": [] } @@ -78548,55 +86289,34 @@ }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/jwts": { - "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", + ] + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", "tags": [ "users" ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", "responses": { "201": { - "description": "JWT", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/jwt" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "createJWT", - "group": "sessions", + "method": "createMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "users\/create-jwt.md", + "demo": "users\/create-mfa-recovery-codes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78606,8 +86326,64 @@ "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [] } @@ -78629,41 +86405,17 @@ }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" - }, - "duration": { - "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", - "default": 900, - "x-example": 0, - "format": "int32" - } - } - } - } - } - } + ] } }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user name by its unique ID.", "responses": { "200": { "description": "User", @@ -78678,11 +86430,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLabels", + "method": "updateName", "group": "users", "cookies": false, "type": "", - "demo": "users\/update-labels.md", + "demo": "users\/update-name.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78693,7 +86445,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "auth": { "Project": [] } @@ -78722,17 +86474,14 @@ "schema": { "type": "object", "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "x-example": "<NAME>" } }, "required": [ - "labels" + "name" ] } } @@ -78740,21 +86489,21 @@ } } }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", + "\/users\/{userId}\/password": { + "patch": { + "summary": "Update password", + "operationId": "usersUpdatePassword", "tags": [ "users" ], - "description": "Get the user activity logs list by its unique ID.", + "description": "Update the user password by its unique ID.", "responses": { "200": { - "description": "Logs List", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/user" } } } @@ -78762,22 +86511,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "logs", + "method": "updatePassword", + "group": "users", "cookies": false, "type": "", - "demo": "users\/list-logs.md", + "demo": "users\/update-password.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "auth": { "Project": [] } @@ -78798,139 +86547,38 @@ "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "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" - } + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "x-example": "password", + "format": "password" + } + }, + "required": [ + "password" + ] } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "listMemberships", - "group": "memberships", - "cookies": false, - "type": "", - "demo": "users\/list-memberships.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", - "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", - "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] + } } }, - "\/users\/{userId}\/mfa": { + "\/users\/{userId}\/phone": { "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", + "summary": "Update phone", + "operationId": "usersUpdatePhone", "tags": [ "users" ], - "description": "Enable or disable MFA on a user account.", + "description": "Update the user phone by its unique ID.", "responses": { "200": { "description": "User", @@ -78943,13 +86591,13 @@ } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfa", + "method": "updatePhone", "group": "users", "cookies": false, "type": "", - "demo": "users\/update-mfa.md", + "demo": "users\/update-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -78959,68 +86607,8 @@ "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "auth": { "Project": [] } @@ -79049,14 +86637,15 @@ "schema": { "type": "object", "properties": { - "mfa": { - "type": "boolean", - "description": "Enable or disable MFA.", - "x-example": false + "number": { + "type": "string", + "description": "User phone number.", + "x-example": "+12065550100", + "format": "phone" } }, "required": [ - "mfa" + "number" ] } } @@ -79064,95 +86653,44 @@ } } }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", "tags": [ "users" ], - "description": "Delete an authenticator app.", + "description": "Get the user preferences by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Preferences", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/preferences" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", + "method": "getPrefs", + "group": "users", "cookies": false, "type": "", - "demo": "users\/delete-mfa-authenticator.md", + "demo": "users\/get-prefs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "users.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, - "methods": [ - { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "auth": { "Project": [] } @@ -79173,121 +86711,46 @@ "x-example": "<USER_ID>" }, "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [ - "totp" - ] - }, - "in": "path" } ] - } - }, - "\/users\/{userId}\/mfa\/factors": { - "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", + }, + "patch": { + "summary": "Update user preferences", + "operationId": "usersUpdatePrefs", "tags": [ "users" ], - "description": "List the factors available on the account to be used as a MFA challange.", + "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": "MFAFactors", + "description": "Preferences", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" + "$ref": "#\/components\/schemas\/preferences" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", + "method": "updatePrefs", + "group": "users", "cookies": false, "type": "", - "demo": "users\/list-mfa-factors.md", + "demo": "users\/update-prefs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" - } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "auth": { "Project": [] } @@ -79309,103 +86772,70 @@ }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } } }, - "\/users\/{userId}\/mfa\/recovery-codes": { + "\/users\/{userId}\/sessions": { "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", + "summary": "List user sessions", + "operationId": "usersListSessions", "tags": [ "users" ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "description": "Get the user sessions list by its unique ID.", "responses": { "200": { - "description": "MFA Recovery Codes", + "description": "Sessions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/sessionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", + "method": "listSessions", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/get-mfa-recovery-codes.md", + "demo": "users\/list-sessions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": [ + "users.read", + "sessions.read" + ], "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "auth": { "Project": [] } @@ -79426,102 +86856,60 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", "tags": [ "users" ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { - "200": { - "description": "MFA Recovery Codes", + "201": { + "description": "Session", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/session" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", + "method": "createSession", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/update-mfa-recovery-codes.md", + "demo": "users\/create-session.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": [ + "users.write", + "sessions.write" + ], "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "auth": { "Project": [] } @@ -79535,109 +86923,110 @@ "parameters": [ { "name": "userId", - "description": "User ID.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "required": true, "schema": { "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, "x-example": "<USER_ID>" }, "in": "path" } ] }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", "tags": [ "users" ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "description": "Delete all user's sessions by using the user's unique ID.", "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", + "method": "deleteSessions", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-mfa-recovery-codes.md", + "demo": "users\/delete-sessions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": [ + "users.write", + "sessions.write" + ], "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSession", + "group": "sessions", + "cookies": false, + "type": "", + "demo": "users\/delete-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "users.write", + "sessions.write" + ], + "platforms": [ + "console", + "server" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "auth": { "Project": [] } @@ -79658,18 +87047,28 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SESSION_ID>" + }, + "in": "path" } ] } }, - "\/users\/{userId}\/name": { + "\/users\/{userId}\/status": { "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", + "summary": "Update user status", + "operationId": "usersUpdateStatus", "tags": [ "users" ], - "description": "Update the user name by its unique ID.", + "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", @@ -79684,11 +87083,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateName", + "method": "updateStatus", "group": "users", "cookies": false, "type": "", - "demo": "users\/update-name.md", + "demo": "users\/update-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -79699,7 +87098,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "auth": { "Project": [] } @@ -79728,14 +87127,14 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "x-example": false } }, "required": [ - "name" + "status" ] } } @@ -79743,21 +87142,21 @@ } } }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", "tags": [ "users" ], - "description": "Update the user password by its unique ID.", + "description": "List the messaging targets that are associated with a user.", "responses": { "200": { - "description": "User", + "description": "Target list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/targetList" } } } @@ -79765,22 +87164,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePassword", - "group": "users", + "method": "listTargets", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/update-password.md", + "demo": "users\/list-targets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "users.read", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "auth": { "Project": [] } @@ -79801,45 +87200,47 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "password" - ] - } - } - } - } - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", + ] + }, + "post": { + "summary": "Create user target", + "operationId": "usersCreateTarget", "tags": [ "users" ], - "description": "Update the user phone by its unique ID.", + "description": "Create a messaging target.", "responses": { - "200": { - "description": "User", + "201": { + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/target" } } } @@ -79847,22 +87248,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePhone", - "group": "users", + "method": "createTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/update-phone.md", + "demo": "users\/create-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "auth": { "Project": [] } @@ -79891,15 +87292,52 @@ "schema": { "type": "object", "properties": { - "number": { + "targetId": { "type": "string", - "description": "User phone number.", - "x-example": "+12065550100", - "format": "phone" + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TARGET_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email", + "enum": [ + "email", + "sms", + "push" + ], + "x-enum-name": "MessagingProviderType", + "x-enum-keys": [ + "email", + "sms", + "push" + ] + }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" } }, "required": [ - "number" + "targetId", + "providerType", + "identifier" ] } } @@ -79907,21 +87345,21 @@ } } }, - "\/users\/{userId}\/prefs": { + "\/users\/{userId}\/targets\/{targetId}": { "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", + "summary": "Get user target", + "operationId": "usersGetTarget", "tags": [ "users" ], - "description": "Get the user preferences by its unique ID.", + "description": "Get a user's push notification target by ID.", "responses": { "200": { - "description": "Preferences", + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/target" } } } @@ -79929,22 +87367,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPrefs", - "group": "users", + "method": "getTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/get-prefs.md", + "demo": "users\/get-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.read", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "auth": { "Project": [] } @@ -79965,23 +87403,33 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" } ] }, "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", + "summary": "Update user target", + "operationId": "usersUpdateTarget", "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.", + "description": "Update a messaging target.", "responses": { "200": { - "description": "Preferences", + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/target" } } } @@ -79989,22 +87437,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePrefs", - "group": "users", + "method": "updateTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/update-prefs.md", + "demo": "users\/update-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "auth": { "Project": [] } @@ -80025,6 +87473,16 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" } ], "requestBody": { @@ -80033,63 +87491,60 @@ "schema": { "type": "object", "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" } - }, - "required": [ - "prefs" - ] + } } } } } - } - }, - "\/users\/{userId}\/sessions": { - "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", "tags": [ "users" ], - "description": "Get the user sessions list by its unique ID.", + "description": "Delete a messaging target.", "responses": { - "200": { - "description": "Sessions List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/sessionList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listSessions", - "group": "sessions", + "method": "deleteTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/list-sessions.md", + "demo": "users\/delete-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], + "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "auth": { "Project": [] } @@ -80112,32 +87567,33 @@ "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "targetId", + "description": "Target ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<TARGET_ID>" }, - "in": "query" + "in": "path" } ] - }, + } + }, + "\/users\/{userId}\/tokens": { "post": { - "summary": "Create session", - "operationId": "usersCreateSession", + "summary": "Create token", + "operationId": "usersCreateToken", "tags": [ "users" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { - "description": "Session", + "description": "Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/token" } } } @@ -80145,25 +87601,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSession", + "method": "createToken", "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-session.md", + "demo": "users\/create-token.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "auth": { "Project": [] } @@ -80177,52 +87630,80 @@ "parameters": [ { "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, "x-example": "<USER_ID>" }, "in": "path" } - ] - }, - "delete": { - "summary": "Delete user sessions", - "operationId": "usersDeleteSessions", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4, + "format": "int32" + }, + "expire": { + "type": "integer", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", + "default": 900, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", "tags": [ "users" ], - "description": "Delete all user's sessions by using the user's unique ID.", + "description": "Update the user email verification status by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", + "method": "updateEmailVerification", + "group": "users", "cookies": false, "type": "", - "demo": "users\/delete-sessions.md", + "demo": "users\/update-email-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "auth": { "Project": [] } @@ -80244,43 +87725,66 @@ }, "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}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", "tags": [ "users" ], - "description": "Delete a user sessions by its unique ID.", + "description": "Update the user phone verification status by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSession", - "group": "sessions", + "method": "updatePhoneVerification", + "group": "users", "cookies": false, "type": "", - "demo": "users\/delete-session.md", + "demo": "users\/update-phone-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "auth": { "Project": [] } @@ -80301,35 +87805,58 @@ "x-example": "<USER_ID>" }, "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SESSION_ID>" - }, - "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } } }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", + "\/vcs\/github\/installations\/{installationId}\/detections": { + "post": { + "summary": "Create repository detection", + "operationId": "vcsCreateRepositoryDetection", "tags": [ - "users" + "vcs" ], - "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.", + "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { - "description": "User", + "description": "DetectionRuntime, or DetectionFramework", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/detectionRuntime" + }, + { + "$ref": "#\/components\/schemas\/detectionFramework" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/detectionRuntime", + "framework": "#\/components\/schemas\/detectionFramework" + } + } } } } @@ -80337,40 +87864,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateStatus", - "group": "users", + "method": "createRepositoryDetection", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/update-status.md", + "demo": "vcs\/create-repository-detection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } @@ -80381,14 +87906,35 @@ "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 + "providerRepositoryId": { + "type": "string", + "description": "Repository Id", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "type": { + "type": "string", + "description": "Detector type. Must be one of the following: runtime, framework", + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [ + "runtime", + "framework" + ] + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to Root Directory", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" } }, "required": [ - "status" + "providerRepositoryId", + "type" ] } } @@ -80396,21 +87942,35 @@ } } }, - "\/users\/{userId}\/targets": { + "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { "get": { - "summary": "List user targets", - "operationId": "usersListTargets", + "summary": "List repositories", + "operationId": "vcsListRepositories", "tags": [ - "users" + "vcs" ], - "description": "List the messaging targets that are associated with a user.", + "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", "responses": { "200": { - "description": "Target list", + "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/targetList" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/providerRepositoryRuntimeList" + }, + { + "$ref": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "runtime": "#\/components\/schemas\/providerRepositoryRuntimeList", + "framework": "#\/components\/schemas\/providerRepositoryFrameworkList" + } + } } } } @@ -80418,83 +87978,100 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTargets", - "group": "targets", + "method": "listRepositories", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/list-targets.md", + "demo": "vcs\/list-repositories.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "vcs.read", "platforms": [ - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "name": "type", + "description": "Detector type. Must be one of the following: runtime, framework", + "required": true, + "schema": { + "type": "string", + "x-example": "runtime", + "enum": [ + "runtime", + "framework" + ], + "x-enum-name": "VCSDetectionType", + "x-enum-keys": [ + "runtime", + "framework" + ] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<SEARCH>", + "default": "" }, "in": "query" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "name": "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, offset, and equal on namespace.", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" } ] }, "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", + "summary": "Create repository", + "operationId": "vcsCreateRepository", "tags": [ - "users" + "vcs" ], - "description": "Create a messaging target.", + "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", "responses": { - "201": { - "description": "Target", + "200": { + "description": "ProviderRepository", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/providerRepository" } } } @@ -80502,40 +88079,38 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTarget", - "group": "targets", + "method": "createRepository", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/create-target.md", + "demo": "vcs\/create-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.write", "platforms": [ - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } @@ -80546,52 +88121,26 @@ "schema": { "type": "object", "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [ - "email", - "sms", - "push" - ] - }, - "identifier": { + "name": { "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" + "description": "Repository name (slug)", + "x-example": "<NAME>" }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" + "private": { + "type": "boolean", + "description": "Mark repository public or private", + "x-example": false }, - "name": { + "providerNamespace": { "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "description": "Namespace of the git repository. Defaults to the installation's own namespace.", "default": "", - "x-example": "<NAME>" + "x-example": "<PROVIDER_NAMESPACE>" } }, "required": [ - "targetId", - "providerType", - "identifier" + "name", + "private" ] } } @@ -80599,21 +88148,21 @@ } } }, - "\/users\/{userId}\/targets\/{targetId}": { + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", + "summary": "Get repository", + "operationId": "vcsGetRepository", "tags": [ - "users" + "vcs" ], - "description": "Get a user's push notification target by ID.", + "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", "responses": { "200": { - "description": "Target", + "description": "ProviderRepository", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/providerRepository" } } } @@ -80621,69 +88170,69 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTarget", - "group": "targets", + "method": "getRepository", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/get-target.md", + "demo": "vcs\/get-repository.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "vcs.read", "platforms": [ - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "providerRepositoryId", + "description": "Repository Id", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "x-example": "<PROVIDER_REPOSITORY_ID>" }, "in": "path" } ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "get": { + "summary": "List repository branches", + "operationId": "vcsListRepositoryBranches", "tags": [ - "users" + "vcs" ], - "description": "Update a messaging target.", + "description": "Get a list of branches from a GitHub repository in your installation. This endpoint supports filtering by a search term and pagination using query strings such as `Query.limit()`, `Query.offset()`, `Query.cursorAfter()`, and `Query.cursorBefore()`. It returns branch names along with the total number of matches. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", "responses": { "200": { - "description": "Target", + "description": "Branches List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/branchList" } } } @@ -80691,204 +88240,230 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTarget", - "group": "targets", + "method": "listRepositoryBranches", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/update-target.md", + "demo": "vcs\/list-repository-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.read", "platforms": [ - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "providerRepositoryId", + "description": "Repository Id", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "x-example": "<PROVIDER_REPOSITORY_ID>" }, "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "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, offset, cursorAfter, and cursorBefore", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } + ] + } + }, + "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { + "get": { + "summary": "Get files and directories of a VCS repository", + "operationId": "vcsGetRepositoryContents", + "tags": [ + "vcs" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" - }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" - }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" - } + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "responses": { + "200": { + "description": "VCS Content List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/vcsContentList" } } } } - } - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", - "tags": [ - "users" - ], - "description": "Delete a messaging target.", - "responses": { - "204": { - "description": "No content" - } }, "deprecated": false, "x-appwrite": { - "method": "deleteTarget", - "group": "targets", + "method": "getRepositoryContents", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/delete-target.md", + "demo": "vcs\/get-repository-contents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.read", "platforms": [ - "server", "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "providerRepositoryId", + "description": "Repository Id", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "x-example": "<PROVIDER_REPOSITORY_ID>" }, "in": "path" + }, + { + "name": "providerRootDirectory", + "description": "Path to get contents of nested directory", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ROOT_DIRECTORY>", + "default": "" + }, + "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROVIDER_REFERENCE>", + "default": "" + }, + "in": "query" } ] } }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", + "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { + "patch": { + "summary": "Update external deployment (authorize)", + "operationId": "vcsUpdateExternalDeployments", "tags": [ - "users" + "vcs" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", "responses": { - "201": { - "description": "Token", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/token" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createToken", - "group": "sessions", + "method": "updateExternalDeployments", + "group": "repositories", "cookies": false, "type": "", - "demo": "users\/create-token.md", + "demo": "vcs\/update-external-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.write", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + }, + { + "name": "repositoryId", + "description": "VCS Repository Id", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPOSITORY_ID>" }, "in": "path" } @@ -80899,42 +88474,36 @@ "schema": { "type": "object", "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4, - "format": "int32" - }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60, - "format": "int32" + "providerPullRequestId": { + "type": "string", + "description": "GitHub Pull Request Id", + "x-example": "<PROVIDER_PULL_REQUEST_ID>" } - } + }, + "required": [ + "providerPullRequestId" + ] } } } } } }, - "\/users\/{userId}\/verification": { - "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", + "\/vcs\/installations": { + "get": { + "summary": "List installations", + "operationId": "vcsListInstallations", "tags": [ - "users" + "vcs" ], - "description": "Update the user email verification status by its unique ID.", + "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", "responses": { "200": { - "description": "User", + "description": "Installations List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/installationList" } } } @@ -80942,80 +88511,84 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "users\/update-email-verification.md", + "demo": "vcs\/list-installations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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": "<USER_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "x-example": false - } - }, - "required": [ - "emailVerification" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", + "\/vcs\/installations\/{installationId}": { + "get": { + "summary": "Get installation", + "operationId": "vcsGetInstallation", "tags": [ - "users" + "vcs" ], - "description": "Update the user phone verification status by its unique ID.", + "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", "responses": { "200": { - "description": "User", + "description": "Installation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/installation" } } } @@ -81023,106 +88596,62 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "users\/update-phone-verification.md", + "demo": "vcs\/get-installation.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "vcs.read", "platforms": [ - "console", - "server" + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", "auth": { "Project": [] } }, "security": [ { - "Project": [], - "Key": [] + "Project": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "installationId", + "description": "Installation Id", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<INSTALLATION_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}\/detections": { - "post": { - "summary": "Create repository detection", - "operationId": "vcsCreateRepositoryDetection", + ] + }, + "delete": { + "summary": "Delete installation", + "operationId": "vcsDeleteInstallation", "tags": [ "vcs" ], - "description": "Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", "responses": { - "200": { - "description": "DetectionRuntime, or DetectionFramework", - "content": { - "application\/json": { - "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/detectionRuntime" - }, - { - "$ref": "#\/components\/schemas\/detectionFramework" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/components\/schemas\/detectionRuntime", - "framework": "#\/components\/schemas\/detectionFramework" - } - } - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createRepositoryDetection", - "group": "repositories", + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "vcs\/create-repository-detection.md", + "demo": "vcs\/delete-installation.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81132,7 +88661,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", "auth": { "Project": [] } @@ -81153,78 +88682,24 @@ }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerRepositoryId": { - "type": "string", - "description": "Repository Id", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "type": { - "type": "string", - "description": "Detector type. Must be one of the following: runtime, framework", - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [ - "runtime", - "framework" - ] - }, - "providerRootDirectory": { - "type": "string", - "description": "Path to Root Directory", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - } - }, - "required": [ - "providerRepositoryId", - "type" - ] - } - } - } - } + ] } }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories": { + "\/vcs\/installations\/{installationId}\/namespaces": { "get": { - "summary": "List repositories", - "operationId": "vcsListRepositories", + "summary": "List namespaces", + "operationId": "vcsListNamespaces", "tags": [ "vcs" ], - "description": "Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.", + "description": "List provider namespaces available to a VCS installation. This can include the user personal namespace and any groups or organizations the installation can browse.", "responses": { "200": { - "description": "Runtime Provider Repositories List, or Framework Provider Repositories List", + "description": "VCS Namespaces List", "content": { "application\/json": { "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/providerRepositoryRuntimeList" - }, - { - "$ref": "#\/components\/schemas\/providerRepositoryFrameworkList" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "runtime": "#\/components\/schemas\/providerRepositoryRuntimeList", - "framework": "#\/components\/schemas\/providerRepositoryFrameworkList" - } - } + "$ref": "#\/components\/schemas\/vcsNamespaceList" } } } @@ -81232,11 +88707,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRepositories", - "group": "repositories", + "method": "listNamespaces", + "group": "namespaces", "cookies": false, "type": "", - "demo": "vcs\/list-repositories.md", + "demo": "vcs\/list-namespaces.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81246,7 +88721,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "auth": { "Project": [] } @@ -81267,25 +88741,6 @@ }, "in": "path" }, - { - "name": "type", - "description": "Detector type. Must be one of the following: runtime, framework", - "required": true, - "schema": { - "type": "string", - "x-example": "runtime", - "enum": [ - "runtime", - "framework" - ], - "x-enum-name": "VCSDetectionType", - "x-enum-keys": [ - "runtime", - "framework" - ] - }, - "in": "query" - }, { "name": "search", "description": "Search term to filter your list results. Max length: 256 chars.", @@ -81310,22 +88765,201 @@ }, "in": "query" } - ] - }, + ] + } + }, + "\/vectorsdb": { + "get": { + "summary": "List databases", + "operationId": "vectorsDBList", + "tags": [ + "vectorsDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "vectorsdb", + "cookies": false, + "type": "", + "demo": "vectorsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "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 columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", + "tags": [ + "vectorsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "vectorsdb", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "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.", + "default": true, + "x-example": false + }, + "specification": { + "type": "string", + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/vectorsdb\/embeddings\/text": { "post": { - "summary": "Create repository", - "operationId": "vcsCreateRepository", + "summary": "Create text embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.", + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", "responses": { "200": { - "description": "ProviderRepository", + "description": "Embedding list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/providerRepository" + "$ref": "#\/components\/schemas\/embeddingList" } } } @@ -81333,40 +88967,57 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRepository", - "group": "repositories", + "method": "createTextEmbeddings", + "group": "embeddings", "cookies": false, "type": "", - "demo": "vcs\/create-repository.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-text-embeddings.md", + "methods": [ + { + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", + "auth": { + "Project": [] + }, + "parameters": [ + "texts", + "model" + ], + "required": [ + "texts" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/embeddingList" + } + ], + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", + "demo": "vectorsdb\/create-text-embeddings.md", + "public": true + } + ], "auth": { "Project": [] } }, "security": [ { - "Project": [] - } - ], - "parameters": [ - { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" + "Project": [], + "Key": [], + "JWT": [] } ], "requestBody": { @@ -81375,20 +89026,36 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Repository name (slug)", - "x-example": "<NAME>" + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "x-example": null, + "items": { + "type": "string" + } }, - "private": { - "type": "boolean", - "description": "Mark repository public or private", - "x-example": false + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", + "enum": [ + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" + ], + "x-enum-name": "EmbeddingModel", + "x-enum-keys": [ + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" + ] } }, "required": [ - "name", - "private" + "texts" ] } } @@ -81396,21 +89063,21 @@ } } }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}": { + "\/vectorsdb\/specifications": { "get": { - "summary": "Get repository", - "operationId": "vcsGetRepository", + "summary": "List specifications", + "operationId": "vectorsDBListSpecifications", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "ProviderRepository", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/providerRepository" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -81418,69 +89085,48 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRepository", - "group": "repositories", + "method": "listSpecifications", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "vcs\/get-repository.md", + "demo": "vectorsdb\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", + "scope": "databases.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "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" + "Project": [], + "Key": [] } ] } }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/branches": { + "\/vectorsdb\/transactions": { "get": { - "summary": "List repository branches", - "operationId": "vcsListRepositoryBranches", + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Get a list of branches from a GitHub repository in your installation. This endpoint supports filtering by a search term and pagination using query strings such as `Query.limit()`, `Query.offset()`, `Query.cursorAfter()`, and `Query.cursorBefore()`. It returns branch names along with the total number of matches. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.\n", + "description": "List transactions across all databases.", "responses": { "200": { - "description": "Branches List", + "description": "Transaction List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/branchList" + "$ref": "#\/components\/schemas\/transactionList" } } } @@ -81488,65 +89134,39 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRepositoryBranches", - "group": "repositories", + "method": "listTransactions", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/list-repository-branches.md", + "demo": "vectorsdb\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", + "scope": "documents.read", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "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" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, { "name": "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, offset, cursorAfter, and cursorBefore", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", "required": false, "schema": { "type": "array", @@ -81558,23 +89178,21 @@ "in": "query" } ] - } - }, - "\/vcs\/github\/installations\/{installationId}\/providerRepositories\/{providerRepositoryId}\/contents": { - "get": { - "summary": "Get files and directories of a VCS repository", - "operationId": "vcsGetRepositoryContents", + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", + "description": "Create a new transaction.", "responses": { - "200": { - "description": "VCS Content List", + "201": { + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vcsContentList" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -81582,176 +89200,133 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRepositoryContents", - "group": "repositories", + "method": "createTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/get-repository-contents.md", + "demo": "vectorsdb\/create-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], - "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" - }, - { - "name": "providerRootDirectory", - "description": "Path to get contents of nested directory", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ROOT_DIRECTORY>", - "default": "" - }, - "in": "query" - }, - { - "name": "providerReference", - "description": "Git reference (branch, tag, commit) to get contents from", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROVIDER_REFERENCE>", - "default": "" - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } } - ] + } } }, - "\/vcs\/github\/installations\/{installationId}\/repositories\/{repositoryId}": { - "patch": { - "summary": "Update external deployment (authorize)", - "operationId": "vcsUpdateExternalDeployments", + "\/vectorsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.", + "description": "Get a transaction by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "updateExternalDeployments", - "group": "repositories", + "method": "getTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/update-external-deployments.md", + "demo": "vectorsdb\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", + "scope": "documents.read", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "installationId", - "description": "Installation Id", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSTALLATION_ID>" - }, - "in": "path" - }, - { - "name": "repositoryId", - "description": "VCS Repository Id", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<REPOSITORY_ID>" + "x-example": "<TRANSACTION_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", + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", "tags": [ - "vcs" + "vectorsDB" ], - "description": "List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.\n", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "Installations List", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/installationList" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -81759,195 +89334,228 @@ }, "deprecated": false, "x-appwrite": { - "method": "listInstallations", - "group": "installations", + "method": "updateTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/list-installations.md", + "demo": "vectorsdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: 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, + "name": "transactionId", + "description": "Transaction ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<TRANSACTION_ID>" }, - "in": "query" + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } } - ] - } - }, - "\/vcs\/installations\/{installationId}": { - "get": { - "summary": "Get installation", - "operationId": "vcsGetInstallation", + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. ", + "description": "Delete a transaction by its unique ID.", "responses": { - "200": { - "description": "Installation", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/installation" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getInstallation", - "group": "installations", + "method": "deleteTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/get-installation.md", + "demo": "vectorsdb\/delete-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.read", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "installationId", - "description": "Installation Id", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<INSTALLATION_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete installation", - "operationId": "vcsDeleteInstallation", + } + }, + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", "tags": [ - "vcs" + "vectorsDB" ], - "description": "Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.", + "description": "Create multiple operations in a single transaction.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteInstallation", - "group": "installations", + "method": "createOperations", + "group": "transactions", "cookies": false, "type": "", - "demo": "vcs\/delete-installation.md", + "demo": "vectorsdb\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "vcs.write", + "scope": "documents.write", "platforms": [ - "console" + "console", + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "installationId", - "description": "Installation Id", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<INSTALLATION_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } } }, - "\/vectorsdb": { + "\/vectorsdb\/{databaseId}": { "get": { - "summary": "List databases", - "operationId": "vectorsDBList", + "summary": "Get database", + "operationId": "vectorsDBGet", "tags": [ "vectorsDB" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "Databases List", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/database" } } } @@ -81955,11 +89563,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "get", "group": "vectorsdb", "cookies": false, "type": "", - "demo": "vectorsdb\/list.md", + "demo": "vectorsdb\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81970,7 +89578,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", "auth": { "Project": [] } @@ -81983,40 +89591,26 @@ ], "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 columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", "tags": [ "vectorsDB" ], - "description": "Create a new Database.\n", + "description": "Update a database by its unique ID.", "responses": { - "201": { + "200": { "description": "Database", "content": { "application\/json": { @@ -82029,11 +89623,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "update", "group": "vectorsdb", "cookies": false, "type": "", - "demo": "vectorsdb\/create.md", + "demo": "vectorsdb\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -82044,7 +89638,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", "auth": { "Project": [] } @@ -82055,20 +89649,24 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "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-appwrite": { - "idGenerator": "ID.unique" - } - }, "name": { "type": "string", "description": "Database name. Max length: 128 chars.", @@ -82076,94 +89674,68 @@ }, "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.", + "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 }, - "dedicatedDatabaseId": { + "specification": { + "type": "string", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", - "default": "", - "x-example": "<DEDICATED_DATABASE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ - "databaseId", "name" ] } } } } - } - }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create text embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", "tags": [ "vectorsDB" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", "responses": { - "200": { - "description": "Embedding list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/embeddingList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", + "method": "delete", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", "auth": { "Project": [] } @@ -82171,68 +89743,38 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "default": "nomic-embed-text", - "x-example": "nomic-embed-text", - "enum": [ - "nomic-embed-text", - "embedding-gemma", - "all-minilm", - "bge-small" - ], - "x-enum-name": "EmbeddingModel", - "x-enum-keys": [ - "nomic-embed-text", - "embedding-gemma", - "all-minilm", - "bge-small" - ] - } - }, - "required": [ - "texts" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } + ] } }, - "\/vectorsdb\/transactions": { + "\/vectorsdb\/{databaseId}\/collections": { "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", + "summary": "List collections", + "operationId": "vectorsDBListCollections", "tags": [ "vectorsDB" ], - "description": "List transactions across all 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": "Transaction List", + "description": "VectorsDB Collections List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/vectorsdbCollectionList" } } } @@ -82240,23 +89782,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "listCollections", + "group": "collections", "cookies": false, "type": "", - "demo": "vectorsdb\/list-transactions.md", + "demo": "vectorsdb\/list-collections.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "collections.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", "auth": { "Project": [] } @@ -82264,15 +89805,23 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", @@ -82282,23 +89831,45 @@ "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", "tags": [ "vectorsDB" ], - "description": "Create a new transaction.", + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { "201": { - "description": "Transaction", + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -82306,23 +89877,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "vectorsdb\/create-transaction.md", + "demo": "vectorsdb\/create-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", "auth": { "Project": [] } @@ -82330,9 +89900,19 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } ], "requestBody": { @@ -82341,35 +89921,72 @@ "schema": { "type": "object", "properties": { - "ttl": { + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, + "description": "Embedding dimension.", + "x-example": 1, "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "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", + "dimension" + ] } } } } } }, - "\/vectorsdb\/transactions\/{transactionId}": { + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", "tags": [ "vectorsDB" ], - "description": "Get a transaction by its unique ID.", + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", "responses": { "200": { - "description": "Transaction", + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -82377,23 +89994,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "getCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "vectorsdb\/get-transaction.md", + "demo": "vectorsdb\/get-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "collections.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", "auth": { "Project": [] } @@ -82401,38 +90017,46 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } ] }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", "tags": [ "vectorsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Update a collection by its unique ID.", "responses": { "200": { - "description": "Transaction", + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -82440,23 +90064,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "updateCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "vectorsdb\/update-transaction.md", + "demo": "vectorsdb\/update-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", "auth": { "Project": [] } @@ -82464,19 +90087,27 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } @@ -82487,31 +90118,53 @@ "schema": { "type": "object", "properties": { - "commit": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { "type": "boolean", - "description": "Commit transaction?", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": false, "x-example": false }, - "rollback": { + "enabled": { "type": "boolean", - "description": "Rollback transaction?", - "default": false, + "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 transaction", - "operationId": "vectorsDBDeleteTransaction", + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", "tags": [ "vectorsDB" ], - "description": "Delete a transaction by its unique ID.", + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { "204": { "description": "No content" @@ -82519,23 +90172,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "deleteCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-transaction.md", + "demo": "vectorsdb\/delete-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", "auth": { "Project": [] } @@ -82543,40 +90195,48 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } ] } }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", "tags": [ "vectorsDB" ], - "description": "Create multiple operations in a single transaction.", + "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": { - "201": { - "description": "Transaction", + "200": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -82584,23 +90244,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/create-operations.md", + "demo": "vectorsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "documents.read", "platforms": [ "console", - "server", - "client" + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", "auth": { "Project": [] } @@ -82608,60 +90268,94 @@ "security": [ { "Project": [], - "Key": [], "Session": [], + "Key": [], "JWT": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "\/vectorsdb\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBListUsage", + ] + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", "tags": [ "vectorsDB" ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "UsageVectorsDBs", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageVectorsDBs" + "$ref": "#\/components\/schemas\/document" } } } @@ -82669,117 +90363,82 @@ }, "deprecated": false, "x-appwrite": { - "method": "listUsage", - "group": null, + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/list-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", "methods": [ { - "name": "listUsage", + "name": "createDocument", "namespace": "vectorsDB", - "desc": "", + "desc": "Create document", "auth": { "Project": [] }, "parameters": [ - "range" + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" ], - "required": [], "responses": [ { - "code": 200, - "model": "#\/components\/schemas\/usageVectorsDBs" + "code": 201, + "model": "#\/components\/schemas\/document" } ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/list-usage.md", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", "public": true - } - ], - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" + "required": [ + "databaseId", + "collectionId", + "documents" ], - "default": "30d" - }, - "in": "query" - } - ] - } - }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", - "tags": [ - "vectorsDB" - ], - "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" + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" } - } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": "vectorsdb", - "cookies": false, - "type": "", - "demo": "vectorsdb\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console", - "server" ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", "auth": { "Project": [] } @@ -82787,7 +90446,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -82800,23 +90461,84 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } }, "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", "tags": [ "vectorsDB" ], - "description": "Update a database by its unique ID.", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", "responses": { - "200": { - "description": "Database", + "201": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -82824,22 +90546,52 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "vectorsdb", + "method": "upsertDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], "auth": { "Project": [] } @@ -82860,6 +90612,16 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" } ], "requestBody": { @@ -82868,56 +90630,65 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } }, - "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 + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } }, "required": [ - "name" + "documents" ] } } } } }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", "tags": [ "vectorsDB" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "vectorsdb", + "method": "updateDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", "auth": { "Project": [] } @@ -82938,25 +90709,64 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", + ], + "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.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", "tags": [ "vectorsDB" ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { - "description": "VectorsDB Collections List", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollectionList" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -82964,22 +90774,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "deleteDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", "auth": { "Project": [] } @@ -83001,9 +90811,19 @@ }, "in": "path" }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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: name, enabled, documentSecurity", + "description": "Array of query strings generated using the Query 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", @@ -83015,43 +90835,33 @@ "in": "query" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", + "name": "transactionId", + "description": "Transaction ID for staging the operation.", "required": false, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<TRANSACTION_ID>" }, "in": "query" } ] - }, + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", "tags": [ "vectorsDB" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", "responses": { - "201": { - "description": "VectorsDB Collection", + "200": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -83059,22 +90869,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "createQuery", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/create-collection.md", + "demo": "vectorsdb\/create-query.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", "auth": { "Project": [] } @@ -83082,7 +90893,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -83095,6 +90908,16 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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": { @@ -83103,72 +90926,55 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1, - "format": "int32" - }, - "permissions": { + "queries": { "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, "items": { "type": "string" } }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false + "transactionId": { + "type": "string", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "<TRANSACTION_ID>" }, - "enabled": { + "total": { "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.", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "default": true, "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" } - }, - "required": [ - "collectionId", - "name", - "dimension" - ] + } } } } } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", + "summary": "Get document", + "operationId": "vectorsDBGetDocument", "tags": [ "vectorsDB" ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { "200": { - "description": "VectorsDB Collection", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/document" } } } @@ -83176,22 +90982,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCollection", - "group": "collections", + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/get-collection.md", + "demo": "vectorsdb\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", "auth": { "Project": [] } @@ -83199,7 +91006,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -83215,30 +91024,211 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", "x-example": "<COLLECTION_ID>" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] }, "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", "tags": [ "vectorsDB" ], - "description": "Update a collection by its unique ID.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } + }, + "patch": { + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", + "tags": [ + "vectorsDB" + ], + "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": "VectorsDB Collection", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/document" } } } @@ -83246,22 +91236,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateCollection", - "group": "collections", + "method": "updateDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", "auth": { "Project": [] } @@ -83269,7 +91260,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -83292,6 +91285,16 @@ "x-example": "<COLLECTION_ID>" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" } ], "requestBody": { @@ -83300,53 +91303,38 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "dimension": { - "type": "integer", - "description": "Embedding dimensions.", - "x-example": 1, - "format": "int32" + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" }, "permissions": { "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" } }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } - }, - "required": [ - "name" - ] + } } } } } }, "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", "tags": [ "vectorsDB" ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Delete a document by its unique ID.", "responses": { "204": { "description": "No content" @@ -83354,22 +91342,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteCollection", - "group": "collections", + "method": "deleteDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", "auth": { "Project": [] } @@ -83377,7 +91366,9 @@ "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -83393,32 +91384,52 @@ }, { "name": "collectionId", - "description": "Collection ID.", + "description": "Collection ID. You can create a new collection 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": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", "tags": [ "vectorsDB" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "List indexes in the collection.", "responses": { "200": { - "description": "Documents List", + "description": "Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/indexList" } } } @@ -83426,23 +91437,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "listIndexes", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/list-documents.md", + "demo": "vectorsdb\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "collections.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", "auth": { "Project": [] } @@ -83450,9 +91460,7 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -83478,7 +91486,7 @@ }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", @@ -83489,16 +91497,6 @@ }, "in": "query" }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -83509,35 +91507,23 @@ "default": true }, "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } ] }, "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", "tags": [ "vectorsDB" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { - "201": { - "description": "Document", + "202": { + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/index" } } } @@ -83545,82 +91531,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDocument", - "group": "documents", + "method": "createIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", "auth": { "Project": [] } @@ -83628,9 +91554,7 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -83646,7 +91570,7 @@ }, { "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.", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -83661,63 +91585,95 @@ "schema": { "type": "object", "properties": { - "documentId": { + "key": { "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": "", - "x-example": "<DOCUMENT_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Index Key.", + "x-example": null }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + "type": { + "type": "string", + "description": "Index type.", + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ] }, - "permissions": { + "attributes": { "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", + "x-example": null, "items": { "type": "string" } }, - "documents": { + "orders": { "type": "array", - "description": "Array of documents data as JSON objects.", + "description": "Array of index orders. Maximum of 100 orders are allowed.", "default": [], "x-example": null, "items": { - "type": "object" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] } }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } } - } + }, + "required": [ + "key", + "type", + "attributes" + ] } } } } - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", "tags": [ "vectorsDB" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "description": "Get index by ID.", "responses": { - "201": { - "description": "Documents List", + "200": { + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/index" } } } @@ -83725,52 +91681,174 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", + "method": "getIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/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": "vectorsDBDeleteIndex", + "tags": [ + "vectorsDB" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "cookies": false, + "type": "", + "demo": "vectorsdb\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/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" + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "vectorsDBCreateFailover", + "tags": [ + "vectorsDB" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFailover", + "group": "failovers", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" ], + "packaging": false, + "public": true, "auth": { "Project": [] } @@ -83791,16 +91869,6 @@ "x-example": "<DATABASE_ID>" }, "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" } ], "requestBody": { @@ -83809,42 +91877,34 @@ "schema": { "type": "object", "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { + "targetReplicaId": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true } - }, - "required": [ - "documents" - ] + } } } } } - }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", + } + }, + "\/vectorsdb\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "vectorsDBListOperations", "tags": [ "vectorsDB" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Documents List", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -83852,22 +91912,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocuments", - "group": "documents", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", "auth": { "Project": [] } @@ -83890,62 +91949,57 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "status", + "description": "Filter by operation status.", + "required": false, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "running" }, - "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.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", + ] + } + }, + "\/vectorsdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "vectorsDBGetReplicas", "tags": [ "vectorsDB" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Documents List", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -83953,22 +92007,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", "auth": { "Project": [] } @@ -83989,17 +92042,120 @@ "x-example": "<DATABASE_ID>" }, "in": "path" - }, + } + ] + } + }, + "\/vectorsdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "vectorsDBGetStatus", + "tags": [ + "vectorsDB" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStatus", + "group": "vectorsdb", + "cookies": false, + "type": "", + "demo": "vectorsdb\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" - }, + } + ] + } + }, + "\/waf\/rules": { + "get": { + "summary": "List WAF rules.", + "operationId": "wafListRules", + "tags": [ + "waf" + ], + "description": "List WAF rules for the current project.\n", + "responses": { + "200": { + "description": "WAF rule list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRules", + "group": "rules", + "cookies": false, + "type": "", + "demo": "waf\/list-rules.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/list-rules.md", + "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.", @@ -84014,33 +92170,160 @@ "in": "query" }, { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", "required": false, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", + "\/waf\/rules\/bypass": { + "post": { + "summary": "Create a bypass WAF rule.", + "operationId": "wafCreateBypassRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Create a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleBypass", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleBypass" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBypassRule", + "group": "rules", + "cookies": false, + "type": "", + "demo": "waf\/create-bypass-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-bypass-rule.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Leave empty for the API resource type.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } + } + } + } + }, + "\/waf\/rules\/bypass\/{ruleId}": { + "patch": { + "summary": "Update a bypass WAF rule.", + "operationId": "wafUpdateBypassRule", + "tags": [ + "waf" + ], + "description": "Update a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { "200": { - "description": "Document", + "description": "WafRuleBypass", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/wafRuleBypass" } } } @@ -84048,23 +92331,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "updateBypassRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get-document.md", + "demo": "waf\/update-bypass-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "wafRules.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-bypass-rule.md", "auth": { "Project": [] } @@ -84072,81 +92354,227 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<RULE_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query 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" - }, + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/challenge": { + "post": { + "summary": "Create a challenge WAF rule.", + "operationId": "wafCreateChallengeRule", + "tags": [ + "waf" + ], + "description": "Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", + "responses": { + "201": { + "description": "WafRuleChallenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleChallenge" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createChallengeRule", + "group": "rules", + "cookies": false, + "type": "", + "demo": "waf\/create-challenge-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-challenge-rule.md", + "auth": { + "Project": [] + } + }, + "security": [ { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "challengeType": { + "type": "string", + "description": "Challenge type enforced by the rule.", + "default": "compute", + "x-example": "compute" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + }, + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "default": 3, + "x-example": 1, + "format": "int32" + }, + "ttl": { + "type": "integer", + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "default": 1800, + "x-example": 900, + "format": "int32" + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } } - ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", + } + } + }, + "\/waf\/rules\/challenge\/{ruleId}": { + "patch": { + "summary": "Update a challenge WAF rule.", + "operationId": "wafUpdateChallengeRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "201": { - "description": "Document", + "200": { + "description": "WafRuleChallenge", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/wafRuleChallenge" } } } @@ -84154,55 +92582,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "updateChallengeRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "waf\/update-challenge-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-challenge-rule.md", "auth": { "Project": [] } @@ -84210,42 +92605,17 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<DOCUMENT_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } @@ -84256,45 +92626,91 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true }, - "transactionId": { + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "challengeType": { + "type": "string", + "description": "Challenge type enforced by the rule.", + "x-example": "compute", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + }, + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "ttl": { + "type": "integer", + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "x-example": 900, + "format": "int32", + "x-nullable": true } } } } } } - }, - "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", + } + }, + "\/waf\/rules\/deny": { + "post": { + "summary": "Create a deny WAF rule.", + "operationId": "wafCreateDenyRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Create a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "Document", + "201": { + "description": "WafRuleDeny", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/wafRuleDeny" } } } @@ -84302,23 +92718,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createDenyRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "waf\/create-deny-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-deny-rule.md", "auth": { "Project": [] } @@ -84326,41 +92741,7 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -84369,62 +92750,105 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "transactionId": { + "resourceType": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null } - } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", + } + }, + "\/waf\/rules\/deny\/{ruleId}": { + "patch": { + "summary": "Update a deny WAF rule.", + "operationId": "wafUpdateDenyRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Delete a document by its unique ID.", + "description": "Update a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "WafRuleDeny", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleDeny" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "updateDenyRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "waf\/update-deny-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-deny-rule.md", "auth": { "Project": [] } @@ -84432,70 +92856,92 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<RULE_ID>" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", + "\/waf\/rules\/rate-limit": { + "post": { + "summary": "Create a rate-limit WAF rule.", + "operationId": "wafCreateRateLimitRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "List indexes in the collection.", + "description": "Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "Indexes List", + "201": { + "description": "WafRuleRateLimit", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/indexList" + "$ref": "#\/components\/schemas\/wafRuleRateLimit" } } } @@ -84503,22 +92949,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIndexes", - "group": "indexes", + "method": "createRateLimitRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/list-indexes.md", + "demo": "waf\/create-rate-limit-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-rate-limit-rule.md", "auth": { "Project": [] } @@ -84529,67 +92975,108 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed in the configured interval.", + "x-example": 1, + "format": "int32" + }, + "interval": { + "type": "integer", + "description": "Interval in seconds used for rate limiting.", + "x-example": 1, + "format": "int32" + }, + "key": { + "type": "string", + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "default": "ip", + "x-example": "ip" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + } + }, + "required": [ + "ruleId", + "resourceType", + "name", + "limit", + "interval" + ] + } + } } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", + } + } + }, + "\/waf\/rules\/rate-limit\/{ruleId}": { + "patch": { + "summary": "Update a rate-limit WAF rule.", + "operationId": "wafUpdateRateLimitRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "202": { - "description": "Index", + "200": { + "description": "WafRuleRateLimit", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/wafRuleRateLimit" } } } @@ -84597,22 +93084,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIndex", - "group": "indexes", + "method": "updateRateLimitRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/create-index.md", + "demo": "waf\/update-rate-limit-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-rate-limit-rule.md", "auth": { "Project": [] } @@ -84625,22 +93112,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } @@ -84651,95 +93128,91 @@ "schema": { "type": "object", "properties": { - "key": { + "resourceType": { "type": "string", - "description": "Index Key.", - "x-example": null + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true }, - "type": { + "resourceId": { "type": "string", - "description": "Index type.", - "x-example": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ] + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true }, - "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" - } + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] - } + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed in the configured interval.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "interval": { + "type": "integer", + "description": "Interval in seconds used for rate limiting.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "key": { + "type": "string", + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "x-example": "ip", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", "x-example": null, - "items": { - "type": "integer" - } + "x-nullable": true } - }, - "required": [ - "key", - "type", - "attributes" - ] + } } } } } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", + "\/waf\/rules\/redirect": { + "post": { + "summary": "Create a redirect WAF rule.", + "operationId": "wafCreateRedirectRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get index by ID.", + "description": "Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "Index", + "201": { + "description": "WafRuleRedirect", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/wafRuleRedirect" } } } @@ -84747,22 +93220,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getIndex", - "group": "indexes", + "method": "createRedirectRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get-index.md", + "demo": "waf\/create-redirect-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-redirect-rule.md", "auth": { "Project": [] } @@ -84773,68 +93246,124 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "location": { + "type": "string", + "description": "Location used for redirect responses.", + "x-example": "<LOCATION>" + }, + "statusCode": { + "type": "integer", + "description": "Integer status code used for redirect responses.", + "x-example": 300, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + } + }, + "required": [ + "ruleId", + "resourceType", + "name", + "location", + "statusCode" + ] + } + } } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", + } + } + }, + "\/waf\/rules\/redirect\/{ruleId}": { + "patch": { + "summary": "Update a redirect WAF rule.", + "operationId": "wafUpdateRedirectRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Delete an index.", + "description": "Update a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "WafRuleRedirect", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRedirect" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", + "method": "updateRedirectRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-index.md", + "demo": "waf\/update-redirect-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-redirect-rule.md", "auth": { "Project": [] } @@ -84847,52 +93376,100 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<RULE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "location": { + "type": "string", + "description": "Location used for redirect responses.", + "x-example": "<LOCATION>", + "x-nullable": true + }, + "statusCode": { + "type": "integer", + "description": "Integer status code used for redirect responses.", + "x-example": 300, + "format": "int32", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/usage": { + "\/waf\/rules\/{ruleId}": { "get": { - "summary": "Get collection usage stats", - "operationId": "vectorsDBGetCollectionUsage", + "summary": "Get a WAF rule.", + "operationId": "wafGetRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Get a WAF rule by its ID.\n", "responses": { "200": { - "description": "UsageCollection", + "description": "WafRule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageCollection" + "$ref": "#\/components\/schemas\/wafRule" } } } @@ -84900,138 +93477,77 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCollectionUsage", - "group": null, + "method": "getRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get-collection-usage.md", + "demo": "waf\/get-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.read", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/get-rule.md", "auth": { "Project": [] } }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } ] - } - }, - "\/vectorsdb\/{databaseId}\/usage": { - "get": { - "summary": "Get VectorsDB usage stats", - "operationId": "vectorsDBGetUsage", + }, + "delete": { + "summary": "Delete a WAF rule.", + "operationId": "wafDeleteRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "Delete a WAF rule.\n", "responses": { - "200": { - "description": "UsageVectorsDB", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/usageVectorsDB" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getUsage", - "group": null, + "method": "deleteRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get-usage.md", + "demo": "waf\/delete-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.write", "platforms": [ - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-database-usage.md", - "methods": [ - { - "name": "getUsage", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "range" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/usageVectorsDB" - } - ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", - "demo": "vectorsdb\/get-usage.md", - "public": true - } + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/delete-rule.md", + "produces": [ + "application\/json" ], "auth": { "Project": [] @@ -85039,41 +93555,20 @@ }, "security": [ { - "Project": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<RULE_ID>" }, "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "schema": { - "type": "string", - "x-example": "24h", - "enum": [ - "24h", - "30d", - "90d" - ], - "x-enum-name": "UsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], - "default": "30d" - }, - "in": "query" } ] } @@ -85585,10 +94080,26 @@ } }, "tags": [ + { + "name": "ping", + "description": "" + }, { "name": "account", "description": "The Account service allows you to authenticate and manage a user account." }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, { "name": "avatars", "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." @@ -85598,76 +94109,136 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tablesdb", + "name": "tablesDB", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." + "name": "documentsDB", + "description": "" }, { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + "name": "vectorsDB", + "description": "" }, { "name": "projects", "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." }, { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." }, { - "name": "users", - "description": "The Users service allows you to manage your project users." + "name": "notifications", + "description": "The Notifications service allows you to read and manage your Appwrite Console notifications." }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." }, { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." + "name": "console", + "description": "The Console service allows you to interact with console relevant information." }, { "name": "proxy", "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." }, { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" }, { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for secure file access." }, { - "name": "organization", - "description": "The Organization service allows you to manage organization-level projects." + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "vcs", + "description": "The VCS service allows you to interact with providers like GitHub, GitLab etc." + }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to manage your project webhooks." }, { "name": "migrations", "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." }, { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { "name": "advisor", "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." }, + { + "name": "mysql", + "description": "" + }, + { + "name": "postgresql", + "description": "" + }, + { + "name": "mongo", + "description": "" + }, + { + "name": "apps", + "description": "The Apps service allows you to manage OAuth2 applications, their keys, secrets, scopes, and installations." + }, { "name": "oauth2", "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "domains", + "description": "" + }, + { + "name": "manager", + "description": "" + }, + { + "name": "organizations", + "description": "The Organizations service allows you to manage organization billing, plans, invoices, and add-ons." + }, + { + "name": "backups", + "description": "The Backups service allows you to manage backup policies, archives, and restorations for your project." + }, + { + "name": "activities", + "description": "The Activities service allows you to list and inspect project activity events." + }, + { + "name": "usage", + "description": "" + }, + { + "name": "waf", + "description": "" + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "assistant", + "description": "" } ], "components": { @@ -85986,6 +94557,34 @@ "identities": "" } }, + "notificationList": { + "description": "Notifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of notifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "notifications": { + "type": "array", + "description": "List of notifications.", + "items": { + "$ref": "#\/components\/schemas\/notification" + }, + "x-example": "" + } + }, + "required": [ + "total", + "notifications" + ], + "example": { + "total": 5, + "notifications": "" + } + }, "logList": { "description": "Logs List", "type": "object", @@ -86364,6 +94963,79 @@ "type": "runtime" } }, + "vcsNamespace": { + "description": "VcsNamespace", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "VCS (Version Control System) namespace ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "VCS (Version Control System) namespace display name.", + "x-example": "Appwrite" + }, + "path": { + "type": "string", + "description": "VCS (Version Control System) namespace path, used to filter repositories by namespace.", + "x-example": "appwrite" + }, + "type": { + "type": "string", + "description": "Namespace type. Either the user's personal namespace or a group\/organization.", + "x-example": "user" + }, + "avatarUrl": { + "type": "string", + "description": "Namespace avatar URL.", + "x-example": "https:\/\/example.com\/avatar.png" + } + }, + "required": [ + "$id", + "name", + "path", + "type", + "avatarUrl" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "Appwrite", + "path": "appwrite", + "type": "user", + "avatarUrl": "https:\/\/example.com\/avatar.png" + } + }, + "vcsNamespaceList": { + "description": "VCS Namespaces List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of namespaces that matched your query.", + "x-example": 5, + "format": "int32" + }, + "namespaces": { + "type": "array", + "description": "List of namespaces.", + "items": { + "$ref": "#\/components\/schemas\/vcsNamespace" + }, + "x-example": "" + } + }, + "required": [ + "total", + "namespaces" + ], + "example": { + "total": 5, + "namespaces": "" + } + }, "branchList": { "description": "Branches List", "type": "object", @@ -86930,34 +95602,6 @@ "templates": "" } }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, - "format": "int32" - }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "$ref": "#\/components\/schemas\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, "proxyRuleList": { "description": "Rule List", "type": "object", @@ -87014,6 +95658,26 @@ "schedules": "" } }, + "stageList": { + "description": "Stages List", + "type": "object", + "properties": { + "stages": { + "type": "array", + "description": "List of stages.", + "items": { + "$ref": "#\/components\/schemas\/stage" + }, + "x-example": "" + } + }, + "required": [ + "stages" + ], + "example": { + "stages": "" + } + }, "localeCodeList": { "description": "Locale codes list", "type": "object", @@ -87443,8 +96107,58 @@ "legacy", "tablesdb", "documentsdb", - "vectorsdb" - ] + "vectorsdb", + "mysql", + "postgresql", + "mongodb" + ], + "x-enum-name": "DatabaseType" + }, + "status": { + "type": "string", + "description": "Dedicated database lifecycle status. Null when the database has no valid dedicated backing.", + "x-example": "ready", + "readOnly": true, + "enum": [ + "provisioning", + "ready", + "inactive", + "paused", + "failed", + "deleting", + "deleted", + "restoring", + "scaling", + "upgrading", + "migrating", + "pausing", + "resuming", + "failing-over" + ], + "x-enum-name": "DatabaseStatus", + "nullable": true + }, + "engine": { + "type": "string", + "description": "Underlying engine of the dedicated backing: postgresql, mysql, or mongodb. A managed product (tablesdb, documentsdb, vectorsdb) reports the engine it runs on, so its type and engine can differ. Null when the database has no dedicated backing.", + "x-example": "postgresql", + "readOnly": true, + "nullable": true + }, + "specification": { + "type": "string", + "description": "Compute specification identifier of the dedicated backing, e.g. s-2vcpu-2gb. Null when the database has no dedicated backing.", + "x-example": "s-2vcpu-2gb", + "readOnly": true, + "nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of secondary high availability replicas, excluding the primary. Null when backing configuration is unavailable.", + "x-example": 0, + "format": "int32", + "readOnly": true, + "nullable": true }, "policies": { "type": "array", @@ -87452,7 +96166,8 @@ "items": { "$ref": "#\/components\/schemas\/backupPolicy" }, - "x-example": {} + "x-example": {}, + "nullable": true }, "archives": { "type": "array", @@ -87460,7 +96175,8 @@ "items": { "$ref": "#\/components\/schemas\/backupArchive" }, - "x-example": {} + "x-example": {}, + "nullable": true } }, "required": [ @@ -87469,9 +96185,7 @@ "$createdAt", "$updatedAt", "enabled", - "type", - "policies", - "archives" + "type" ], "example": { "$id": "5e5ea5c16897e", @@ -87480,6 +96194,10 @@ "$updatedAt": "2020-10-15T06:38:00.000+00:00", "enabled": false, "type": "legacy", + "status": "ready", + "engine": "postgresql", + "specification": "s-2vcpu-2gb", + "replicas": 0, "policies": {}, "archives": {} } @@ -89675,113 +98393,6 @@ "encrypt": false } }, - "usageDocumentsDB": { - "description": "UsageDocumentsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, "vectorsdbCollection": { "description": "VectorsDB Collection", "type": "object", @@ -90069,238 +98680,6 @@ "size": 1536 } }, - "usageVectorsDBs": { - "description": "UsageVectorsDBs", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage in bytes.", - "x-example": 0, - "format": "int32" - }, - "databasesReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databasesWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "databases": { - "type": "array", - "description": "Aggregated number of databases per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "documents", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "documents": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageVectorsDB": { - "description": "UsageVectorsDB", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "collectionsTotal": { - "type": "integer", - "description": "Total aggregated number of collections.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents.", - "x-example": 0, - "format": "int32" - }, - "storageTotal": { - "type": "integer", - "description": "Total aggregated storage used in bytes.", - "x-example": 0, - "format": "int32" - }, - "databaseReadsTotal": { - "type": "integer", - "description": "Total number of database reads.", - "x-example": 0, - "format": "int32" - }, - "databaseWritesTotal": { - "type": "integer", - "description": "Total number of database writes.", - "x-example": 0, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "Aggregated number of collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "documents": { - "type": "array", - "description": "Aggregated number of documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "storage": { - "type": "array", - "description": "Aggregated storage used in bytes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseReads": { - "type": "array", - "description": "An array of aggregated number of database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databaseWrites": { - "type": "array", - "description": "An array of aggregated number of database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "documentsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "documents", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "documentsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "documents": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, "table": { "description": "Table", "type": "object", @@ -92888,7 +101267,7 @@ }, "userType": { "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization.", "x-example": "user" }, "ip": { @@ -93779,6 +102158,128 @@ "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" } }, + "notification": { + "description": "Notification", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Notification ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Notification creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Notification update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "messageId": { + "type": "string", + "description": "Stable message ID used for dedup.", + "x-example": "session.create", + "nullable": true + }, + "type": { + "type": "string", + "description": "Notification type: info, warning, error.", + "x-example": "info" + }, + "channel": { + "type": "string", + "description": "Channel: email, sms, push, console, webhook.", + "x-example": "email" + }, + "resourceType": { + "type": "string", + "description": "Resource type this notification is addressed to.", + "x-example": "users" + }, + "resourceId": { + "type": "string", + "description": "Resource ID this notification is addressed to.", + "x-example": "5e5bb8c16897e" + }, + "parentResourceType": { + "type": "string", + "description": "Parent resource type for the notification.", + "x-example": "projects" + }, + "parentResourceId": { + "type": "string", + "description": "Parent resource ID for the notification.", + "x-example": "5e5bb8c16897e" + }, + "projectId": { + "type": "string", + "description": "Project the notification pertains to.", + "x-example": "5e5bb8c16897e", + "nullable": true + }, + "title": { + "type": "string", + "description": "Notification title.", + "x-example": "New sign-in detected" + }, + "body": { + "type": "string", + "description": "Notification body.", + "x-example": "A new device signed in to your account." + }, + "read": { + "type": "boolean", + "description": "Whether the notification has been read.", + "x-example": false, + "nullable": true + }, + "firstSeen": { + "type": "string", + "description": "First time the notification was viewed from a notification logo.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "lastSeen": { + "type": "string", + "description": "Most recent time the notification was viewed from a notification logo.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "type", + "channel", + "resourceType", + "resourceId", + "parentResourceType", + "parentResourceId", + "title", + "body" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "messageId": "session.create", + "type": "info", + "channel": "email", + "resourceType": "users", + "resourceId": "5e5bb8c16897e", + "parentResourceType": "projects", + "parentResourceId": "5e5bb8c16897e", + "projectId": "5e5bb8c16897e", + "title": "New sign-in detected", + "body": "A new device signed in to your account.", + "read": false, + "firstSeen": "2020-10-15T06:38:00.000+00:00", + "lastSeen": "2020-10-15T06:38:00.000+00:00" + } + }, "token": { "description": "Token", "type": "object", @@ -93886,6 +102387,74 @@ "type": "string", "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", "x-example": "USD" + }, + "city": { + "type": "string", + "description": "City", + "x-example": "Kathmandu", + "nullable": true + }, + "timeZone": { + "type": "string", + "description": "Name of timezone", + "x-example": "Asia\/Kathmandu", + "nullable": true + }, + "postalCode": { + "type": "string", + "description": "Postal code", + "x-example": "44600", + "nullable": true + }, + "latitude": { + "type": "number", + "description": "Latitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN) of the IP", + "x-example": "15169", + "nullable": true + }, + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization that owns the ASN", + "x-example": "GOOGLE", + "nullable": true + }, + "isp": { + "type": "string", + "description": "Internet service provider of the IP", + "x-example": "Google", + "nullable": true + }, + "connectionType": { + "type": "string", + "description": "Connection type of the IP (e.g. cable, cellular, corporate)", + "x-example": "cable", + "nullable": true + }, + "connectionUsageType": { + "type": "string", + "description": "User type classification of the IP (e.g. residential, business, hosting)", + "x-example": "residential", + "nullable": true + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP", + "x-example": "Google LLC", + "nullable": true } }, "required": [ @@ -93904,7 +102473,18 @@ "continentCode": "NA", "continent": "North America", "eu": false, - "currency": "USD" + "currency": "USD", + "city": "Kathmandu", + "timeZone": "Asia\/Kathmandu", + "postalCode": "44600", + "latitude": "82.345", + "longitude": "82.345", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "isp": "Google", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC" } }, "localeCode": { @@ -93970,6 +102550,16 @@ "description": "File name.", "x-example": "Pink.png" }, + "folder": { + "type": "string", + "description": "Virtual folder containing the file, with a trailing slash. Empty for the bucket root.", + "x-example": "photos\/2026\/" + }, + "key": { + "type": "string", + "description": "Full virtual path of the file: the folder followed by the file name.", + "x-example": "photos\/2026\/Pink.png" + }, "signature": { "type": "string", "description": "File MD5 signature.", @@ -94022,6 +102612,8 @@ "$updatedAt", "$permissions", "name", + "folder", + "key", "signature", "mimeType", "sizeOriginal", @@ -94040,6 +102632,8 @@ "read(\"any\")" ], "name": "Pink.png", + "folder": "photos\/2026\/", + "key": "photos\/2026\/Pink.png", "signature": "5d529fd02b544198ae075bd57c1762bb", "mimeType": "image\/png", "sizeOriginal": 17890, @@ -96598,6 +105192,12 @@ "description": "Project status", "x-example": "active" }, + "onboarding": { + "type": "object", + "additionalProperties": true, + "description": "Stage progress (completed or skipped) with timestamps and actor types, keyed by stage id.", + "x-example": [] + }, "authMethods": { "type": "array", "description": "List of auth methods.", @@ -96635,6 +105235,11 @@ "description": "Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.", "x-example": "2020-10-15T06:38:00.000+00:00" }, + "wafEnabled": { + "type": "boolean", + "description": "Whether WAF enforcement is enabled for the project.", + "x-example": true + }, "billingLimits": { "type": "object", "description": "Billing limits reached", @@ -96670,6 +105275,17 @@ ], "nullable": true }, + "oAuth2ServerDefaultScopes": { + "type": "array", + "description": "OAuth2 server scopes used when an authorization request omits the scope parameter", + "items": { + "type": "string" + }, + "x-example": [ + "read" + ], + "nullable": true + }, "oAuth2ServerAuthorizationDetailsTypes": { "type": "array", "description": "OAuth2 server accepted RFC 9396 authorization_details types", @@ -96709,6 +105325,13 @@ "format": "int32", "nullable": true }, + "oAuth2ServerInstallationAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for app installation access tokens", + "x-example": 3600, + "format": "int32", + "nullable": true + }, "oAuth2ServerConfidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -96770,11 +105393,13 @@ "pingedAt", "labels", "status", + "onboarding", "authMethods", "services", "protocols", "blocks", - "consoleAccessedAt" + "consoleAccessedAt", + "wafEnabled" ], "example": { "$id": "5e5ea5c16897e", @@ -96800,11 +105425,13 @@ "vip" ], "status": "active", + "onboarding": [], "authMethods": {}, "services": {}, "protocols": {}, "blocks": "", "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "wafEnabled": true, "billingLimits": "", "oAuth2ServerEnabled": false, "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", @@ -96812,6 +105439,9 @@ "read", "write" ], + "oAuth2ServerDefaultScopes": [ + "read" + ], "oAuth2ServerAuthorizationDetailsTypes": [ "calendar" ], @@ -96819,6 +105449,7 @@ "oAuth2ServerRefreshTokenDuration": 86400, "oAuth2ServerPublicAccessTokenDuration": 3600, "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerInstallationAccessTokenDuration": 3600, "oAuth2ServerConfidentialPkce": false, "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", "oAuth2ServerUserCodeLength": 8, @@ -98517,6 +107148,44 @@ "endpoint": "https:\/\/gitlab.com" } }, + "oAuth2Appwrite": { + "description": "OAuth2Appwrite", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Appwrite OAuth2 client ID.", + "x-example": "6a42000000000000b5a0" + }, + "clientSecret": { + "type": "string", + "description": "Appwrite OAuth2 client secret.", + "x-example": "b86afd000000000000000000000000000000000000000000000000000ced5f93" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6a42000000000000b5a0", + "clientSecret": "b86afd000000000000000000000000000000000000000000000000000ced5f93" + } + }, "oAuth2Authentik": { "description": "OAuth2Authentik", "type": "object", @@ -98747,6 +107416,29 @@ "type": "string", "description": "OpenID Connect user info endpoint URL.", "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" + }, + "prompt": { + "type": "array", + "description": "OpenID Connect prompt values controlling the authentication and consent screens.", + "items": { + "type": "string", + "enum": [ + "none", + "login", + "consent", + "select_account" + ] + }, + "x-example": [ + "consent" + ] + }, + "maxAge": { + "type": "integer", + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds.", + "x-example": 3600, + "format": "int32", + "nullable": true } }, "required": [ @@ -98757,7 +107449,8 @@ "wellKnownURL", "authorizationURL", "tokenURL", - "userInfoURL" + "userInfoURL", + "prompt" ], "example": { "$id": "github", @@ -98767,7 +107460,11 @@ "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", "tokenURL": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoURL": "https:\/\/myoauth.com\/oauth2\/userinfo" + "userInfoURL": "https:\/\/myoauth.com\/oauth2\/userinfo", + "prompt": [ + "consent" + ], + "maxAge": 3600 } }, "oAuth2Okta": { @@ -99065,6 +107762,9 @@ { "$ref": "#\/components\/schemas\/oAuth2Gitlab" }, + { + "$ref": "#\/components\/schemas\/oAuth2Appwrite" + }, { "$ref": "#\/components\/schemas\/oAuth2Authentik" }, @@ -99129,6 +107829,7 @@ "paypal": "#\/components\/schemas\/oAuth2Paypal", "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "appwrite": "#\/components\/schemas\/oAuth2Appwrite", "authentik": "#\/components\/schemas\/oAuth2Authentik", "auth0": "#\/components\/schemas\/oAuth2Auth0", "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", @@ -100053,598 +108754,644 @@ "countryName": "United States" } }, - "healthAntivirus": { - "description": "Health Antivirus", + "metric": { + "description": "Metric", "type": "object", "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" + "value": { + "type": "integer", + "description": "The value of this metric at the timestamp.", + "x-example": 1, + "format": "int32" }, - "status": { + "date": { "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] + "description": "The date at which this metric was aggregated in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "version", - "status" + "value", + "date" ], "example": { - "version": "1.0.0", - "status": "online" + "value": 1, + "date": "2020-10-15T06:38:00.000+00:00" } }, - "healthQueue": { - "description": "Health Queue", + "metricBreakdown": { + "description": "Metric Breakdown", "type": "object", "properties": { - "size": { + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c16897e", + "nullable": true + }, + "name": { + "type": "string", + "description": "Resource name.", + "x-example": "Documents" + }, + "value": { "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, + "description": "The value of this metric at the timestamp.", + "x-example": 1, "format": "int32" + }, + "estimate": { + "type": "number", + "description": "The estimated value of this metric at the end of the period.", + "x-example": 1, + "format": "double", + "nullable": true } }, "required": [ - "size" + "name", + "value" ], "example": { - "size": 8 + "resourceId": "5e5ea5c16897e", + "name": "Documents", + "value": 1, + "estimate": 1 } }, - "healthStatus": { - "description": "Health Status", + "usageUsers": { + "description": "UsageUsers", "type": "object", "properties": { - "name": { + "range": { "type": "string", - "description": "Name of the service.", - "x-example": "database" + "description": "Time range of the usage stats.", + "x-example": "30d" }, - "ping": { + "usersTotal": { "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, + "description": "Total aggregated number of statistics of users.", + "x-example": 0, "format": "int32" }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" + "sessionsTotal": { + "type": "integer", + "description": "Total aggregated number of active sessions.", + "x-example": 0, + "format": "int32" + }, + "users": { + "type": "array", + "description": "Aggregated number of users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "sessions": { + "type": "array", + "description": "Aggregated number of active sessions per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] } }, "required": [ - "name", - "ping", - "status" + "range", + "usersTotal", + "sessionsTotal", + "users", + "sessions" ], "example": { - "name": "database", - "ping": 128, - "status": "pass" + "range": "30d", + "usersTotal": 0, + "sessionsTotal": 0, + "users": [], + "sessions": [] } }, - "healthCertificate": { - "description": "Health Certificate", + "usagePresence": { + "description": "UsagePresence", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { + "range": { "type": "string", - "description": "Valid from", - "x-example": "1704200998" + "description": "Time range of the usage stats.", + "x-example": "30d" }, - "validTo": { - "type": "string", - "description": "Valid to", - "x-example": "1711458597" + "usersOnlineTotal": { + "type": "integer", + "description": "Current total number of online users.", + "x-example": 0, + "format": "int32" }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" + "presences": { + "type": "array", + "description": "Aggregated number of online users per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] } }, "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" + "range", + "usersOnlineTotal", + "presences" ], "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" + "range": "30d", + "usersOnlineTotal": 0, + "presences": [] } }, - "healthTime": { - "description": "Health Time", + "usageProject": { + "description": "Project", "type": "object", "properties": { - "remoteTime": { + "executionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "documentsTotal": { "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, + "description": "Total aggregated number of documents in legacy\/tablesdb.", + "x-example": 0, "format": "int32" }, - "localTime": { + "documentsdbDocumentsTotal": { "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, + "description": "Total aggregated number of documents in documentsdb.", + "x-example": 0, "format": "int32" }, - "diff": { + "rowsTotal": { "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, + "description": "Total aggregated number of rows.", + "x-example": 0, "format": "int32" - } - }, - "required": [ - "remoteTime", - "localTime", - "diff" - ], - "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 - } - }, - "metric": { - "description": "Metric", - "type": "object", - "properties": { - "value": { + }, + "databasesTotal": { "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, + "description": "Total aggregated number of databases.", + "x-example": 0, "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" - ], - "example": { - "value": 1, - "date": "2020-10-15T06:38:00.000+00:00" - } - }, - "metricBreakdown": { - "description": "Metric Breakdown", - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c16897e", - "nullable": true + "documentsdbTotal": { + "type": "integer", + "description": "Total aggregated number of documentsdb.", + "x-example": 0, + "format": "int32" }, - "name": { - "type": "string", - "description": "Resource name.", - "x-example": "Documents" + "databasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of databases storage size (in bytes).", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", + "x-example": 0, + "format": "int32" }, - "value": { + "usersTotal": { "type": "integer", - "description": "The value of this metric at the timestamp.", - "x-example": 1, + "description": "Total aggregated number of users.", + "x-example": 0, "format": "int32" }, - "estimate": { - "type": "number", - "description": "The estimated value of this metric at the end of the period.", - "x-example": 1, - "format": "double", - "nullable": true - } - }, - "required": [ - "name", - "value" - ], - "example": { - "resourceId": "5e5ea5c16897e", - "name": "Documents", - "value": 1, - "estimate": 1 - } - }, - "usageDatabases": { - "description": "UsageDatabases", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" + "filesStorageTotal": { + "type": "integer", + "description": "Total aggregated sum of files storage size (in bytes).", + "x-example": 0, + "format": "int32" }, - "databasesTotal": { + "functionsStorageTotal": { "type": "integer", - "description": "Total aggregated number of databases.", + "description": "Total aggregated sum of functions storage size (in bytes).", "x-example": 0, "format": "int32" }, - "collectionsTotal": { + "buildsStorageTotal": { "type": "integer", - "description": "Total aggregated number of collections.", + "description": "Total aggregated sum of builds storage size (in bytes).", "x-example": 0, "format": "int32" }, - "tablesTotal": { + "deploymentsStorageTotal": { "type": "integer", - "description": "Total aggregated number of tables.", + "description": "Total aggregated sum of deployments storage size (in bytes).", "x-example": 0, "format": "int32" }, - "documentsTotal": { + "bucketsTotal": { "type": "integer", - "description": "Total aggregated number of documents.", + "description": "Total aggregated number of buckets.", "x-example": 0, "format": "int32" }, - "rowsTotal": { + "executionsMbSecondsTotal": { "type": "integer", - "description": "Total aggregated number of rows.", + "description": "Total aggregated number of function executions mbSeconds.", "x-example": 0, "format": "int32" }, - "storageTotal": { + "buildsMbSecondsTotal": { "type": "integer", - "description": "Total aggregated number of total databases storage in bytes.", + "description": "Total aggregated number of function builds mbSeconds.", "x-example": 0, "format": "int32" }, "databasesReadsTotal": { "type": "integer", - "description": "Total number of databases reads.", + "description": "Aggregated stats for total databases reads.", "x-example": 0, "format": "int32" }, "databasesWritesTotal": { "type": "integer", - "description": "Total number of databases writes.", + "description": "Aggregated stats for total databases writes.", "x-example": 0, "format": "int32" }, - "databases": { + "documentsdbDatabasesReadsTotal": { + "type": "integer", + "description": "Total number of documentsdb databases reads.", + "x-example": 0, + "format": "int32" + }, + "documentsdbDatabasesWritesTotal": { + "type": "integer", + "description": "Total number of documentsdb databases writes.", + "x-example": 0, + "format": "int32" + }, + "requests": { "type": "array", - "description": "Aggregated number of databases per period.", + "description": "Aggregated number of requests per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "collections": { + "network": { "type": "array", - "description": "Aggregated number of collections per period.", + "description": "Aggregated number of consumed bandwidth per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "tables": { + "users": { "type": "array", - "description": "Aggregated number of tables per period.", + "description": "Aggregated number of users per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "documents": { + "executions": { "type": "array", - "description": "Aggregated number of documents per period.", + "description": "Aggregated number of executions per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "rows": { + "authPhoneTotal": { + "type": "integer", + "description": "Aggregated stats for total auth phone.", + "x-example": 0, + "format": "int32" + }, + "authPhoneEstimate": { + "type": "integer", + "description": "Aggregated stats for total auth phone estimation.", + "x-example": 0, + "format": "int32" + }, + "authPhoneCountryBreakdown": { "type": "array", - "description": "Aggregated number of rows per period.", + "description": "Aggregated breakdown in totals of phone auth by country.", + "items": { + "$ref": "#\/components\/schemas\/metricBreakdown" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "Aggregated stats for database reads.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "storage": { + "databasesWrites": { "type": "array", - "description": "An array of the aggregated number of databases storage in bytes per period.", + "description": "Aggregated stats for database writes.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "databasesReads": { + "documentsdbDatabasesReads": { "type": "array", - "description": "An array of aggregated number of database reads.", + "description": "An array of aggregated number of documentsdb database reads.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "databasesWrites": { + "documentsdbDatabasesWrites": { "type": "array", - "description": "An array of aggregated number of database writes.", + "description": "An array of aggregated number of documentsdb database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "documentsdbDatabasesStorage": { + "type": "array", + "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "An array of aggregated number of image transformations.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] - } - }, - "required": [ - "range", - "databasesTotal", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "databases", - "collections", - "tables", - "documents", - "rows", - "storage", - "databasesReads", - "databasesWrites" - ], - "example": { - "range": "30d", - "databasesTotal": 0, - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "databases": [], - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databasesReads": [], - "databasesWrites": [] - } - }, - "usageDatabase": { - "description": "UsageDatabase", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" }, - "collectionsTotal": { + "imageTransformationsTotal": { "type": "integer", - "description": "Total aggregated number of collections.", + "description": "Total aggregated number of image transformations.", "x-example": 0, "format": "int32" }, - "tablesTotal": { + "vectorsdbDatabasesTotal": { "type": "integer", - "description": "Total aggregated number of tables.", + "description": "Total aggregated number of VectorsDB databases.", "x-example": 0, "format": "int32" }, - "documentsTotal": { + "vectorsdbCollectionsTotal": { "type": "integer", - "description": "Total aggregated number of documents.", + "description": "Total aggregated number of VectorsDB collections.", "x-example": 0, "format": "int32" }, - "rowsTotal": { + "vectorsdbDocumentsTotal": { "type": "integer", - "description": "Total aggregated number of rows.", + "description": "Total aggregated number of VectorsDB documents.", "x-example": 0, "format": "int32" }, - "storageTotal": { + "vectorsdbDatabasesStorageTotal": { "type": "integer", - "description": "Total aggregated number of total storage used in bytes.", + "description": "Total aggregated VectorsDB storage (bytes).", "x-example": 0, "format": "int32" }, - "databaseReadsTotal": { + "vectorsdbDatabasesReadsTotal": { "type": "integer", - "description": "Total number of databases reads.", + "description": "Total aggregated number of VectorsDB reads.", "x-example": 0, "format": "int32" }, - "databaseWritesTotal": { + "vectorsdbDatabasesWritesTotal": { "type": "integer", - "description": "Total number of databases writes.", + "description": "Total aggregated number of VectorsDB writes.", "x-example": 0, "format": "int32" }, - "collections": { + "vectorsdbDatabases": { "type": "array", - "description": "Aggregated number of collections per period.", + "description": "Aggregated VectorsDB databases per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "tables": { + "vectorsdbCollections": { "type": "array", - "description": "Aggregated number of tables per period.", + "description": "Aggregated VectorsDB collections per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "documents": { + "vectorsdbDocuments": { "type": "array", - "description": "Aggregated number of documents per period.", + "description": "Aggregated VectorsDB documents per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "rows": { + "vectorsdbDatabasesStorage": { + "type": "array", + "description": "Aggregated VectorsDB storage per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "vectorsdbDatabasesReads": { "type": "array", - "description": "Aggregated number of rows per period.", + "description": "Aggregated VectorsDB reads per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "storage": { + "vectorsdbDatabasesWrites": { "type": "array", - "description": "Aggregated storage used in bytes per period.", + "description": "Aggregated VectorsDB writes per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "databaseReads": { + "embeddingsText": { + "type": "object", + "description": "Aggregated number of text embedding calls per period.", + "x-example": [], + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextTokens": { + "type": "object", + "description": "Aggregated number of tokens processed by text embeddings per period.", + "x-example": [], + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextDuration": { + "type": "object", + "description": "Aggregated duration spent generating text embeddings per period.", + "x-example": [], + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextErrors": { + "type": "object", + "description": "Aggregated number of errors while generating text embeddings per period.", + "x-example": [], + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextTotal": { + "type": "object", + "description": "Total aggregated number of text embedding calls.", + "x-example": 0, + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextTokensTotal": { + "type": "object", + "description": "Total aggregated number of tokens processed by text.", + "x-example": 0, + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextDurationTotal": { + "type": "object", + "description": "Total aggregated duration spent generating text embeddings.", + "x-example": 0, + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "embeddingsTextErrorsTotal": { + "type": "object", + "description": "Total aggregated number of errors while generating text embeddings.", + "x-example": 0, + "allOf": [ + { + "$ref": "#\/components\/schemas\/metric" + } + ] + }, + "functionsExecutions": { "type": "array", - "description": "An array of aggregated number of database reads.", + "description": "Aggregated number of function executions per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "databaseWrites": { + "functionsExecutionsTotal": { + "type": "integer", + "description": "Total aggregated number of function executions.", + "x-example": 0, + "format": "int32" + }, + "sitesExecutions": { "type": "array", - "description": "An array of aggregated number of database writes.", + "description": "Aggregated number of site executions per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] - } - }, - "required": [ - "range", - "collectionsTotal", - "tablesTotal", - "documentsTotal", - "rowsTotal", - "storageTotal", - "databaseReadsTotal", - "databaseWritesTotal", - "collections", - "tables", - "documents", - "rows", - "storage", - "databaseReads", - "databaseWrites" - ], - "example": { - "range": "30d", - "collectionsTotal": 0, - "tablesTotal": 0, - "documentsTotal": 0, - "rowsTotal": 0, - "storageTotal": 0, - "databaseReadsTotal": 0, - "databaseWritesTotal": 0, - "collections": [], - "tables": [], - "documents": [], - "rows": [], - "storage": [], - "databaseReads": [], - "databaseWrites": [] - } - }, - "usageTable": { - "description": "UsageTable", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" }, - "rowsTotal": { + "sitesExecutionsTotal": { + "type": "integer", + "description": "Total aggregated number of site executions.", + "x-example": 0, + "format": "int32" + }, + "networkTotal": { "type": "integer", - "description": "Total aggregated number of of rows.", + "description": "Aggregated stats for total network bandwidth.", "x-example": 0, "format": "int32" }, - "rows": { + "backupsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total backups storage.", + "x-example": 0, + "format": "int32" + }, + "screenshotsGenerated": { "type": "array", - "description": "Aggregated number of rows per period.", + "description": "An array of aggregated number of screenshots generated.", "items": { "$ref": "#\/components\/schemas\/metric" }, "x-example": [] - } - }, - "required": [ - "range", - "rowsTotal", - "rows" - ], - "example": { - "range": "30d", - "rowsTotal": 0, - "rows": [] - } - }, - "usageCollection": { - "description": "UsageCollection", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" }, - "documentsTotal": { + "screenshotsGeneratedTotal": { "type": "integer", - "description": "Total aggregated number of of documents.", + "description": "Total aggregated number of screenshots generated.", "x-example": 0, "format": "int32" }, - "documents": { + "realtimeConnectionsTotal": { + "type": "integer", + "description": "Current aggregated number of open Realtime connections.", + "x-example": 0, + "format": "int32" + }, + "realtimeMessagesTotal": { + "type": "integer", + "description": "Total number of Realtime messages sent to clients.", + "x-example": 0, + "format": "int32" + }, + "realtimeBandwidthTotal": { + "type": "integer", + "description": "Total consumed Realtime bandwidth (in bytes).", + "x-example": 0, + "format": "int32" + }, + "realtimeConnections": { + "type": "array", + "description": "Aggregated number of open Realtime connections per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "realtimeMessages": { "type": "array", - "description": "Aggregated number of documents per period.", + "description": "Aggregated number of Realtime messages sent to clients per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "realtimeBandwidth": { + "type": "array", + "description": "Aggregated consumed Realtime bandwidth (in bytes) per period.", "items": { "$ref": "#\/components\/schemas\/metric" }, @@ -100652,4130 +109399,4051 @@ } }, "required": [ - "range", + "executionsTotal", "documentsTotal", - "documents" + "documentsdbDocumentsTotal", + "rowsTotal", + "databasesTotal", + "documentsdbTotal", + "databasesStorageTotal", + "documentsdbDatabasesStorageTotal", + "usersTotal", + "filesStorageTotal", + "functionsStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "bucketsTotal", + "executionsMbSecondsTotal", + "buildsMbSecondsTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "documentsdbDatabasesReadsTotal", + "documentsdbDatabasesWritesTotal", + "requests", + "network", + "users", + "executions", + "authPhoneTotal", + "authPhoneEstimate", + "authPhoneCountryBreakdown", + "databasesReads", + "databasesWrites", + "documentsdbDatabasesReads", + "documentsdbDatabasesWrites", + "documentsdbDatabasesStorage", + "imageTransformations", + "imageTransformationsTotal", + "vectorsdbDatabasesTotal", + "vectorsdbCollectionsTotal", + "vectorsdbDocumentsTotal", + "vectorsdbDatabasesStorageTotal", + "vectorsdbDatabasesReadsTotal", + "vectorsdbDatabasesWritesTotal", + "vectorsdbDatabases", + "vectorsdbCollections", + "vectorsdbDocuments", + "vectorsdbDatabasesStorage", + "vectorsdbDatabasesReads", + "vectorsdbDatabasesWrites", + "embeddingsText", + "embeddingsTextTokens", + "embeddingsTextDuration", + "embeddingsTextErrors", + "embeddingsTextTotal", + "embeddingsTextTokensTotal", + "embeddingsTextDurationTotal", + "embeddingsTextErrorsTotal", + "functionsExecutions", + "functionsExecutionsTotal", + "sitesExecutions", + "sitesExecutionsTotal", + "networkTotal", + "backupsStorageTotal", + "screenshotsGenerated", + "screenshotsGeneratedTotal", + "realtimeConnectionsTotal", + "realtimeMessagesTotal", + "realtimeBandwidthTotal", + "realtimeConnections", + "realtimeMessages", + "realtimeBandwidth" ], "example": { - "range": "30d", + "executionsTotal": 0, "documentsTotal": 0, - "documents": [] + "documentsdbDocumentsTotal": 0, + "rowsTotal": 0, + "databasesTotal": 0, + "documentsdbTotal": 0, + "databasesStorageTotal": 0, + "documentsdbDatabasesStorageTotal": 0, + "usersTotal": 0, + "filesStorageTotal": 0, + "functionsStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "bucketsTotal": 0, + "executionsMbSecondsTotal": 0, + "buildsMbSecondsTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "documentsdbDatabasesReadsTotal": 0, + "documentsdbDatabasesWritesTotal": 0, + "requests": [], + "network": [], + "users": [], + "executions": [], + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "authPhoneCountryBreakdown": [], + "databasesReads": [], + "databasesWrites": [], + "documentsdbDatabasesReads": [], + "documentsdbDatabasesWrites": [], + "documentsdbDatabasesStorage": [], + "imageTransformations": [], + "imageTransformationsTotal": 0, + "vectorsdbDatabasesTotal": 0, + "vectorsdbCollectionsTotal": 0, + "vectorsdbDocumentsTotal": 0, + "vectorsdbDatabasesStorageTotal": 0, + "vectorsdbDatabasesReadsTotal": 0, + "vectorsdbDatabasesWritesTotal": 0, + "vectorsdbDatabases": [], + "vectorsdbCollections": [], + "vectorsdbDocuments": [], + "vectorsdbDatabasesStorage": [], + "vectorsdbDatabasesReads": [], + "vectorsdbDatabasesWrites": [], + "embeddingsText": [], + "embeddingsTextTokens": [], + "embeddingsTextDuration": [], + "embeddingsTextErrors": [], + "embeddingsTextTotal": 0, + "embeddingsTextTokensTotal": 0, + "embeddingsTextDurationTotal": 0, + "embeddingsTextErrorsTotal": 0, + "functionsExecutions": [], + "functionsExecutionsTotal": 0, + "sitesExecutions": [], + "sitesExecutionsTotal": 0, + "networkTotal": 0, + "backupsStorageTotal": 0, + "screenshotsGenerated": [], + "screenshotsGeneratedTotal": 0, + "realtimeConnectionsTotal": 0, + "realtimeMessagesTotal": 0, + "realtimeBandwidthTotal": 0, + "realtimeConnections": [], + "realtimeMessages": [], + "realtimeBandwidth": [] } }, - "usageUsers": { - "description": "UsageUsers", + "headers": { + "description": "Headers", "type": "object", "properties": { - "range": { + "name": { "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of statistics of users.", - "x-example": 0, - "format": "int32" - }, - "sessionsTotal": { - "type": "integer", - "description": "Total aggregated number of active sessions.", - "x-example": 0, - "format": "int32" - }, - "users": { - "type": "array", - "description": "Aggregated number of users per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "description": "Header name.", + "x-example": "Content-Type" }, - "sessions": { - "type": "array", - "description": "Aggregated number of active sessions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "value": { + "type": "string", + "description": "Header value.", + "x-example": "application\/json" } }, "required": [ - "range", - "usersTotal", - "sessionsTotal", - "users", - "sessions" + "name", + "value" ], "example": { - "range": "30d", - "usersTotal": 0, - "sessionsTotal": 0, - "users": [], - "sessions": [] + "name": "Content-Type", + "value": "application\/json" } }, - "usagePresence": { - "description": "UsagePresence", + "specification": { + "description": "Specification", "type": "object", "properties": { - "range": { - "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "usersOnlineTotal": { + "memory": { "type": "integer", - "description": "Current total number of online users.", - "x-example": 0, + "description": "Memory size in MB.", + "x-example": 512, "format": "int32" }, - "presences": { - "type": "array", - "description": "Aggregated number of online users per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" + }, + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true + }, + "slug": { + "type": "string", + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" } }, "required": [ - "range", - "usersOnlineTotal", - "presences" + "memory", + "cpus", + "enabled", + "slug" ], "example": { - "range": "30d", - "usersOnlineTotal": 0, - "presences": [] + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" } }, - "usageStorage": { - "description": "StorageUsage", + "proxyRule": { + "description": "Rule", "type": "object", "properties": { - "range": { + "$id": { "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" + "description": "Rule ID.", + "x-example": "5e5ea5c16897e" }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets", - "x-example": 0, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Rule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "filesTotal": { - "type": "integer", - "description": "Total aggregated number of files.", - "x-example": 0, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Rule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of files storage (in bytes).", - "x-example": 0, - "format": "int32" + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": "appwrite.company.com" }, - "buckets": { - "type": "array", - "description": "Aggregated number of buckets per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "type": { + "type": "string", + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "x-example": "deployment" }, - "files": { - "type": "array", - "description": "Aggregated number of files per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "trigger": { + "type": "string", + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "x-example": "manual" }, - "storage": { - "type": "array", - "description": "Aggregated number of files storage (in bytes) per period .", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - } - }, - "required": [ - "range", - "bucketsTotal", - "filesTotal", - "filesStorageTotal", - "buckets", - "files", - "storage" - ], - "example": { - "range": "30d", - "bucketsTotal": 0, - "filesTotal": 0, - "filesStorageTotal": 0, - "buckets": [], - "files": [], - "storage": [] - } - }, - "usageBuckets": { - "description": "UsageBuckets", - "type": "object", - "properties": { - "range": { + "redirectUrl": { "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" + "description": "URL to redirect to. Used if type is \"redirect\"", + "x-example": "https:\/\/appwrite.io\/docs" }, - "filesTotal": { + "redirectStatusCode": { "type": "integer", - "description": "Total aggregated number of bucket files.", - "x-example": 0, + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "x-example": 301, "format": "int32" }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated number of bucket files storage (in bytes).", - "x-example": 0, - "format": "int32" + "deploymentId": { + "type": "string", + "description": "ID of deployment. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" }, - "files": { - "type": "array", - "description": "Aggregated number of bucket files per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "deploymentResourceType": { + "type": "string", + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "x-example": "function", + "enum": [ + "function", + "site" + ], + "nullable": true }, - "storage": { - "type": "array", - "description": "Aggregated number of bucket storage files (in bytes) per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "deploymentResourceId": { + "type": "string", + "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" }, - "imageTransformations": { - "type": "array", - "description": "Aggregated number of files transformations per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "deploymentVcsProviderBranch": { + "type": "string", + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "x-example": "main" }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Total aggregated number of files transformations.", - "x-example": 0, - "format": "int32" + "status": { + "type": "string", + "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", + "x-example": "verified", + "enum": [ + "unverified", + "verifying", + "verified" + ] + }, + "logs": { + "type": "string", + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + }, + "renewAt": { + "type": "string", + "description": "Certificate auto-renewal date in ISO 8601 format.", + "x-example": "datetime" } }, "required": [ - "range", - "filesTotal", - "filesStorageTotal", - "files", - "storage", - "imageTransformations", - "imageTransformationsTotal" + "$id", + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt" ], "example": { - "range": "30d", - "filesTotal": 0, - "filesStorageTotal": 0, - "files": [], - "storage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0 + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime" } }, - "usageFunctions": { - "description": "UsageFunctions", + "schedule": { + "description": "Schedule", "type": "object", "properties": { - "range": { + "$id": { "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "functionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions.", - "x-example": 0, - "format": "int32" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of functions deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions deployment storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of functions build.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of functions build storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions build mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of functions execution.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of functions execution mbSeconds.", - "x-example": 0, - "format": "int32" + "description": "Schedule ID.", + "x-example": "5e5ea5c16897e" }, - "functions": { - "type": "array", - "description": "Aggregated number of functions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": 0 + "$createdAt": { + "type": "string", + "description": "Schedule creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "deployments": { - "type": "array", - "description": "Aggregated number of functions deployment per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$updatedAt": { + "type": "string", + "description": "Schedule update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of functions deployment storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "resourceType": { + "type": "string", + "description": "The resource type associated with this schedule.", + "x-example": "function" }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" + "resourceId": { + "type": "string", + "description": "The resource ID associated with this schedule.", + "x-example": "5e5ea5c16897e" }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" + "resourceUpdatedAt": { + "type": "string", + "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "builds": { - "type": "array", - "description": "Aggregated number of functions build per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "projectId": { + "type": "string", + "description": "The project ID associated with this schedule.", + "x-example": "5e5ea5c16897e" }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of functions build storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "schedule": { + "type": "string", + "description": "The CRON schedule expression.", + "x-example": "5 4 * * *" }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of functions build compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Schedule data used to store resource-specific context needed for execution.", "x-example": [] }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of functions build mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "active": { + "type": "boolean", + "description": "Whether the schedule is active.", + "x-example": true }, - "executions": { - "type": "array", - "description": "Aggregated number of functions execution per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "region": { + "type": "string", + "description": "The region where the schedule is deployed.", + "x-example": "fra" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "resourceType", + "resourceId", + "resourceUpdatedAt", + "projectId", + "schedule", + "data", + "active", + "region" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "function", + "resourceId": "5e5ea5c16897e", + "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "schedule": "5 4 * * *", + "data": [], + "active": true, + "region": "fra" + } + }, + "stage": { + "description": "Stage", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stage ID.", + "x-example": "tablesDB.create" }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of functions execution compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "sdk": { + "type": "string", + "description": "SDK method key (namespace.name) for this stage.", + "x-example": "tablesDB.create" }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of functions mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "status": { + "type": "string", + "description": "Stage status.", + "x-example": "completed" }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "at": { + "type": "string", + "description": "When the stage was completed or skipped, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "actorType": { + "type": "string", + "description": "Actor type when the stage was recorded.", + "x-example": "user" } }, "required": [ - "range", - "functionsTotal", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "functions", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" + "id", + "sdk", + "status", + "at", + "actorType" ], "example": { - "range": "30d", - "functionsTotal": 0, - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "functions": 0, - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] + "id": "tablesDB.create", + "sdk": "tablesDB.create", + "status": "completed", + "at": "2020-10-15T06:38:00.000+00:00", + "actorType": "user" } }, - "usageFunction": { - "description": "UsageFunction", + "emailTemplate": { + "description": "EmailTemplate", "type": "object", "properties": { - "range": { + "templateId": { "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "description": "Template type", + "x-example": "verification" }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "message": { + "type": "string", + "description": "Template message", + "x-example": "Click on the link to verify your account." }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "senderName": { + "type": "string", + "description": "Name of the sender", + "x-example": "My User" }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of function executions compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "senderEmail": { + "type": "string", + "description": "Email of the sender", + "x-example": "mail@appwrite.io" }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of function mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "replyToName": { + "type": "string", + "description": "Reply to name", + "x-example": "Support Team" }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "subject": { + "type": "string", + "description": "Email subject", + "x-example": "Please verify your email address" } }, "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" ], "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" } }, - "usageSites": { - "description": "UsageSites", + "consoleVariables": { + "description": "Console Variables", "type": "object", "properties": { - "range": { + "_APP_DOMAIN_TARGET_CNAME": { "type": "string", - "description": "Time range of the usage stats.", - "x-example": "30d" - }, - "sitesTotal": { - "type": "integer", - "description": "Total aggregated number of sites.", - "x-example": 0, - "format": "int32" - }, - "sites": { - "type": "array", - "description": "Aggregated number of sites per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of sites deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of sites deployment storage.", - "x-example": 0, - "format": "int32" + "description": "CNAME target for your Appwrite custom domains.", + "x-example": "appwrite.io" }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of sites build.", - "x-example": 0, - "format": "int32" + "_APP_DOMAIN_TARGET_A": { + "type": "string", + "description": "A target for your Appwrite custom domains.", + "x-example": "127.0.0.1" }, - "buildsStorageTotal": { + "_APP_COMPUTE_BUILD_TIMEOUT": { "type": "integer", - "description": "total aggregated sum of sites build storage.", - "x-example": 0, + "description": "Maximum build timeout in seconds.", + "x-example": 900, "format": "int32" }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build compute time.", - "x-example": 0, - "format": "int32" + "_APP_DOMAIN_TARGET_AAAA": { + "type": "string", + "description": "AAAA target for your Appwrite custom domains.", + "x-example": "::1" }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites build mbSeconds.", - "x-example": 0, - "format": "int32" + "_APP_DOMAIN_TARGET_CAA": { + "type": "string", + "description": "CAA target for your Appwrite custom domains.", + "x-example": "digicert.com" }, - "executionsTotal": { + "_APP_STORAGE_LIMIT": { "type": "integer", - "description": "Total aggregated number of sites execution.", - "x-example": 0, + "description": "Maximum file size allowed for file upload in bytes.", + "x-example": "30000000", "format": "int32" }, - "executionsTimeTotal": { + "_APP_COMPUTE_SIZE_LIMIT": { "type": "integer", - "description": "Total aggregated sum of sites execution compute time.", - "x-example": 0, + "description": "Maximum file size allowed for deployment in bytes.", + "x-example": "30000000", "format": "int32" }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of sites execution mbSeconds.", - "x-example": 0, - "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" }, - "requestsTotal": { - "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, - "format": "int32" + "_APP_VCS_ENABLED": { + "type": "boolean", + "description": "Defines if VCS (Version Control System) is enabled.", + "x-example": true }, - "requests": { + "_APP_VCS_PROVIDERS": { "type": "array", - "description": "Aggregated number of requests per period.", + "description": "List of configured VCS providers.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "github" + ] }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" + "_APP_DOMAIN_ENABLED": { + "type": "boolean", + "description": "Defines if main domain is configured. If so, custom domains can be created.", + "x-example": true }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "_APP_ASSISTANT_ENABLED": { + "type": "boolean", + "description": "Defines if AI assistant is enabled.", + "x-example": true }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" + "_APP_DOMAIN_SITES": { + "type": "string", + "description": "A comma separated list of domains to use for site URLs.", + "x-example": "sites.localhost,sites.example.com" }, - "outbound": { - "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "_APP_DOMAIN_FUNCTIONS": { + "type": "string", + "description": "A domain to use for function URLs.", + "x-example": "functions.localhost" }, - "deployments": { - "type": "array", - "description": "Aggregated number of sites deployment per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "_APP_OPTIONS_FORCE_HTTPS": { + "type": "string", + "description": "Defines if HTTPS is enforced for all requests.", + "x-example": "enabled" }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of sites deployment storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "_APP_DOMAINS_NAMESERVERS": { + "type": "string", + "description": "Comma-separated list of nameservers.", + "x-example": "ns1.example.com,ns2.example.com" }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful site builds.", - "x-example": 0, - "format": "int32" + "_APP_DB_ADAPTER": { + "type": "string", + "description": "Database adapter in use.", + "x-example": "mysql" }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed site builds.", - "x-example": 0, - "format": "int32" + "supportForRelationships": { + "type": "boolean", + "description": "Whether the database adapter supports relationships.", + "x-example": true }, - "builds": { - "type": "array", - "description": "Aggregated number of sites build per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForOperators": { + "type": "boolean", + "description": "Whether the database adapter supports operators.", + "x-example": true }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of sites build storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForSpatials": { + "type": "boolean", + "description": "Whether the database adapter supports spatial attributes.", + "x-example": true }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of sites build compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForSpatialIndexNull": { + "type": "boolean", + "description": "Whether the database adapter supports spatial indexes on nullable columns.", + "x-example": false }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated sum of sites build mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForFulltextWildcard": { + "type": "boolean", + "description": "Whether the database adapter supports fulltext wildcard search.", + "x-example": true }, - "executions": { - "type": "array", - "description": "Aggregated number of sites execution per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForMultipleFulltextIndexes": { + "type": "boolean", + "description": "Whether the database adapter supports multiple fulltext indexes per collection.", + "x-example": true }, - "executionsTime": { - "type": "array", - "description": "Aggregated number of sites execution compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForAttributeResizing": { + "type": "boolean", + "description": "Whether the database adapter supports resizing attributes.", + "x-example": true }, - "executionsMbSeconds": { - "type": "array", - "description": "Aggregated number of sites mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "supportForSchemas": { + "type": "boolean", + "description": "Whether the database adapter supports fixed schemas with row width limits.", + "x-example": true }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful site builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "maxIndexLength": { + "type": "integer", + "description": "Maximum index length supported by the database adapter.", + "x-example": 768, + "format": "int32" + }, + "supportForIntegerIds": { + "type": "boolean", + "description": "Whether the database adapter uses integer sequence IDs.", + "x-example": true + }, + "_APP_CONSOLE_EMAIL_VERIFICATION": { + "type": "string", + "description": "Whether email verification for console users is required. Can be \"true\" or \"false\".", + "x-example": "true" + } + }, + "required": [ + "_APP_DOMAIN_TARGET_CNAME", + "_APP_DOMAIN_TARGET_A", + "_APP_COMPUTE_BUILD_TIMEOUT", + "_APP_DOMAIN_TARGET_AAAA", + "_APP_DOMAIN_TARGET_CAA", + "_APP_STORAGE_LIMIT", + "_APP_COMPUTE_SIZE_LIMIT", + "_APP_USAGE_STATS", + "_APP_VCS_ENABLED", + "_APP_VCS_PROVIDERS", + "_APP_DOMAIN_ENABLED", + "_APP_ASSISTANT_ENABLED", + "_APP_DOMAIN_SITES", + "_APP_DOMAIN_FUNCTIONS", + "_APP_OPTIONS_FORCE_HTTPS", + "_APP_DOMAINS_NAMESERVERS", + "_APP_DB_ADAPTER", + "supportForRelationships", + "supportForOperators", + "supportForSpatials", + "supportForSpatialIndexNull", + "supportForFulltextWildcard", + "supportForMultipleFulltextIndexes", + "supportForAttributeResizing", + "supportForSchemas", + "maxIndexLength", + "supportForIntegerIds", + "_APP_CONSOLE_EMAIL_VERIFICATION" + ], + "example": { + "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", + "_APP_DOMAIN_TARGET_A": "127.0.0.1", + "_APP_COMPUTE_BUILD_TIMEOUT": 900, + "_APP_DOMAIN_TARGET_AAAA": "::1", + "_APP_DOMAIN_TARGET_CAA": "digicert.com", + "_APP_STORAGE_LIMIT": "30000000", + "_APP_COMPUTE_SIZE_LIMIT": "30000000", + "_APP_USAGE_STATS": "enabled", + "_APP_VCS_ENABLED": true, + "_APP_VCS_PROVIDERS": [ + "github" + ], + "_APP_DOMAIN_ENABLED": true, + "_APP_ASSISTANT_ENABLED": true, + "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", + "_APP_DOMAIN_FUNCTIONS": "functions.localhost", + "_APP_OPTIONS_FORCE_HTTPS": "enabled", + "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", + "_APP_DB_ADAPTER": "mysql", + "supportForRelationships": true, + "supportForOperators": true, + "supportForSpatials": true, + "supportForSpatialIndexNull": false, + "supportForFulltextWildcard": true, + "supportForMultipleFulltextIndexes": true, + "supportForAttributeResizing": true, + "supportForSchemas": true, + "maxIndexLength": 768, + "supportForIntegerIds": true, + "_APP_CONSOLE_EMAIL_VERIFICATION": "true" + } + }, + "consoleOAuth2ProviderParameter": { + "description": "Console OAuth2 Provider Parameter", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", + "x-example": "clientId" + }, + "name": { + "type": "string", + "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", + "x-example": "Client ID or App ID" + }, + "example": { + "type": "string", + "description": "Example value for this parameter.", + "x-example": "e4d87900000000540733" }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed site builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "hint": { + "type": "string", + "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", + "x-example": "Example of wrong value: 370006" } }, "required": [ - "range", - "sitesTotal", - "sites", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound", - "deployments", - "deploymentsStorage", - "buildsSuccessTotal", - "buildsFailedTotal", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed" + "$id", + "name", + "example", + "hint" ], "example": { - "range": "30d", - "sitesTotal": 0, - "sites": [], - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [], - "deployments": [], - "deploymentsStorage": [], - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [] + "$id": "clientId", + "name": "Client ID or App ID", + "example": "e4d87900000000540733", + "hint": "Example of wrong value: 370006" } }, - "usageSite": { - "description": "UsageSite", + "consoleOAuth2Provider": { + "description": "Console OAuth2 Provider", "type": "object", "properties": { - "range": { + "$id": { "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "deploymentsTotal": { - "type": "integer", - "description": "Total aggregated number of function deployments.", - "x-example": 0, - "format": "int32" - }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of function deployments storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsSuccessTotal": { - "type": "integer", - "description": "Total aggregated number of successful function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsFailedTotal": { - "type": "integer", - "description": "Total aggregated number of failed function builds.", - "x-example": 0, - "format": "int32" - }, - "buildsStorageTotal": { - "type": "integer", - "description": "total aggregated sum of function builds storage.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsTimeAverage": { - "type": "integer", - "description": "Average builds compute time.", - "x-example": 0, - "format": "int32" - }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function builds mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "executionsTimeTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions compute time.", - "x-example": 0, - "format": "int32" - }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated sum of function executions mbSeconds.", - "x-example": 0, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "Aggregated number of function deployments per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "deploymentsStorage": { - "type": "array", - "description": "Aggregated number of function deployments storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "builds": { - "type": "array", - "description": "Aggregated number of function builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsStorage": { - "type": "array", - "description": "Aggregated sum of function builds storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsTime": { - "type": "array", - "description": "Aggregated sum of function builds compute time per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "buildsMbSeconds": { - "type": "array", - "description": "Aggregated number of function builds mbSeconds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "executions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "executionsTime": { + "parameters": { "type": "array", - "description": "Aggregated number of function executions compute time per period.", + "description": "List of parameters required to configure this OAuth2 provider.", "items": { - "$ref": "#\/components\/schemas\/metric" + "$ref": "#\/components\/schemas\/consoleOAuth2ProviderParameter" }, - "x-example": [] + "x-example": "" + } + }, + "required": [ + "$id", + "parameters" + ], + "example": { + "$id": "github", + "parameters": "" + } + }, + "consoleOAuth2ProviderList": { + "description": "Console OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers exposed by the server.", + "x-example": 5, + "format": "int32" }, - "executionsMbSeconds": { + "oAuth2Providers": { "type": "array", - "description": "Aggregated number of function mbSeconds per period.", + "description": "List of OAuth2 providers, each with the parameters required to configure it.", "items": { - "$ref": "#\/components\/schemas\/metric" + "$ref": "#\/components\/schemas\/consoleOAuth2Provider" }, - "x-example": [] + "x-example": "" + } + }, + "required": [ + "total", + "oAuth2Providers" + ], + "example": { + "total": 5, + "oAuth2Providers": "" + } + }, + "consoleKeyScope": { + "description": "Console Key Scope", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Scope ID.", + "x-example": "users.read" }, - "buildsSuccess": { - "type": "array", - "description": "Aggregated number of successful builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "description": { + "type": "string", + "description": "Scope description.", + "x-example": "Access to read your project's users" }, - "buildsFailed": { - "type": "array", - "description": "Aggregated number of failed builds per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "category": { + "type": "string", + "description": "Scope category.", + "x-example": "Auth" }, - "requestsTotal": { + "deprecated": { + "type": "boolean", + "description": "Scope is deprecated.", + "x-example": true + } + }, + "required": [ + "$id", + "description", + "category", + "deprecated" + ], + "example": { + "$id": "users.read", + "description": "Access to read your project's users", + "category": "Auth", + "deprecated": true + } + }, + "consoleKeyScopeList": { + "description": "Console Key Scopes List", + "type": "object", + "properties": { + "total": { "type": "integer", - "description": "Total aggregated number of requests.", - "x-example": 0, + "description": "Total number of key scopes exposed by the server.", + "x-example": 5, "format": "int32" }, - "requests": { + "scopes": { "type": "array", - "description": "Aggregated number of requests per period.", + "description": "List of key scopes, each with its ID and description.", "items": { - "$ref": "#\/components\/schemas\/metric" + "$ref": "#\/components\/schemas\/consoleKeyScope" }, - "x-example": [] - }, - "inboundTotal": { - "type": "integer", - "description": "Total aggregated inbound bandwidth.", - "x-example": 0, - "format": "int32" + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "mfaChallenge": { + "description": "MFA Challenge", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" }, - "inbound": { - "type": "array", - "description": "Aggregated number of inbound bandwidth per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "outboundTotal": { - "type": "integer", - "description": "Total aggregated outbound bandwidth.", - "x-example": 0, - "format": "int32" + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" }, - "outbound": { + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "userId", + "expire" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", + "type": "object", + "properties": { + "recoveryCodes": { "type": "array", - "description": "Aggregated number of outbound bandwidth per period.", + "description": "Recovery codes.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] } }, "required": [ - "range", - "deploymentsTotal", - "deploymentsStorageTotal", - "buildsTotal", - "buildsSuccessTotal", - "buildsFailedTotal", - "buildsStorageTotal", - "buildsTimeTotal", - "buildsTimeAverage", - "buildsMbSecondsTotal", - "executionsTotal", - "executionsTimeTotal", - "executionsMbSecondsTotal", - "deployments", - "deploymentsStorage", - "builds", - "buildsStorage", - "buildsTime", - "buildsMbSeconds", - "executions", - "executionsTime", - "executionsMbSeconds", - "buildsSuccess", - "buildsFailed", - "requestsTotal", - "requests", - "inboundTotal", - "inbound", - "outboundTotal", - "outbound" + "recoveryCodes" ], "example": { - "range": "30d", - "deploymentsTotal": 0, - "deploymentsStorageTotal": 0, - "buildsTotal": 0, - "buildsSuccessTotal": 0, - "buildsFailedTotal": 0, - "buildsStorageTotal": 0, - "buildsTimeTotal": 0, - "buildsTimeAverage": 0, - "buildsMbSecondsTotal": 0, - "executionsTotal": 0, - "executionsTimeTotal": 0, - "executionsMbSecondsTotal": 0, - "deployments": [], - "deploymentsStorage": [], - "builds": [], - "buildsStorage": [], - "buildsTime": [], - "buildsMbSeconds": [], - "executions": [], - "executionsTime": [], - "executionsMbSeconds": [], - "buildsSuccess": [], - "buildsFailed": [], - "requestsTotal": 0, - "requests": [], - "inboundTotal": 0, - "inbound": [], - "outboundTotal": 0, - "outbound": [] + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] } }, - "usageProject": { - "description": "Project", + "mfaType": { + "description": "MFAType", "type": "object", "properties": { - "executionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" - }, - "documentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in legacy\/tablesdb.", - "x-example": 0, - "format": "int32" - }, - "documentsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of documents in documentsdb.", - "x-example": 0, - "format": "int32" - }, - "rowsTotal": { - "type": "integer", - "description": "Total aggregated number of rows.", - "x-example": 0, - "format": "int32" - }, - "databasesTotal": { - "type": "integer", - "description": "Total aggregated number of databases.", - "x-example": 0, - "format": "int32" + "secret": { + "type": "string", + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" }, - "documentsdbTotal": { - "type": "integer", - "description": "Total aggregated number of documentsdb.", - "x-example": 0, - "format": "int32" + "uri": { + "type": "string", + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "required": [ + "secret", + "uri" + ], + "example": { + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + } + }, + "mfaFactors": { + "description": "MFAFactors", + "type": "object", + "properties": { + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true }, - "databasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of databases storage size (in bytes).", - "x-example": 0, - "format": "int32" + "phone": { + "type": "boolean", + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true }, - "documentsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of documentsdb databases storage size (in bytes).", - "x-example": 0, - "format": "int32" + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true }, - "usersTotal": { - "type": "integer", - "description": "Total aggregated number of users.", - "x-example": 0, - "format": "int32" + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true + } + }, + "required": [ + "totp", + "phone", + "email", + "recoveryCode" + ], + "example": { + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true + } + }, + "provider": { + "description": "Provider", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" }, - "filesStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of files storage size (in bytes).", - "x-example": 0, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "functionsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of functions storage size (in bytes).", - "x-example": 0, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "buildsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of builds storage size (in bytes).", - "x-example": 0, - "format": "int32" + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Total aggregated sum of deployments storage size (in bytes).", - "x-example": 0, - "format": "int32" + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" }, - "bucketsTotal": { - "type": "integer", - "description": "Total aggregated number of buckets.", - "x-example": 0, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Is provider enabled?", + "x-example": true }, - "executionsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions mbSeconds.", - "x-example": 0, - "format": "int32" + "type": { + "type": "string", + "description": "Type of provider.", + "x-example": "sms" }, - "buildsMbSecondsTotal": { - "type": "integer", - "description": "Total aggregated number of function builds mbSeconds.", - "x-example": 0, - "format": "int32" + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } }, - "databasesReadsTotal": { - "type": "integer", - "description": "Aggregated stats for total databases reads.", - "x-example": 0, - "format": "int32" + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", + "enabled", + "type", + "credentials" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" }, - "databasesWritesTotal": { - "type": "integer", - "description": "Aggregated stats for total databases writes.", - "x-example": 0, - "format": "int32" + "options": { + "from": "sender-email@mydomain" + } + } + }, + "message": { + "description": "Message", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Message ID.", + "x-example": "5e5ea5c16897e" }, - "documentsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total number of documentsdb databases reads.", - "x-example": 0, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "documentsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total number of documentsdb databases writes.", - "x-example": 0, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "requests": { - "type": "array", - "description": "Aggregated number of requests per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "providerType": { + "type": "string", + "description": "Message provider type.", + "x-example": "email" }, - "network": { + "topics": { "type": "array", - "description": "Aggregated number of consumed bandwidth per period.", + "description": "Topic IDs set as recipients.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "5e5ea5c16897e" + ] }, "users": { "type": "array", - "description": "Aggregated number of users per period.", + "description": "User IDs set as recipients.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "5e5ea5c16897e" + ] }, - "executions": { + "targets": { "type": "array", - "description": "Aggregated number of executions per period.", + "description": "Target IDs set as recipients.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "5e5ea5c16897e" + ] }, - "executionsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of executions by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "bucketsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of usage by buckets.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "databasesStorageBreakdown": { + "deliveryErrors": { "type": "array", - "description": "An array of the aggregated breakdown of storage usage by databases.", + "description": "Delivery errors if any.", "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" + "type": "string" }, - "x-example": [] + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true }, - "executionsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of execution mbSeconds by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" }, - "buildsMbSecondsBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of build mbSeconds by functions.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } }, - "functionsStorageBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of functions storage size (in bytes).", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." }, - "authPhoneTotal": { + "status": "processing" + } + }, + "topic": { + "description": "Topic", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name of the topic.", + "x-example": "events" + }, + "emailTotal": { "type": "integer", - "description": "Aggregated stats for total auth phone.", - "x-example": 0, + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, "format": "int32" }, - "authPhoneEstimate": { + "smsTotal": { "type": "integer", - "description": "Aggregated stats for total auth phone estimation.", - "x-example": 0, + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, "format": "int32" }, - "authPhoneCountryBreakdown": { - "type": "array", - "description": "Aggregated breakdown in totals of phone auth by country.", - "items": { - "$ref": "#\/components\/schemas\/metricBreakdown" - }, - "x-example": [] - }, - "databasesReads": { - "type": "array", - "description": "Aggregated stats for database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, - "databasesWrites": { - "type": "array", - "description": "Aggregated stats for database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" }, - "documentsdbDatabasesReads": { + "subscribe": { "type": "array", - "description": "An array of aggregated number of documentsdb database reads.", + "description": "Subscribe permissions.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": "users" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" + } + }, + "transaction": { + "description": "Transaction", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Transaction ID.", + "x-example": "259125845563242502" }, - "documentsdbDatabasesWrites": { - "type": "array", - "description": "An array of aggregated number of documentsdb database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "documentsdbDatabasesStorage": { - "type": "array", - "description": "An array of aggregated sum of documentsdb databases storage size (in bytes) per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$updatedAt": { + "type": "string", + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "imageTransformations": { - "type": "array", - "description": "An array of aggregated number of image transformations.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "status": { + "type": "string", + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" }, - "imageTransformationsTotal": { + "operations": { "type": "integer", - "description": "Total aggregated number of image transformations.", - "x-example": 0, + "description": "Number of operations in the transaction.", + "x-example": 5, "format": "int32" }, - "vectorsdbDatabasesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB databases.", - "x-example": 0, - "format": "int32" + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "subscriber": { + "description": "Subscriber", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Subscriber ID.", + "x-example": "259125845563242502" }, - "vectorsdbCollectionsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB collections.", - "x-example": 0, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "vectorsdbDocumentsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB documents.", - "x-example": 0, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "vectorsdbDatabasesStorageTotal": { - "type": "integer", - "description": "Total aggregated VectorsDB storage (bytes).", - "x-example": 0, - "format": "int32" + "targetId": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" }, - "vectorsdbDatabasesReadsTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB reads.", - "x-example": 0, - "format": "int32" + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/target" + } + ] }, - "vectorsdbDatabasesWritesTotal": { - "type": "integer", - "description": "Total aggregated number of VectorsDB writes.", - "x-example": 0, - "format": "int32" + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" }, - "vectorsdbDatabases": { - "type": "array", - "description": "Aggregated VectorsDB databases per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" }, - "vectorsdbCollections": { - "type": "array", - "description": "Aggregated VectorsDB collections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" }, - "vectorsdbDocuments": { - "type": "array", - "description": "Aggregated VectorsDB documents per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" + } + }, + "target": { + "description": "Target", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Target ID.", + "x-example": "259125845563242502" }, - "vectorsdbDatabasesStorage": { - "type": "array", - "description": "Aggregated VectorsDB storage per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "vectorsdbDatabasesReads": { - "type": "array", - "description": "Aggregated VectorsDB reads per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "vectorsdbDatabasesWrites": { - "type": "array", - "description": "Aggregated VectorsDB writes per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" }, - "embeddingsText": { - "type": "object", - "description": "Aggregated number of text embedding calls per period.", - "x-example": [], - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" }, - "embeddingsTextTokens": { - "type": "object", - "description": "Aggregated number of tokens processed by text embeddings per period.", - "x-example": [], - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true }, - "embeddingsTextDuration": { - "type": "object", - "description": "Aggregated duration spent generating text embeddings per period.", - "x-example": [], - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" }, - "embeddingsTextErrors": { - "type": "object", - "description": "Aggregated number of errors while generating text embeddings per period.", - "x-example": [], - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "identifier": { + "type": "string", + "description": "The target identifier.", + "x-example": "token" }, - "embeddingsTextTotal": { - "type": "object", - "description": "Total aggregated number of text embedding calls.", - "x-example": 0, - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" + ], + "example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false + } + }, + "migration": { + "description": "Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Migration ID.", + "x-example": "5e5ea5c16897e" }, - "embeddingsTextTokensTotal": { - "type": "object", - "description": "Total aggregated number of tokens processed by text.", - "x-example": 0, - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "$createdAt": { + "type": "string", + "description": "Migration creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "embeddingsTextDurationTotal": { - "type": "object", - "description": "Total aggregated duration spent generating text embeddings.", - "x-example": 0, - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "$updatedAt": { + "type": "string", + "description": "Variable creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "embeddingsTextErrorsTotal": { - "type": "object", - "description": "Total aggregated number of errors while generating text embeddings.", - "x-example": 0, - "allOf": [ - { - "$ref": "#\/components\/schemas\/metric" - } - ] + "status": { + "type": "string", + "description": "Migration status ( pending, processing, failed, completed ) ", + "x-example": "pending" }, - "functionsExecutions": { - "type": "array", - "description": "Aggregated number of function executions per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "stage": { + "type": "string", + "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", + "x-example": "init" }, - "functionsExecutionsTotal": { - "type": "integer", - "description": "Total aggregated number of function executions.", - "x-example": 0, - "format": "int32" + "source": { + "type": "string", + "description": "A string containing the type of source of the migration.", + "x-example": "Appwrite" }, - "sitesExecutions": { + "destination": { + "type": "string", + "description": "A string containing the type of destination of the migration.", + "x-example": "Appwrite" + }, + "resources": { "type": "array", - "description": "Aggregated number of site executions per period.", + "description": "Resources to migrate.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] - }, - "sitesExecutionsTotal": { - "type": "integer", - "description": "Total aggregated number of site executions.", - "x-example": 0, - "format": "int32" + "x-example": [ + "user" + ] }, - "networkTotal": { - "type": "integer", - "description": "Aggregated stats for total network bandwidth.", - "x-example": 0, - "format": "int32" + "resourceId": { + "type": "string", + "description": "ID of the resource being migrated.", + "x-example": "collectionId" }, - "backupsStorageTotal": { - "type": "integer", - "description": "Aggregated stats for total backups storage.", - "x-example": 0, - "format": "int32" + "resourceInternalId": { + "type": "string", + "description": "Internal ID of the resource being migrated.", + "x-example": "1" }, - "screenshotsGenerated": { - "type": "array", - "description": "An array of aggregated number of screenshots generated.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "resourceType": { + "type": "string", + "description": "Type of the resource being migrated.", + "x-example": "collection" }, - "screenshotsGeneratedTotal": { - "type": "integer", - "description": "Total aggregated number of screenshots generated.", - "x-example": 0, - "format": "int32" + "parentResourceId": { + "type": "string", + "description": "ID of the parent resource that contains the migrated resource.", + "x-example": "databaseId" }, - "imagineCredits": { - "type": "array", - "description": "An array of aggregated number of Imagine credits in the given period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "parentResourceInternalId": { + "type": "string", + "description": "Internal ID of the parent resource that contains the migrated resource.", + "x-example": "1" }, - "imagineCreditsTotal": { - "type": "integer", - "description": "Total aggregated number of Imagine credits.", - "x-example": 0, - "format": "int32" + "parentResourceType": { + "type": "string", + "description": "Type of the parent resource that contains the migrated resource.", + "x-example": "database" }, - "realtimeConnectionsTotal": { - "type": "integer", - "description": "Current aggregated number of open Realtime connections.", - "x-example": 0, - "format": "int32" + "destinationResourceId": { + "type": "string", + "description": "ID of the destination resource created or overwritten by the migration.", + "x-example": "databaseId" }, - "realtimeMessagesTotal": { - "type": "integer", - "description": "Total number of Realtime messages sent to clients.", - "x-example": 0, - "format": "int32" + "destinationResourceInternalId": { + "type": "string", + "description": "Internal ID of the destination resource created or overwritten by the migration.", + "x-example": "1" }, - "realtimeBandwidthTotal": { - "type": "integer", - "description": "Total consumed Realtime bandwidth (in bytes).", - "x-example": 0, - "format": "int32" + "destinationResourceType": { + "type": "string", + "description": "Type of the destination resource created or overwritten by the migration.", + "x-example": "database" }, - "realtimeConnections": { - "type": "array", - "description": "Aggregated number of open Realtime connections per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "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}}" }, - "realtimeMessages": { - "type": "array", - "description": "Aggregated number of Realtime messages sent to clients per period.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "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\":\"\"}]" }, - "realtimeBandwidth": { + "errors": { "type": "array", - "description": "Aggregated consumed Realtime bandwidth (in bytes) per period.", + "description": "All errors that occurred during the migration process.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, "x-example": [] - } - }, - "required": [ - "executionsTotal", - "documentsTotal", - "documentsdbDocumentsTotal", - "rowsTotal", - "databasesTotal", - "documentsdbTotal", - "databasesStorageTotal", - "documentsdbDatabasesStorageTotal", - "usersTotal", - "filesStorageTotal", - "functionsStorageTotal", - "buildsStorageTotal", - "deploymentsStorageTotal", - "bucketsTotal", - "executionsMbSecondsTotal", - "buildsMbSecondsTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "documentsdbDatabasesReadsTotal", - "documentsdbDatabasesWritesTotal", - "requests", - "network", - "users", - "executions", - "executionsBreakdown", - "bucketsBreakdown", - "databasesStorageBreakdown", - "executionsMbSecondsBreakdown", - "buildsMbSecondsBreakdown", - "functionsStorageBreakdown", - "authPhoneTotal", - "authPhoneEstimate", - "authPhoneCountryBreakdown", - "databasesReads", - "databasesWrites", - "documentsdbDatabasesReads", - "documentsdbDatabasesWrites", - "documentsdbDatabasesStorage", - "imageTransformations", - "imageTransformationsTotal", - "vectorsdbDatabasesTotal", - "vectorsdbCollectionsTotal", - "vectorsdbDocumentsTotal", - "vectorsdbDatabasesStorageTotal", - "vectorsdbDatabasesReadsTotal", - "vectorsdbDatabasesWritesTotal", - "vectorsdbDatabases", - "vectorsdbCollections", - "vectorsdbDocuments", - "vectorsdbDatabasesStorage", - "vectorsdbDatabasesReads", - "vectorsdbDatabasesWrites", - "embeddingsText", - "embeddingsTextTokens", - "embeddingsTextDuration", - "embeddingsTextErrors", - "embeddingsTextTotal", - "embeddingsTextTokensTotal", - "embeddingsTextDurationTotal", - "embeddingsTextErrorsTotal", - "functionsExecutions", - "functionsExecutionsTotal", - "sitesExecutions", - "sitesExecutionsTotal", - "networkTotal", - "backupsStorageTotal", - "screenshotsGenerated", - "screenshotsGeneratedTotal", - "imagineCredits", - "imagineCreditsTotal", - "realtimeConnectionsTotal", - "realtimeMessagesTotal", - "realtimeBandwidthTotal", - "realtimeConnections", - "realtimeMessages", - "realtimeBandwidth" - ], - "example": { - "executionsTotal": 0, - "documentsTotal": 0, - "documentsdbDocumentsTotal": 0, - "rowsTotal": 0, - "databasesTotal": 0, - "documentsdbTotal": 0, - "databasesStorageTotal": 0, - "documentsdbDatabasesStorageTotal": 0, - "usersTotal": 0, - "filesStorageTotal": 0, - "functionsStorageTotal": 0, - "buildsStorageTotal": 0, - "deploymentsStorageTotal": 0, - "bucketsTotal": 0, - "executionsMbSecondsTotal": 0, - "buildsMbSecondsTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "documentsdbDatabasesReadsTotal": 0, - "documentsdbDatabasesWritesTotal": 0, - "requests": [], - "network": [], - "users": [], - "executions": [], - "executionsBreakdown": [], - "bucketsBreakdown": [], - "databasesStorageBreakdown": [], - "executionsMbSecondsBreakdown": [], - "buildsMbSecondsBreakdown": [], - "functionsStorageBreakdown": [], - "authPhoneTotal": 0, - "authPhoneEstimate": 0, - "authPhoneCountryBreakdown": [], - "databasesReads": [], - "databasesWrites": [], - "documentsdbDatabasesReads": [], - "documentsdbDatabasesWrites": [], - "documentsdbDatabasesStorage": [], - "imageTransformations": [], - "imageTransformationsTotal": 0, - "vectorsdbDatabasesTotal": 0, - "vectorsdbCollectionsTotal": 0, - "vectorsdbDocumentsTotal": 0, - "vectorsdbDatabasesStorageTotal": 0, - "vectorsdbDatabasesReadsTotal": 0, - "vectorsdbDatabasesWritesTotal": 0, - "vectorsdbDatabases": [], - "vectorsdbCollections": [], - "vectorsdbDocuments": [], - "vectorsdbDatabasesStorage": [], - "vectorsdbDatabasesReads": [], - "vectorsdbDatabasesWrites": [], - "embeddingsText": [], - "embeddingsTextTokens": [], - "embeddingsTextDuration": [], - "embeddingsTextErrors": [], - "embeddingsTextTotal": 0, - "embeddingsTextTokensTotal": 0, - "embeddingsTextDurationTotal": 0, - "embeddingsTextErrorsTotal": 0, - "functionsExecutions": [], - "functionsExecutionsTotal": 0, - "sitesExecutions": [], - "sitesExecutionsTotal": 0, - "networkTotal": 0, - "backupsStorageTotal": 0, - "screenshotsGenerated": [], - "screenshotsGeneratedTotal": 0, - "imagineCredits": [], - "imagineCreditsTotal": 0, - "realtimeConnectionsTotal": 0, - "realtimeMessagesTotal": 0, - "realtimeBandwidthTotal": 0, - "realtimeConnections": [], - "realtimeMessages": [], - "realtimeBandwidth": [] - } - }, - "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" + "options": { + "type": "object", + "additionalProperties": true, + "description": "Migration options used during the migration process.", + "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" } }, "required": [ - "name", - "value" + "$id", + "$createdAt", + "$updatedAt", + "status", + "stage", + "source", + "destination", + "resources", + "resourceId", + "resourceInternalId", + "resourceType", + "parentResourceId", + "parentResourceInternalId", + "parentResourceType", + "destinationResourceId", + "destinationResourceInternalId", + "destinationResourceType", + "statusCounters", + "resourceData", + "errors", + "options" ], "example": { - "name": "Content-Type", - "value": "application\/json" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "stage": "init", + "source": "Appwrite", + "destination": "Appwrite", + "resources": [ + "user" + ], + "resourceId": "collectionId", + "resourceInternalId": "1", + "resourceType": "collection", + "parentResourceId": "databaseId", + "parentResourceInternalId": "1", + "parentResourceType": "database", + "destinationResourceId": "databaseId", + "destinationResourceInternalId": "1", + "destinationResourceType": "database", + "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", + "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", + "errors": [], + "options": "{\"bucketId\": \"exports\", \"notify\": false}" } }, - "specification": { - "description": "Specification", + "migrationReport": { + "description": "Migration Report", "type": "object", "properties": { - "memory": { + "user": { "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, + "description": "Number of users to be migrated.", + "x-example": 20, "format": "int32" }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", + "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" + }, + "row": { + "type": "integer", + "description": "Number of rows 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" + }, + "platform": { + "type": "integer", + "description": "Number of platforms to be migrated.", + "x-example": 5, + "format": "int32" + }, + "api-key": { + "type": "integer", + "description": "Number of API keys to be migrated.", + "x-example": 5, + "format": "int32" + }, + "project-variable": { + "type": "integer", + "description": "Number of project variables to be migrated.", + "x-example": 5, + "format": "int32" + }, + "webhook": { + "type": "integer", + "description": "Number of webhooks to be migrated.", + "x-example": 5, + "format": "int32" + }, + "auth-methods": { + "type": "integer", + "description": "Number of auth-method configs to be migrated (always 0 or 1 \u2014 the project-level flag bundle).", "x-example": 1, - "format": "double" + "format": "int32" }, - "enabled": { - "type": "boolean", - "description": "Is size enabled.", - "x-example": true + "project-protocols": { + "type": "integer", + "description": "Number of protocol configs to be migrated (always 0 or 1 \u2014 the project-level REST\/GraphQL\/WebSocket flags).", + "x-example": 1, + "format": "int32" }, - "slug": { + "project-labels": { + "type": "integer", + "description": "Number of label sets to be migrated (always 0 or 1 \u2014 the project-level RBAC label array).", + "x-example": 1, + "format": "int32" + }, + "project-services": { + "type": "integer", + "description": "Number of service configs to be migrated (always 0 or 1 \u2014 the project-level enable\/disable flags for all 17 services).", + "x-example": 1, + "format": "int32" + }, + "policies": { + "type": "integer", + "description": "Number of policy bundles to be migrated (always 0 or 1 \u2014 the project-level security policies covering password rules, session behavior, user limits, and membership privacy).", + "x-example": 1, + "format": "int32" + }, + "smtp": { + "type": "integer", + "description": "Number of SMTP configurations to be migrated (always 0 or 1 \u2014 the project-level custom SMTP settings; password is not exposed by the source API).", + "x-example": 1, + "format": "int32" + }, + "rule": { + "type": "integer", + "description": "Number of custom-domain proxy rules to be migrated. Auto-generated `.appwrite.network` rules are skipped \u2014 they are recreated by parent Function\/Site migration.", + "x-example": 5, + "format": "int32" + }, + "project-email-template": { + "type": "integer", + "description": "Number of custom email templates to be migrated (one per templateId \u00d7 locale pair).", + "x-example": 7, + "format": "int32" + }, + "site": { + "type": "integer", + "description": "Number of sites to be migrated.", + "x-example": 5, + "format": "int32" + }, + "provider": { + "type": "integer", + "description": "Number of providers to be migrated.", + "x-example": 5, + "format": "int32" + }, + "topic": { + "type": "integer", + "description": "Number of topics to be migrated.", + "x-example": 10, + "format": "int32" + }, + "subscriber": { + "type": "integer", + "description": "Number of subscribers to be migrated.", + "x-example": 100, + "format": "int32" + }, + "message": { + "type": "integer", + "description": "Number of messages to be migrated.", + "x-example": 50, + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of files to be migrated in mb.", + "x-example": 30000, + "format": "int32" + }, + "version": { "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" + "description": "Version of the Appwrite instance to be migrated.", + "x-example": "1.4.0" + }, + "oauth2-provider": { + "type": "integer", + "description": "Number of OAuth2 provider configurations to be migrated. Secrets (clientSecret, p8File) are never migrated \u2014 destination admin must re-enter them per provider.", + "x-example": 5, + "format": "int32" + }, + "backup-policy": { + "type": "integer", + "description": "Number of backup policies to be migrated.", + "x-example": 5, + "format": "int32" } }, "required": [ - "memory", - "cpus", - "enabled", - "slug" + "user", + "team", + "database", + "row", + "file", + "bucket", + "function", + "platform", + "api-key", + "project-variable", + "webhook", + "auth-methods", + "project-protocols", + "project-labels", + "project-services", + "policies", + "smtp", + "rule", + "project-email-template", + "site", + "provider", + "topic", + "subscriber", + "message", + "size", + "version", + "oauth2-provider", + "backup-policy" ], "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" + "user": 20, + "team": 20, + "database": 20, + "row": 20, + "file": 20, + "bucket": 20, + "function": 20, + "platform": 5, + "api-key": 5, + "project-variable": 5, + "webhook": 5, + "auth-methods": 1, + "project-protocols": 1, + "project-labels": 1, + "project-services": 1, + "policies": 1, + "smtp": 1, + "rule": 5, + "project-email-template": 7, + "site": 5, + "provider": 5, + "topic": 10, + "subscriber": 100, + "message": 50, + "size": 30000, + "version": "1.4.0", + "oauth2-provider": 5, + "backup-policy": 5 } }, - "proxyRule": { - "description": "Rule", + "insight": { + "description": "Insight", "type": "object", "properties": { "$id": { "type": "string", - "description": "Rule ID.", + "description": "Insight ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Rule creation date in ISO 8601 format.", + "description": "Insight 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.", + "description": "Insight update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "domain": { + "reportId": { "type": "string", - "description": "Domain name.", - "x-example": "appwrite.company.com" + "description": "Parent report ID. Insights always belong to a report.", + "x-example": "5e5ea5c16897e" }, "type": { "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", - "x-example": "deployment" + "description": "Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).", + "x-example": "tablesDBIndex" }, - "trigger": { + "severity": { "type": "string", - "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", - "x-example": "manual" + "description": "Insight severity. One of info, warning, critical.", + "x-example": "warning" }, - "redirectUrl": { + "status": { "type": "string", - "description": "URL to redirect to. Used if type is \"redirect\"", - "x-example": "https:\/\/appwrite.io\/docs" + "description": "Insight status. One of active, dismissed.", + "x-example": "active" }, - "redirectStatusCode": { - "type": "integer", - "description": "Status code to apply during redirect. Used if type is \"redirect\"", - "x-example": 301, - "format": "int32" + "resourceType": { + "type": "string", + "description": "Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.", + "x-example": "databases" }, - "deploymentId": { + "resourceId": { "type": "string", - "description": "ID of deployment. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" + "description": "ID of the resource the insight is about.", + "x-example": "main" }, - "deploymentResourceType": { + "parentResourceType": { "type": "string", - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function", - "enum": [ - "function", - "site" - ], - "nullable": true + "description": "Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table \u2192 resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.", + "x-example": "tables" }, - "deploymentResourceId": { + "parentResourceId": { "type": "string", - "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" + "description": "ID of the parent resource. Empty when the resource has no parent.", + "x-example": "orders" }, - "deploymentVcsProviderBranch": { + "title": { "type": "string", - "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "main" + "description": "Insight title.", + "x-example": "Missing index on collection orders" }, - "status": { + "summary": { "type": "string", - "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", - "x-example": "verified", - "enum": [ - "unverified", - "verifying", - "verified" - ] + "description": "Short markdown summary describing the insight.", + "x-example": "Queries against `orders.status` are scanning the full collection." }, - "logs": { + "ctas": { + "type": "array", + "description": "List of call-to-action buttons attached to this insight.", + "items": { + "$ref": "#\/components\/schemas\/insightCTA" + }, + "x-example": [] + }, + "analyzedAt": { "type": "string", - "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", - "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + "description": "Time the insight was analyzed in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "renewAt": { + "dismissedAt": { "type": "string", - "description": "Certificate auto-renewal date in ISO 8601 format.", - "x-example": "datetime" + "description": "Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "dismissedBy": { + "type": "string", + "description": "User ID that dismissed the insight. Empty when not dismissed.", + "x-example": "5e5ea5c16897e", + "nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "domain", + "reportId", "type", - "trigger", - "redirectUrl", - "redirectStatusCode", - "deploymentId", - "deploymentResourceId", - "deploymentVcsProviderBranch", + "severity", "status", - "logs", - "renewAt" + "resourceType", + "resourceId", + "parentResourceType", + "parentResourceId", + "title", + "summary", + "ctas" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domain": "appwrite.company.com", - "type": "deployment", - "trigger": "manual", - "redirectUrl": "https:\/\/appwrite.io\/docs", - "redirectStatusCode": 301, - "deploymentId": "n3u9feiwmf", - "deploymentResourceType": "function", - "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "main", - "status": "verified", - "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", - "renewAt": "datetime" + "reportId": "5e5ea5c16897e", + "type": "tablesDBIndex", + "severity": "warning", + "status": "active", + "resourceType": "databases", + "resourceId": "main", + "parentResourceType": "tables", + "parentResourceId": "orders", + "title": "Missing index on collection orders", + "summary": "Queries against `orders.status` are scanning the full collection.", + "ctas": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedBy": "5e5ea5c16897e" } }, - "schedule": { - "description": "Schedule", + "insightCTA": { + "description": "InsightCTA", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Schedule ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Schedule creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Schedule update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "resourceType": { - "type": "string", - "description": "The resource type associated with this schedule.", - "x-example": "function" - }, - "resourceId": { - "type": "string", - "description": "The resource ID associated with this schedule.", - "x-example": "5e5ea5c16897e" - }, - "resourceUpdatedAt": { + "label": { "type": "string", - "description": "Change-tracking timestamp used by the scheduler to detect resource changes in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Human-readable label for the CTA, used in UI.", + "x-example": "Create missing index" }, - "projectId": { + "service": { "type": "string", - "description": "The project ID associated with this schedule.", - "x-example": "5e5ea5c16897e" + "description": "Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource \u2014 for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.", + "x-example": "tablesDB" }, - "schedule": { + "method": { "type": "string", - "description": "The CRON schedule expression.", - "x-example": "5 4 * * *" + "description": "Public API method on the chosen service the client should invoke when this CTA is triggered.", + "x-example": "createIndex" }, - "data": { + "params": { "type": "object", "additionalProperties": true, - "description": "Schedule data used to store resource-specific context needed for execution.", - "x-example": [] - }, - "active": { - "type": "boolean", - "description": "Whether the schedule is active.", - "x-example": true - }, - "region": { - "type": "string", - "description": "The region where the schedule is deployed.", - "x-example": "fra" + "description": "Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId\/tableId\/columns for tablesDB, databaseId\/collectionId\/attributes for the legacy Databases API).", + "x-example": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "resourceType", - "resourceId", - "resourceUpdatedAt", - "projectId", - "schedule", - "data", - "active", - "region" + "label", + "service", + "method", + "params" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "resourceType": "function", - "resourceId": "5e5ea5c16897e", - "resourceUpdatedAt": "2020-10-15T06:38:00.000+00:00", - "projectId": "5e5ea5c16897e", - "schedule": "5 4 * * *", - "data": [], - "active": true, - "region": "fra" + "label": "Create missing index", + "service": "tablesDB", + "method": "createIndex", + "params": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } } }, - "emailTemplate": { - "description": "EmailTemplate", + "report": { + "description": "Report", "type": "object", "properties": { - "templateId": { + "$id": { "type": "string", - "description": "Template type", - "x-example": "verification" + "description": "Report ID.", + "x-example": "5e5ea5c16897e" }, - "locale": { + "$createdAt": { "type": "string", - "description": "Template locale", - "x-example": "en_us" + "description": "Report creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "message": { + "$updatedAt": { "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." + "description": "Report update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "senderName": { + "appId": { "type": "string", - "description": "Name of the sender", - "x-example": "My User" + "description": "ID of the third-party app that submitted the report.", + "x-example": "5e5ea5c16897e" }, - "senderEmail": { + "type": { "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" + "description": "Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.", + "x-example": "lighthouse" }, - "replyToEmail": { + "title": { "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" + "description": "Short, human-readable title for the report.", + "x-example": "Lighthouse audit for https:\/\/appwrite.io\/" }, - "replyToName": { + "summary": { "type": "string", - "description": "Reply to name", - "x-example": "Support Team" + "description": "Markdown summary describing the report.", + "x-example": "Performance score 78. 4 opportunities found." }, - "subject": { + "targetType": { "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" + "description": "Plural noun describing what the report analyzes, e.g. databases, sites, urls.", + "x-example": "urls" + }, + "target": { + "type": "string", + "description": "Free-form target identifier (URL for lighthouse, resource ID for db).", + "x-example": "https:\/\/appwrite.io\/" + }, + "categories": { + "type": "array", + "description": "Categories covered by the report, e.g. performance, accessibility.", + "items": { + "type": "string" + }, + "x-example": [ + "performance", + "accessibility" + ] + }, + "insights": { + "type": "array", + "description": "Insights nested under this report.", + "items": { + "$ref": "#\/components\/schemas\/insight" + }, + "x-example": [] + }, + "analyzedAt": { + "type": "string", + "description": "Time the report was analyzed in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" + "$id", + "$createdAt", + "$updatedAt", + "appId", + "type", + "title", + "summary", + "targetType", + "target", + "categories", + "insights" ], "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "type": "lighthouse", + "title": "Lighthouse audit for https:\/\/appwrite.io\/", + "summary": "Performance score 78. 4 opportunities found.", + "targetType": "urls", + "target": "https:\/\/appwrite.io\/", + "categories": [ + "performance", + "accessibility" + ], + "insights": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00" } }, - "consoleVariables": { - "description": "Console Variables", + "activityEvent": { + "description": "ActivityEvent", "type": "object", "properties": { - "_APP_DOMAIN_TARGET_CNAME": { + "$id": { "type": "string", - "description": "CNAME target for your Appwrite custom domains.", - "x-example": "appwrite.io" + "description": "Event ID.", + "x-example": "5e5ea5c16897e" }, - "_APP_DOMAIN_TARGET_A": { + "actorType": { "type": "string", - "description": "A target for your Appwrite custom domains.", - "x-example": "127.0.0.1" - }, - "_APP_COMPUTE_BUILD_TIMEOUT": { - "type": "integer", - "description": "Maximum build timeout in seconds.", - "x-example": 900, - "format": "int32" + "description": "Actor type.", + "x-example": "user" }, - "_APP_DOMAIN_TARGET_AAAA": { + "actorId": { "type": "string", - "description": "AAAA target for your Appwrite custom domains.", - "x-example": "::1" + "description": "Actor ID.", + "x-example": "610fc2f985ee0" }, - "_APP_DOMAIN_TARGET_CAA": { + "actorEmail": { "type": "string", - "description": "CAA target for your Appwrite custom domains.", - "x-example": "digicert.com" - }, - "_APP_STORAGE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for file upload in bytes.", - "x-example": "30000000", - "format": "int32" - }, - "_APP_COMPUTE_SIZE_LIMIT": { - "type": "integer", - "description": "Maximum file size allowed for deployment in bytes.", - "x-example": "30000000", - "format": "int32" + "description": "Actor Email.", + "x-example": "john@appwrite.io" }, - "_APP_USAGE_STATS": { + "actorName": { "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 + "description": "Actor Name.", + "x-example": "John Doe" }, - "_APP_DOMAIN_SITES": { + "resourceParent": { "type": "string", - "description": "A comma separated list of domains to use for site URLs.", - "x-example": "sites.localhost,sites.example.com" + "description": "Resource parent.", + "x-example": "database\/ID" }, - "_APP_DOMAIN_FUNCTIONS": { + "resourceType": { "type": "string", - "description": "A domain to use for function URLs.", - "x-example": "functions.localhost" + "description": "Resource type.", + "x-example": "collection" }, - "_APP_OPTIONS_FORCE_HTTPS": { + "resourceId": { "type": "string", - "description": "Defines if HTTPS is enforced for all requests.", - "x-example": "enabled" + "description": "Resource ID.", + "x-example": "610fc2f985ee0" }, - "_APP_DOMAINS_NAMESERVERS": { + "resource": { "type": "string", - "description": "Comma-separated list of nameservers.", - "x-example": "ns1.example.com,ns2.example.com" + "description": "Resource.", + "x-example": "collections\/610fc2f985ee0" }, - "_APP_DB_ADAPTER": { + "event": { "type": "string", - "description": "Database adapter in use.", - "x-example": "mysql" - }, - "supportForRelationships": { - "type": "boolean", - "description": "Whether the database adapter supports relationships.", - "x-example": true - }, - "supportForOperators": { - "type": "boolean", - "description": "Whether the database adapter supports operators.", - "x-example": true + "description": "Event name.", + "x-example": "account.sessions.create" }, - "supportForSpatials": { - "type": "boolean", - "description": "Whether the database adapter supports spatial attributes.", - "x-example": true + "userAgent": { + "type": "string", + "description": "User agent.", + "x-example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36" }, - "supportForSpatialIndexNull": { - "type": "boolean", - "description": "Whether the database adapter supports spatial indexes on nullable columns.", - "x-example": false + "ip": { + "type": "string", + "description": "IP address.", + "x-example": "127.0.0.1" }, - "supportForFulltextWildcard": { - "type": "boolean", - "description": "Whether the database adapter supports fulltext wildcard search.", - "x-example": true + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" }, - "supportForMultipleFulltextIndexes": { - "type": "boolean", - "description": "Whether the database adapter supports multiple fulltext indexes per collection.", - "x-example": true + "country": { + "type": "string", + "description": "Location.", + "x-example": "US" }, - "supportForAttributeResizing": { - "type": "boolean", - "description": "Whether the database adapter supports resizing attributes.", - "x-example": true + "continentCode": { + "type": "string", + "description": "Continent code.", + "x-example": "NA" }, - "supportForSchemas": { - "type": "boolean", - "description": "Whether the database adapter supports fixed schemas with row width limits.", - "x-example": true + "city": { + "type": "string", + "description": "City name.", + "x-example": "Mountain View" }, - "maxIndexLength": { - "type": "integer", - "description": "Maximum index length supported by the database adapter.", - "x-example": 768, - "format": "int32" + "subdivisions": { + "type": "string", + "description": "Region\/state chain.", + "x-example": "California" }, - "supportForIntegerIds": { - "type": "boolean", - "description": "Whether the database adapter uses integer sequence IDs.", - "x-example": true + "isp": { + "type": "string", + "description": "Internet service provider.", + "x-example": "Google" }, - "_APP_CONSOLE_EMAIL_VERIFICATION": { + "autonomousSystemNumber": { "type": "string", - "description": "Whether email verification for console users is required. Can be \"true\" or \"false\".", - "x-example": "true" - } - }, - "required": [ - "_APP_DOMAIN_TARGET_CNAME", - "_APP_DOMAIN_TARGET_A", - "_APP_COMPUTE_BUILD_TIMEOUT", - "_APP_DOMAIN_TARGET_AAAA", - "_APP_DOMAIN_TARGET_CAA", - "_APP_STORAGE_LIMIT", - "_APP_COMPUTE_SIZE_LIMIT", - "_APP_USAGE_STATS", - "_APP_VCS_ENABLED", - "_APP_DOMAIN_ENABLED", - "_APP_ASSISTANT_ENABLED", - "_APP_DOMAIN_SITES", - "_APP_DOMAIN_FUNCTIONS", - "_APP_OPTIONS_FORCE_HTTPS", - "_APP_DOMAINS_NAMESERVERS", - "_APP_DB_ADAPTER", - "supportForRelationships", - "supportForOperators", - "supportForSpatials", - "supportForSpatialIndexNull", - "supportForFulltextWildcard", - "supportForMultipleFulltextIndexes", - "supportForAttributeResizing", - "supportForSchemas", - "maxIndexLength", - "supportForIntegerIds", - "_APP_CONSOLE_EMAIL_VERIFICATION" - ], - "example": { - "_APP_DOMAIN_TARGET_CNAME": "appwrite.io", - "_APP_DOMAIN_TARGET_A": "127.0.0.1", - "_APP_COMPUTE_BUILD_TIMEOUT": 900, - "_APP_DOMAIN_TARGET_AAAA": "::1", - "_APP_DOMAIN_TARGET_CAA": "digicert.com", - "_APP_STORAGE_LIMIT": "30000000", - "_APP_COMPUTE_SIZE_LIMIT": "30000000", - "_APP_USAGE_STATS": "enabled", - "_APP_VCS_ENABLED": true, - "_APP_DOMAIN_ENABLED": true, - "_APP_ASSISTANT_ENABLED": true, - "_APP_DOMAIN_SITES": "sites.localhost,sites.example.com", - "_APP_DOMAIN_FUNCTIONS": "functions.localhost", - "_APP_OPTIONS_FORCE_HTTPS": "enabled", - "_APP_DOMAINS_NAMESERVERS": "ns1.example.com,ns2.example.com", - "_APP_DB_ADAPTER": "mysql", - "supportForRelationships": true, - "supportForOperators": true, - "supportForSpatials": true, - "supportForSpatialIndexNull": false, - "supportForFulltextWildcard": true, - "supportForMultipleFulltextIndexes": true, - "supportForAttributeResizing": true, - "supportForSchemas": true, - "maxIndexLength": 768, - "supportForIntegerIds": true, - "_APP_CONSOLE_EMAIL_VERIFICATION": "true" - } - }, - "consoleOAuth2ProviderParameter": { - "description": "Console OAuth2 Provider Parameter", - "type": "object", - "properties": { - "$id": { + "description": "Autonomous System Number (ASN).", + "x-example": "15169" + }, + "autonomousSystemOrganization": { "type": "string", - "description": "Parameter ID. Maps to the request body field used by the project OAuth2 update endpoint (e.g. `clientId`, `appKey`, `tenant`).", - "x-example": "clientId" + "description": "Organization that owns the ASN.", + "x-example": "GOOGLE" }, - "name": { + "connectionType": { "type": "string", - "description": "Verbose, user-facing parameter name as shown in the provider's own dashboard. Includes alternate names when the provider exposes more than one.", - "x-example": "Client ID or App ID" + "description": "Connection type (e.g. cable, cellular, corporate).", + "x-example": "cable" }, - "example": { + "connectionUsageType": { "type": "string", - "description": "Example value for this parameter.", - "x-example": "e4d87900000000540733" + "description": "User type (e.g. residential, business, hosting).", + "x-example": "residential" }, - "hint": { + "connectionOrganization": { "type": "string", - "description": "Optional hint for this parameter, typically calling out a common wrong value. Empty string when no hint is set.", - "x-example": "Example of wrong value: 370006" - } - }, - "required": [ - "$id", - "name", - "example", - "hint" - ], - "example": { - "$id": "clientId", - "name": "Client ID or App ID", - "example": "e4d87900000000540733", - "hint": "Example of wrong value: 370006" - } - }, - "consoleOAuth2Provider": { - "description": "Console OAuth2 Provider", - "type": "object", - "properties": { - "$id": { + "description": "Registered organization of the IP.", + "x-example": "Google LLC" + }, + "time": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "parameters": { - "type": "array", - "description": "List of parameters required to configure this OAuth2 provider.", - "items": { - "$ref": "#\/components\/schemas\/consoleOAuth2ProviderParameter" - }, - "x-example": "" - } - }, - "required": [ - "$id", - "parameters" - ], - "example": { - "$id": "github", - "parameters": "" - } - }, - "consoleOAuth2ProviderList": { - "description": "Console OAuth2 Providers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of OAuth2 providers exposed by the server.", - "x-example": 5, - "format": "int32" + "projectId": { + "type": "string", + "description": "Project ID.", + "x-example": "610fc2f985ee0" }, - "oAuth2Providers": { - "type": "array", - "description": "List of OAuth2 providers, each with the parameters required to configure it.", - "items": { - "$ref": "#\/components\/schemas\/consoleOAuth2Provider" - }, - "x-example": "" - } - }, - "required": [ - "total", - "oAuth2Providers" - ], - "example": { - "total": 5, - "oAuth2Providers": "" - } - }, - "consoleKeyScope": { - "description": "Console Key Scope", - "type": "object", - "properties": { - "$id": { + "teamId": { "type": "string", - "description": "Scope ID.", - "x-example": "users.read" + "description": "Team ID.", + "x-example": "610fc2f985ee0" }, - "description": { + "hostname": { "type": "string", - "description": "Scope description.", - "x-example": "Access to read your project's users" + "description": "Hostname.", + "x-example": "appwrite.io" }, - "category": { + "sdk": { "type": "string", - "description": "Scope category.", - "x-example": "Auth" + "description": "Name of the SDK that triggered the event.", + "x-example": "web" }, - "deprecated": { - "type": "boolean", - "description": "Scope is deprecated.", - "x-example": true + "sdkVersion": { + "type": "string", + "description": "Version of the SDK that triggered the event.", + "x-example": "14.0.0" } }, "required": [ "$id", - "description", - "category", - "deprecated" + "actorType", + "actorId", + "actorEmail", + "actorName", + "resourceParent", + "resourceType", + "resourceId", + "resource", + "event", + "userAgent", + "ip", + "mode", + "country", + "continentCode", + "city", + "subdivisions", + "isp", + "autonomousSystemNumber", + "autonomousSystemOrganization", + "connectionType", + "connectionUsageType", + "connectionOrganization", + "time", + "projectId", + "teamId", + "hostname", + "sdk", + "sdkVersion" ], "example": { - "$id": "users.read", - "description": "Access to read your project's users", - "category": "Auth", - "deprecated": true + "$id": "5e5ea5c16897e", + "actorType": "user", + "actorId": "610fc2f985ee0", + "actorEmail": "john@appwrite.io", + "actorName": "John Doe", + "resourceParent": "database\/ID", + "resourceType": "collection", + "resourceId": "610fc2f985ee0", + "resource": "collections\/610fc2f985ee0", + "event": "account.sessions.create", + "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36", + "ip": "127.0.0.1", + "mode": "admin", + "country": "US", + "continentCode": "NA", + "city": "Mountain View", + "subdivisions": "California", + "isp": "Google", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC", + "time": "2020-10-15T06:38:00.000+00:00", + "projectId": "610fc2f985ee0", + "teamId": "610fc2f985ee0", + "hostname": "appwrite.io", + "sdk": "web", + "sdkVersion": "14.0.0" } }, - "consoleKeyScopeList": { - "description": "Console Key Scopes List", + "additionalResource": { + "description": "AdditionalResource", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of key scopes exposed by the server.", + "name": { + "type": "string", + "description": "Resource name", + "x-example": "" + }, + "unit": { + "type": "string", + "description": "Resource unit", + "x-example": "GB" + }, + "currency": { + "type": "string", + "description": "Price currency", + "x-example": "USD" + }, + "price": { + "type": "number", + "description": "Price", "x-example": 5, + "format": "double" + }, + "value": { + "type": "integer", + "description": "Resource value", + "x-example": 25, "format": "int32" }, - "scopes": { - "type": "array", - "description": "List of key scopes, each with its ID and description.", - "items": { - "$ref": "#\/components\/schemas\/consoleKeyScope" - }, + "invoiceDesc": { + "type": "string", + "description": "Description on invoice", "x-example": "" } }, "required": [ - "total", - "scopes" + "name", + "unit", + "currency", + "price", + "value", + "invoiceDesc" ], "example": { - "total": 5, - "scopes": "" + "name": "", + "unit": "GB", + "currency": "USD", + "price": 5, + "value": 25, + "invoiceDesc": "" } }, - "mfaChallenge": { - "description": "MFA Challenge", + "addon": { + "description": "Addon", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "Addon ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Token creation date in ISO 8601 format.", + "description": "Addon creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "expire": { + "$updatedAt": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", + "description": "Addon update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "userId", - "expire" - ], - "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" - } - }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", - "type": "object", - "properties": { - "recoveryCodes": { + }, + "$permissions": { "type": "array", - "description": "Recovery codes.", + "description": "Addon permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { "type": "string" }, "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" + "read(\"any\")" ] - } - }, - "required": [ - "recoveryCodes" - ], - "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] - } - }, - "mfaType": { - "description": "MFAType", - "type": "object", - "properties": { - "secret": { + }, + "key": { "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" + "description": "Addon key", + "x-example": "baa" }, - "uri": { + "resourceType": { "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + "description": "Resource type (organization or project)", + "x-example": "organization" + }, + "resourceId": { + "type": "string", + "description": "Resource ID", + "x-example": "5e5ea5c16897e" + }, + "status": { + "type": "string", + "description": "Payment status. Possible values: pending (awaiting payment confirmation e.g. 3DS), active (payment confirmed and addon is running).", + "x-example": "active" + }, + "currentValue": { + "type": "integer", + "description": "Current value for this billing cycle. For toggle addons: 1 (on) or 0 (off). For numeric addons: the active quantity.", + "x-example": 1, + "format": "int32" + }, + "nextValue": { + "type": "integer", + "description": "Value to apply at the start of the next billing cycle. Null means no change is scheduled. For toggle addons, 0 means the addon will be removed at the next cycle.", + "x-example": null, + "format": "int32", + "nullable": true } }, "required": [ - "secret", - "uri" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "key", + "resourceType", + "resourceId", + "status", + "currentValue" ], "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "key": "baa", + "resourceType": "organization", + "resourceId": "5e5ea5c16897e", + "status": "active", + "currentValue": 1, + "nextValue": null } }, - "mfaFactors": { - "description": "MFAFactors", + "addonPrice": { + "description": "AddonPrice", "type": "object", "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true + "addonKey": { + "type": "string", + "description": "Addon key.", + "x-example": "baa" }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true + "name": { + "type": "string", + "description": "Addon display name.", + "x-example": "HIPAA BAA" }, - "email": { - "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", - "x-example": true + "monthlyPrice": { + "type": "number", + "description": "Full monthly price of the addon.", + "x-example": 350, + "format": "double" }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true + "proratedAmount": { + "type": "number", + "description": "Calculated prorated amount for the current billing cycle.", + "x-example": 175.5, + "format": "double" + }, + "remainingDays": { + "type": "integer", + "description": "Days remaining in the current billing cycle.", + "x-example": 15, + "format": "int32" + }, + "totalCycleDays": { + "type": "integer", + "description": "Total days in the billing cycle.", + "x-example": 30, + "format": "int32" + }, + "currency": { + "type": "string", + "description": "Currency code.", + "x-example": "USD" + }, + "billingCycleEnd": { + "type": "string", + "description": "When the current billing cycle ends.", + "x-example": "2024-02-01T00:00:00.000+00:00" } }, "required": [ - "totp", - "phone", - "email", - "recoveryCode" + "addonKey", + "name", + "monthlyPrice", + "proratedAmount", + "remainingDays", + "totalCycleDays", + "currency", + "billingCycleEnd" ], "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true + "addonKey": "baa", + "name": "HIPAA BAA", + "monthlyPrice": 350, + "proratedAmount": 175.5, + "remainingDays": 15, + "totalCycleDays": 30, + "currency": "USD", + "billingCycleEnd": "2024-02-01T00:00:00.000+00:00" } }, - "provider": { - "description": "Provider", + "aggregationBreakdown": { + "description": "Breakdown", "type": "object", "properties": { "$id": { "type": "string", - "description": "Provider ID.", + "description": "Aggregation ID.", "x-example": "5e5ea5c16897e" }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, "name": { "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" - }, - "provider": { - "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" - }, - "enabled": { - "type": "boolean", - "description": "Is provider enabled?", - "x-example": true + "description": "Project name", + "x-example": "" }, - "type": { + "region": { "type": "string", - "description": "Type of provider.", - "x-example": "sms" + "description": "Project region", + "x-example": "fra" }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } + "amount": { + "type": "integer", + "description": "Aggregated amount", + "x-example": 2, + "format": "int32" }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } + "resources": { + "type": "array", + "description": "", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "x-example": "" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", "name", - "provider", - "enabled", - "type", - "credentials" + "region", + "amount", + "resources" ], "example": { "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } + "name": "", + "region": "fra", + "amount": 2, + "resources": "" } }, - "message": { - "description": "Message", + "aggregationTeam": { + "description": "Team", "type": "object", "properties": { "$id": { "type": "string", - "description": "Message ID.", + "description": "Aggregation ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Message creation time in ISO 8601 format.", + "description": "Aggregation creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Message update date in ISO 8601 format.", + "description": "Aggregation update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] - }, - "users": { + "$permissions": { "type": "array", - "description": "User IDs set as recipients.", + "description": "Aggregation permissions. [Learn more about permissions](\/docs\/permissions).", "items": { "type": "string" }, "x-example": [ - "5e5ea5c16897e" + "read(\"any\")" ] }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" - ] + "from": { + "type": "string", + "description": "Beginning date of the invoice", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "scheduledAt": { + "to": { "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "End date of the invoice", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "usageStorage": { + "type": "integer", + "description": "Total storage usage", + "x-example": 20009090, + "format": "int32" + }, + "usageTotalStorage": { + "type": "integer", + "description": "Total storage usage with builds storage", + "x-example": 20009090, + "format": "int32" + }, + "usageFilesStorage": { + "type": "integer", + "description": "Total files storage usage", + "x-example": 20009090, + "format": "int32" + }, + "usageDeploymentsStorage": { + "type": "integer", + "description": "Total deployments storage usage", + "x-example": 20009090, + "format": "int32" + }, + "usageBuildsStorage": { + "type": "integer", + "description": "Total builds storage usage", + "x-example": 20009090, + "format": "int32" + }, + "usageDatabasesStorage": { + "type": "integer", + "description": "Total databases storage usage", + "x-example": 2009090, + "format": "int32" + }, + "usageUsers": { + "type": "integer", + "description": "Total active users for the billing period", + "x-example": 2000, + "format": "int32" + }, + "usageExecutions": { + "type": "integer", + "description": "Total number of executions for the billing period", + "x-example": 2000, + "format": "int32" + }, + "usageBandwidth": { + "type": "integer", + "description": "Total bandwidth usage for the billing period", + "x-example": 2000, + "format": "int32" + }, + "usageRealtime": { + "type": "integer", + "description": "Peak concurrent realtime connections for the billing period", + "x-example": 200, + "format": "int32" + }, + "usageRealtimeMessages": { + "type": "integer", + "description": "Total realtime messages sent for the billing period", + "x-example": 10000, + "format": "int32" + }, + "usageRealtimeBandwidth": { + "type": "integer", + "description": "Total realtime bandwidth usage for the billing period", + "x-example": 5000000, + "format": "int32" + }, + "additionalMembers": { + "type": "integer", + "description": "Additional members", + "x-example": 5, + "format": "int32" + }, + "additionalMemberAmount": { + "type": "integer", + "description": "Additional members cost", + "x-example": 30, + "format": "int32" + }, + "additionalStorageAmount": { + "type": "integer", + "description": "Additional storage usage cost", + "x-example": 40, + "format": "int32" + }, + "additionalUsersAmount": { + "type": "integer", + "description": "Additional users usage cost.", + "x-example": 4, + "format": "int32" + }, + "additionalExecutionsAmount": { + "type": "integer", + "description": "Additional executions usage cost", + "x-example": 30, + "format": "int32" + }, + "additionalBandwidthAmount": { + "type": "integer", + "description": "Additional bandwidth usage cost", + "x-example": 40, + "format": "int32" + }, + "additionalRealtimeAmount": { + "type": "integer", + "description": "Additional realtime usage cost", + "x-example": 20, + "format": "int32" }, - "deliveredAt": { + "plan": { "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "nullable": true + "description": "Billing plan", + "x-example": "tier-0" }, - "deliveredTotal": { + "amount": { "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, + "description": "Aggregated amount", + "x-example": 2, "format": "int32" }, - "data": { - "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } + "breakdown": { + "type": "array", + "description": "Aggregation project breakdown", + "items": { + "$ref": "#\/components\/schemas\/aggregationBreakdown" + }, + "x-example": [] }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" - ] + "resources": { + "type": "array", + "description": "Usage resources", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "x-example": [] } }, "required": [ "$id", "$createdAt", "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" + "$permissions", + "from", + "to", + "usageStorage", + "usageTotalStorage", + "usageFilesStorage", + "usageDeploymentsStorage", + "usageBuildsStorage", + "usageDatabasesStorage", + "usageUsers", + "usageExecutions", + "usageBandwidth", + "usageRealtime", + "usageRealtimeMessages", + "usageRealtimeBandwidth", + "additionalMembers", + "additionalMemberAmount", + "additionalStorageAmount", + "additionalUsersAmount", + "additionalExecutionsAmount", + "additionalBandwidthAmount", + "additionalRealtimeAmount", + "plan", + "amount", + "breakdown", + "resources" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + "$permissions": [ + "read(\"any\")" ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - }, - "status": "processing" + "from": "2020-10-15T06:38:00.000+00:00", + "to": "2020-10-15T06:38:00.000+00:00", + "usageStorage": 20009090, + "usageTotalStorage": 20009090, + "usageFilesStorage": 20009090, + "usageDeploymentsStorage": 20009090, + "usageBuildsStorage": 20009090, + "usageDatabasesStorage": 2009090, + "usageUsers": 2000, + "usageExecutions": 2000, + "usageBandwidth": 2000, + "usageRealtime": 200, + "usageRealtimeMessages": 10000, + "usageRealtimeBandwidth": 5000000, + "additionalMembers": 5, + "additionalMemberAmount": 30, + "additionalStorageAmount": 40, + "additionalUsersAmount": 4, + "additionalExecutionsAmount": 30, + "additionalBandwidthAmount": 40, + "additionalRealtimeAmount": 20, + "plan": "tier-0", + "amount": 2, + "breakdown": [], + "resources": [] } }, - "topic": { - "description": "Topic", + "backupArchive": { + "description": "Archive", "type": "object", "properties": { "$id": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "Archive ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Topic creation time in ISO 8601 format.", + "description": "Archive creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Topic update date in ISO 8601 format.", + "description": "Archive update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { + "policyId": { "type": "string", - "description": "The name of the topic.", - "x-example": "events" + "description": "Archive policy ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "emailTotal": { + "size": { "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, + "description": "Archive size in bytes.", + "x-example": 100000, "format": "int32" }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" + "status": { + "type": "string", + "description": "The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.", + "x-example": "completed" }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" + "startedAt": { + "type": "string", + "description": "The backup start time.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "subscribe": { + "migrationId": { + "type": "string", + "description": "Migration ID.", + "x-example": "did8jx6ws45jana098ab7" + }, + "services": { "type": "array", - "description": "Subscribe permissions.", + "description": "The services that are backed up by this archive.", "items": { "type": "string" }, - "x-example": "users" + "x-example": "['databases', 'storage']" + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this archive.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'collections', 'attributes', 'indexes']" + }, + "resourceId": { + "type": "string", + "description": "The resource ID to backup. Set only if this archive should backup a single resource.", + "x-example": "DB1", + "nullable": true + }, + "resourceType": { + "type": "string", + "description": "The resource type to backup. Set only if this archive should backup a single resource.", + "x-example": "database", + "nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" + "policyId", + "size", + "status", + "startedAt", + "migrationId", + "services", + "resources" ], "example": { - "$id": "259125845563242502", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" + "policyId": "did8jx6ws45jana098ab7", + "size": 100000, + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database" } }, - "transaction": { - "description": "Transaction", + "dedicatedDatabaseBackup": { + "description": "Backup", "type": "object", "properties": { "$id": { "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" + "description": "Backup ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Transaction creation time in ISO 8601 format.", + "description": "Backup creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "databaseId": { "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database ID this backup belongs to.", + "x-example": "5e5ea5c16897e" }, - "status": { + "projectId": { "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" + "policyId": { + "type": "string", + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" }, - "expiresAt": { + "trigger": { "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" + }, + "type": { "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", + "x-example": "full" }, - "$createdAt": { + "requestedType": { "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Backup type that was requested. Differs from `type` when the backend could not run the requested type and took a different one instead, in which case `fallbackReason` explains why. Empty for backups taken before the requested type was recorded.", + "x-example": "incremental" }, - "$updatedAt": { + "fallbackReason": { "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Why the backend ran a different backup type than the one requested. Empty when the backup ran as requested.", + "x-example": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls." }, - "targetId": { + "status": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "Backup status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error), verified (integrity check passed).", + "x-example": "completed" }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/target" - } - ] + "sizeBytes": { + "type": "integer", + "description": "Backup size in bytes.", + "x-example": 1073741824, + "format": "int32" }, - "userId": { + "startedAt": { "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" + "description": "Backup start time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "userName": { + "completedAt": { "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" + "description": "Backup completion time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "topicId": { + "verifiedAt": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "Backup verification time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "providerType": { + "expiresAt": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "Backup expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "logPosition": { + "type": "string", + "description": "Transaction-log position the backup anchors at, in the engine's own notation: PostgreSQL `{walSegment}|{lsn}`, MySQL and MariaDB `{binlogFile}|{offset}`, MongoDB `{seconds}|{increment}`. Empty when the backup recorded no position, which is the case for backup types that carry none.", + "x-example": "000000010000000000000003|0\/3000148", + "nullable": true + }, + "error": { + "type": "string", + "description": "Error message if backup failed.", + "x-example": "" } }, "required": [ "$id", "$createdAt", - "$updatedAt", - "targetId", - "target", - "userId", - "userName", - "topicId", - "providerType" + "databaseId", + "projectId", + "policyId", + "trigger", + "type", + "requestedType", + "fallbackReason", + "status", + "sizeBytes", + "error" ], "example": { - "$id": "259125845563242502", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, - "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" + "databaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", + "type": "full", + "requestedType": "incremental", + "fallbackReason": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls.", + "status": "completed", + "sizeBytes": 1073741824, + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "verifiedAt": "2020-10-15T06:38:00.000+00:00", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "logPosition": "000000010000000000000003|0\/3000148", + "error": "" } }, - "target": { - "description": "Target", + "dedicatedDatabaseBackupList": { + "description": "BackupList", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Target creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Target update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "total": { + "type": "integer", + "description": "Total number of backups.", + "x-example": 5, + "format": "int32" }, - "name": { + "backups": { + "type": "array", + "description": "List of backups.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + }, + "x-example": [] + } + }, + "required": [ + "total", + "backups" + ], + "example": { + "total": 5, + "backups": [] + } + }, + "dedicatedDatabaseBackupStorage": { + "description": "BackupStorageConfig", + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" + "description": "Storage provider. Possible values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" }, - "userId": { + "bucket": { "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" + "description": "Storage bucket or container name.", + "x-example": "my-backup-bucket" }, - "providerId": { + "region": { "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true + "description": "Storage region.", + "x-example": "us-east-1" }, - "providerType": { + "prefix": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "Object key prefix for backups.", + "x-example": "backups\/" }, - "identifier": { + "endpoint": { "type": "string", - "description": "The target identifier.", - "x-example": "token" - }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" + "description": "Custom endpoint for S3-compatible storage.", + "x-example": "https:\/\/minio.example.com" + } + }, + "required": [ + "provider", + "bucket", + "region", + "prefix", + "endpoint" ], "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false + "provider": "s3", + "bucket": "my-backup-bucket", + "region": "us-east-1", + "prefix": "backups\/", + "endpoint": "https:\/\/minio.example.com" } }, - "migration": { - "description": "Migration", + "billingAddress": { + "description": "Address", "type": "object", "properties": { "$id": { "type": "string", - "description": "Migration ID.", + "description": "Region ID", + "x-example": "eu-fr" + }, + "userId": { + "type": "string", + "description": "User ID", "x-example": "5e5ea5c16897e" }, - "$createdAt": { + "streetAddress": { "type": "string", - "description": "Migration creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Street address", + "x-example": "13th Avenue" }, - "$updatedAt": { + "addressLine2": { "type": "string", - "description": "Variable creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Address line 2", + "x-example": "" }, - "status": { + "country": { "type": "string", - "description": "Migration status ( pending, processing, failed, completed ) ", - "x-example": "pending" + "description": "Address country", + "x-example": "USA" }, - "stage": { + "city": { "type": "string", - "description": "Migration stage ( init, processing, source-check, destination-check, migrating, finished )", - "x-example": "init" + "description": "city", + "x-example": "" }, - "source": { + "state": { "type": "string", - "description": "A string containing the type of source of the migration.", - "x-example": "Appwrite" + "description": "state", + "x-example": "" }, - "destination": { + "postalCode": { "type": "string", - "description": "A string containing the type of destination of the migration.", - "x-example": "Appwrite" + "description": "postal code", + "x-example": "" + } + }, + "required": [ + "$id", + "userId", + "streetAddress", + "addressLine2", + "country", + "city", + "state", + "postalCode" + ], + "example": { + "$id": "eu-fr", + "userId": "5e5ea5c16897e", + "streetAddress": "13th Avenue", + "addressLine2": "", + "country": "USA", + "city": "", + "state": "", + "postalCode": "" + } + }, + "billingLimits": { + "description": "Limits", + "type": "object", + "properties": { + "bandwidth": { + "type": "integer", + "description": "Bandwidth limit", + "x-example": 5, + "format": "int32", + "nullable": true }, - "resources": { - "type": "array", - "description": "Resources to migrate.", - "items": { - "type": "string" - }, - "x-example": [ - "user" - ] + "storage": { + "type": "integer", + "description": "Storage limit", + "x-example": 150, + "format": "int32", + "nullable": true }, - "resourceId": { - "type": "string", - "description": "Id of the resource to migrate.", - "x-example": "databaseId:collectionId" + "users": { + "type": "integer", + "description": "Users limit", + "x-example": 200000, + "format": "int32", + "nullable": true }, - "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}}" + "executions": { + "type": "integer", + "description": "Executions limit", + "x-example": 750000, + "format": "int32", + "nullable": true }, - "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\":\"\"}]" + "GBHours": { + "type": "integer", + "description": "GBHours limit", + "x-example": 100, + "format": "int32", + "nullable": true }, - "errors": { - "type": "array", - "description": "All errors that occurred during the migration process.", - "items": { - "type": "string" - }, - "x-example": [] + "imageTransformations": { + "type": "integer", + "description": "Image transformations limit", + "x-example": 100, + "format": "int32", + "nullable": true }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Migration options used during the migration process.", - "x-example": "{\"bucketId\": \"exports\", \"notify\": false}" + "authPhone": { + "type": "integer", + "description": "Auth phone limit", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "budgetLimit": { + "type": "integer", + "description": "Budget limit percentage", + "x-example": 100, + "format": "int32", + "nullable": true } }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "stage", - "source", - "destination", - "resources", - "resourceId", - "statusCounters", - "resourceData", - "errors", - "options" - ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "stage": "init", - "source": "Appwrite", - "destination": "Appwrite", - "resources": [ - "user" - ], - "resourceId": "databaseId:collectionId", - "statusCounters": "{\"Database\": {\"PENDING\": 0, \"SUCCESS\": 1, \"ERROR\": 0, \"SKIP\": 0, \"PROCESSING\": 0, \"WARNING\": 0}}", - "resourceData": "[{\"resource\":\"Database\",\"id\":\"public\",\"status\":\"SUCCESS\",\"message\":\"\"}]", - "errors": [], - "options": "{\"bucketId\": \"exports\", \"notify\": false}" + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 } }, - "migrationReport": { - "description": "Migration Report", + "billingPlan": { + "description": "billingPlan", "type": "object", "properties": { - "user": { + "$id": { + "type": "string", + "description": "Plan ID.", + "x-example": "tier-0" + }, + "name": { + "type": "string", + "description": "Plan name", + "x-example": "Hobby" + }, + "desc": { + "type": "string", + "description": "Plan description", + "x-example": "Hobby plan" + }, + "order": { "type": "integer", - "description": "Number of users to be migrated.", - "x-example": 20, + "description": "Plan order", + "x-example": 0, "format": "int32" }, - "team": { + "price": { + "type": "number", + "description": "Price", + "x-example": 25, + "format": "double" + }, + "trial": { "type": "integer", - "description": "Number of teams to be migrated.", - "x-example": 20, + "description": "Trial days", + "x-example": 14, "format": "int32" }, - "database": { + "bandwidth": { "type": "integer", - "description": "Number of databases to be migrated.", - "x-example": 20, + "description": "Bandwidth", + "x-example": 25, "format": "int32" }, - "row": { + "storage": { "type": "integer", - "description": "Number of rows to be migrated.", - "x-example": 20, + "description": "Storage", + "x-example": 25, "format": "int32" }, - "file": { + "imageTransformations": { "type": "integer", - "description": "Number of files to be migrated.", - "x-example": 20, + "description": "Image Transformations", + "x-example": 100, "format": "int32" }, - "bucket": { + "screenshotsGenerated": { "type": "integer", - "description": "Number of buckets to be migrated.", - "x-example": 20, + "description": "Screenshots generated", + "x-example": 50, "format": "int32" }, - "function": { + "members": { "type": "integer", - "description": "Number of functions to be migrated.", - "x-example": 20, + "description": "Members", + "x-example": 25, "format": "int32" }, - "platform": { + "webhooks": { "type": "integer", - "description": "Number of platforms to be migrated.", - "x-example": 5, + "description": "Webhooks", + "x-example": 25, "format": "int32" }, - "api-key": { + "wafRules": { "type": "integer", - "description": "Number of API keys to be migrated.", - "x-example": 5, + "description": "Maximum WAF rules per project", + "x-example": 2, "format": "int32" }, - "project-variable": { + "projects": { "type": "integer", - "description": "Number of project variables to be migrated.", - "x-example": 5, + "description": "Projects", + "x-example": 2, "format": "int32" }, - "webhook": { + "platforms": { "type": "integer", - "description": "Number of webhooks to be migrated.", - "x-example": 5, + "description": "Platforms", + "x-example": 3, "format": "int32" }, - "auth-methods": { + "users": { "type": "integer", - "description": "Number of auth-method configs to be migrated (always 0 or 1 \u2014 the project-level flag bundle).", - "x-example": 1, + "description": "Users", + "x-example": 25, "format": "int32" }, - "project-protocols": { + "teams": { "type": "integer", - "description": "Number of protocol configs to be migrated (always 0 or 1 \u2014 the project-level REST\/GraphQL\/WebSocket flags).", - "x-example": 1, + "description": "Teams", + "x-example": 25, "format": "int32" }, - "project-labels": { + "databases": { "type": "integer", - "description": "Number of label sets to be migrated (always 0 or 1 \u2014 the project-level RBAC label array).", - "x-example": 1, + "description": "Databases", + "x-example": 25, "format": "int32" }, - "project-services": { + "databasesReads": { "type": "integer", - "description": "Number of service configs to be migrated (always 0 or 1 \u2014 the project-level enable\/disable flags for all 17 services).", - "x-example": 1, + "description": "Database reads per month", + "x-example": 500000, "format": "int32" }, - "policies": { + "databasesWrites": { "type": "integer", - "description": "Number of policy bundles to be migrated (always 0 or 1 \u2014 the project-level security policies covering password rules, session behavior, user limits, and membership privacy).", - "x-example": 1, + "description": "Database writes per month", + "x-example": 250000, "format": "int32" }, - "smtp": { + "databasesBatchSize": { "type": "integer", - "description": "Number of SMTP configurations to be migrated (always 0 or 1 \u2014 the project-level custom SMTP settings; password is not exposed by the source API).", - "x-example": 1, + "description": "Database batch size limit", + "x-example": 100, "format": "int32" }, - "rule": { + "buckets": { "type": "integer", - "description": "Number of custom-domain proxy rules to be migrated. Auto-generated `.appwrite.network` rules are skipped \u2014 they are recreated by parent Function\/Site migration.", - "x-example": 5, + "description": "Buckets", + "x-example": 25, "format": "int32" }, - "project-email-template": { + "fileSize": { "type": "integer", - "description": "Number of custom email templates to be migrated (one per templateId \u00d7 locale pair).", - "x-example": 7, + "description": "File size", + "x-example": 25, "format": "int32" }, - "site": { + "functions": { "type": "integer", - "description": "Number of sites to be migrated.", - "x-example": 5, + "description": "Functions", + "x-example": 25, "format": "int32" }, - "provider": { + "sites": { "type": "integer", - "description": "Number of providers to be migrated.", - "x-example": 5, + "description": "Sites", + "x-example": 1, "format": "int32" }, - "topic": { + "executions": { "type": "integer", - "description": "Number of topics to be migrated.", - "x-example": 10, + "description": "Function executions", + "x-example": 25, "format": "int32" }, - "subscriber": { + "executionsRetentionCount": { "type": "integer", - "description": "Number of subscribers to be migrated.", + "description": "Rolling max executions retained per function\/site", + "x-example": 10000, + "format": "int32" + }, + "GBHours": { + "type": "integer", + "description": "GB hours for functions", "x-example": 100, "format": "int32" }, - "message": { + "realtime": { "type": "integer", - "description": "Number of messages to be migrated.", - "x-example": 50, + "description": "Realtime connections", + "x-example": 25, "format": "int32" }, - "size": { + "realtimeMessages": { "type": "integer", - "description": "Size of files to be migrated in mb.", - "x-example": 30000, + "description": "Realtime messages", + "x-example": 100000, "format": "int32" }, - "version": { - "type": "string", - "description": "Version of the Appwrite instance to be migrated.", - "x-example": "1.4.0" + "messages": { + "type": "integer", + "description": "Messages per month", + "x-example": 1000, + "format": "int32" }, - "oauth2-provider": { + "topics": { "type": "integer", - "description": "Number of OAuth2 provider configurations to be migrated. Secrets (clientSecret, p8File) are never migrated \u2014 destination admin must re-enter them per provider.", - "x-example": 5, + "description": "Topics for messaging", + "x-example": 1, "format": "int32" }, - "backup-policy": { + "authPhone": { "type": "integer", - "description": "Number of backup policies to be migrated.", + "description": "SMS authentications per month", + "x-example": 10, + "format": "int32" + }, + "domains": { + "type": "integer", + "description": "Custom domains", "x-example": 5, "format": "int32" - } - }, - "required": [ - "user", - "team", - "database", - "row", - "file", - "bucket", - "function", - "platform", - "api-key", - "project-variable", - "webhook", - "auth-methods", - "project-protocols", - "project-labels", - "project-services", - "policies", - "smtp", - "rule", - "project-email-template", - "site", - "provider", - "topic", - "subscriber", - "message", - "size", - "version", - "oauth2-provider", - "backup-policy" - ], - "example": { - "user": 20, - "team": 20, - "database": 20, - "row": 20, - "file": 20, - "bucket": 20, - "function": 20, - "platform": 5, - "api-key": 5, - "project-variable": 5, - "webhook": 5, - "auth-methods": 1, - "project-protocols": 1, - "project-labels": 1, - "project-services": 1, - "policies": 1, - "smtp": 1, - "rule": 5, - "project-email-template": 7, - "site": 5, - "provider": 5, - "topic": 10, - "subscriber": 100, - "message": 50, - "size": 30000, - "version": "1.4.0", - "oauth2-provider": 5, - "backup-policy": 5 - } - }, - "insight": { - "description": "Insight", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Insight ID.", - "x-example": "5e5ea5c16897e" }, - "$createdAt": { - "type": "string", - "description": "Insight creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "activityLogs": { + "type": "integer", + "description": "Activity log days", + "x-example": 7, + "format": "int32" + }, + "usageLogs": { + "type": "integer", + "description": "Usage history days", + "x-example": 30, + "format": "int32" + }, + "usageLogsIntervals": { + "type": "array", + "description": "Usage log time intervals allowed for this plan (e.g. 15m, 1h, 1d).", + "items": { + "type": "string" + }, + "x-example": [ + "15m", + "1h", + "1d" + ], + "nullable": true + }, + "projectInactivityDays": { + "type": "integer", + "description": "Number of days of console inactivity before a project is paused. 0 means pausing is disabled.", + "x-example": 7, + "format": "int32" + }, + "alertLimit": { + "type": "integer", + "description": "Alert threshold percentage", + "x-example": 80, + "format": "int32" }, - "$updatedAt": { - "type": "string", - "description": "Insight update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "usage": { + "type": "object", + "description": "Additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/usageBillingPlan" + } + ] }, - "reportId": { - "type": "string", - "description": "Parent report ID. Insights always belong to a report.", - "x-example": "5e5ea5c16897e" + "addons": { + "type": "object", + "description": "Addons", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddon" + } + ] }, - "type": { - "type": "string", - "description": "Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).", - "x-example": "tablesDBIndex" + "budgetCapEnabled": { + "type": "boolean", + "description": "Budget cap enabled or disabled.", + "x-example": true }, - "severity": { - "type": "string", - "description": "Insight severity. One of info, warning, critical.", - "x-example": "warning" + "customSmtp": { + "type": "boolean", + "description": "Custom SMTP", + "x-example": true }, - "status": { - "type": "string", - "description": "Insight status. One of active, dismissed.", - "x-example": "active" + "emailBranding": { + "type": "boolean", + "description": "Appwrite branding in email", + "x-example": true }, - "resourceType": { - "type": "string", - "description": "Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.", - "x-example": "databases" + "requiresPaymentMethod": { + "type": "boolean", + "description": "Does plan require payment method", + "x-example": true }, - "resourceId": { - "type": "string", - "description": "ID of the resource the insight is about.", - "x-example": "main" + "requiresBillingAddress": { + "type": "boolean", + "description": "Does plan require billing address", + "x-example": true }, - "parentResourceType": { - "type": "string", - "description": "Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table \u2192 resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.", - "x-example": "tables" + "isAvailable": { + "type": "boolean", + "description": "Is the billing plan available", + "x-example": true }, - "parentResourceId": { - "type": "string", - "description": "ID of the parent resource. Empty when the resource has no parent.", - "x-example": "orders" + "selfService": { + "type": "boolean", + "description": "Can user change the plan themselves", + "x-example": true }, - "title": { - "type": "string", - "description": "Insight title.", - "x-example": "Missing index on collection orders" + "premiumSupport": { + "type": "boolean", + "description": "Does plan enable premium support", + "x-example": true }, - "summary": { - "type": "string", - "description": "Short markdown summary describing the insight.", - "x-example": "Queries against `orders.status` are scanning the full collection." + "budgeting": { + "type": "boolean", + "description": "Does plan support budget cap", + "x-example": true }, - "ctas": { - "type": "array", - "description": "List of call-to-action buttons attached to this insight.", - "items": { - "$ref": "#\/components\/schemas\/insightCTA" - }, - "x-example": [] + "supportsMockNumbers": { + "type": "boolean", + "description": "Does plan support mock numbers", + "x-example": true }, - "analyzedAt": { - "type": "string", - "description": "Time the insight was analyzed in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "supportsOrganizationRoles": { + "type": "boolean", + "description": "Does plan support organization roles", + "x-example": true }, - "dismissedAt": { - "type": "string", - "description": "Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "supportsCredits": { + "type": "boolean", + "description": "Does plan support credit", + "x-example": true }, - "dismissedBy": { - "type": "string", - "description": "User ID that dismissed the insight. Empty when not dismissed.", - "x-example": "5e5ea5c16897e", - "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "reportId", - "type", - "severity", - "status", - "resourceType", - "resourceId", - "parentResourceType", - "parentResourceId", - "title", - "summary", - "ctas" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "reportId": "5e5ea5c16897e", - "type": "tablesDBIndex", - "severity": "warning", - "status": "active", - "resourceType": "databases", - "resourceId": "main", - "parentResourceType": "tables", - "parentResourceId": "orders", - "title": "Missing index on collection orders", - "summary": "Queries against `orders.status` are scanning the full collection.", - "ctas": [], - "analyzedAt": "2020-10-15T06:38:00.000+00:00", - "dismissedAt": "2020-10-15T06:38:00.000+00:00", - "dismissedBy": "5e5ea5c16897e" - } - }, - "insightCTA": { - "description": "InsightCTA", - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Human-readable label for the CTA, used in UI.", - "x-example": "Create missing index" + "supportsDisposableEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking disposable email addresses.", + "x-example": true }, - "service": { - "type": "string", - "description": "Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource \u2014 for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.", - "x-example": "tablesDB" + "supportsCanonicalEmailValidation": { + "type": "boolean", + "description": "Does plan support requiring canonical email addresses.", + "x-example": true }, - "method": { - "type": "string", - "description": "Public API method on the chosen service the client should invoke when this CTA is triggered.", - "x-example": "createIndex" + "supportsFreeEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking free email addresses.", + "x-example": true }, - "params": { - "type": "object", - "additionalProperties": true, - "description": "Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId\/tableId\/columns for tablesDB, databaseId\/collectionId\/attributes for the legacy Databases API).", - "x-example": { - "databaseId": "main", - "tableId": "orders", - "key": "_idx_status", - "type": "key", - "columns": [ - "status" - ] - } - } - }, - "required": [ - "label", - "service", - "method", - "params" - ], - "example": { - "label": "Create missing index", - "service": "tablesDB", - "method": "createIndex", - "params": { - "databaseId": "main", - "tableId": "orders", - "key": "_idx_status", - "type": "key", - "columns": [ - "status" - ] - } - } - }, - "report": { - "description": "Report", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Report ID.", - "x-example": "5e5ea5c16897e" + "supportsCorporateEmailValidation": { + "type": "boolean", + "description": "Does plan support restricting sign-ups to corporate email addresses only.", + "x-example": true }, - "$createdAt": { - "type": "string", - "description": "Report creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "supportsProjectSpecificRoles": { + "type": "boolean", + "description": "Does plan support project-specific member roles.", + "x-example": true }, - "$updatedAt": { - "type": "string", - "description": "Report update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "backupsEnabled": { + "type": "boolean", + "description": "Does plan support backup policies.", + "x-example": true }, - "appId": { - "type": "string", - "description": "ID of the third-party app that submitted the report.", - "x-example": "5e5ea5c16897e" + "usagePerProject": { + "type": "boolean", + "description": "Whether usage addons are calculated per project.", + "x-example": true }, - "type": { - "type": "string", - "description": "Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.", - "x-example": "lighthouse" + "supportedAddons": { + "type": "object", + "description": "Supported addons for this plan", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanSupportedAddons" + } + ] }, - "title": { - "type": "string", - "description": "Short, human-readable title for the report.", - "x-example": "Lighthouse audit for https:\/\/appwrite.io\/" + "backupPolicies": { + "type": "integer", + "description": "How many policies does plan support", + "x-example": true, + "format": "int32" }, - "summary": { - "type": "string", - "description": "Markdown summary describing the report.", - "x-example": "Performance score 78. 4 opportunities found." + "deploymentSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "x-example": 30, + "format": "int32" }, - "targetType": { - "type": "string", - "description": "Plural noun describing what the report analyzes, e.g. databases, sites, urls.", - "x-example": "urls" + "buildSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "x-example": 2000, + "format": "int32" }, - "target": { - "type": "string", - "description": "Free-form target identifier (URL for lighthouse, resource ID for db).", - "x-example": "https:\/\/appwrite.io\/" + "databasesAllowEncrypt": { + "type": "boolean", + "description": "Does the plan support encrypted string attributes or not.", + "x-example": false }, - "categories": { - "type": "array", - "description": "Categories covered by the report, e.g. performance, accessibility.", - "items": { - "type": "string" - }, - "x-example": [ - "performance", - "accessibility" + "limits": { + "type": "object", + "description": "Plan specific limits", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanLimits" + } + ], + "nullable": true + }, + "group": { + "type": "string", + "description": "Group of this billing plan for variants", + "x-example": "pro", + "enum": [ + "starter", + "pro", + "scale" ] }, - "insights": { - "type": "array", - "description": "Insights nested under this report.", - "items": { - "$ref": "#\/components\/schemas\/insight" - }, - "x-example": [] + "program": { + "type": "object", + "description": "Details of the program this plan is a part of.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/program" + } + ], + "nullable": true }, - "analyzedAt": { - "type": "string", - "description": "Time the report was analyzed in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", + "dedicatedDatabases": { + "type": "object", + "description": "Dedicated database limits available to this plan.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanDedicatedDatabaseLimits" + } + ], "nullable": true } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "appId", - "type", - "title", - "summary", - "targetType", - "target", - "categories", - "insights" + "name", + "desc", + "order", + "price", + "trial", + "bandwidth", + "storage", + "imageTransformations", + "screenshotsGenerated", + "members", + "webhooks", + "wafRules", + "projects", + "platforms", + "users", + "teams", + "databases", + "databasesReads", + "databasesWrites", + "databasesBatchSize", + "buckets", + "fileSize", + "functions", + "sites", + "executions", + "executionsRetentionCount", + "GBHours", + "realtime", + "realtimeMessages", + "messages", + "topics", + "authPhone", + "domains", + "activityLogs", + "usageLogs", + "projectInactivityDays", + "alertLimit", + "usage", + "addons", + "budgetCapEnabled", + "customSmtp", + "emailBranding", + "requiresPaymentMethod", + "requiresBillingAddress", + "isAvailable", + "selfService", + "premiumSupport", + "budgeting", + "supportsMockNumbers", + "supportsOrganizationRoles", + "supportsCredits", + "supportsDisposableEmailValidation", + "supportsCanonicalEmailValidation", + "supportsFreeEmailValidation", + "supportsCorporateEmailValidation", + "supportsProjectSpecificRoles", + "backupsEnabled", + "usagePerProject", + "supportedAddons", + "backupPolicies", + "deploymentSize", + "buildSize", + "databasesAllowEncrypt", + "group" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "type": "lighthouse", - "title": "Lighthouse audit for https:\/\/appwrite.io\/", - "summary": "Performance score 78. 4 opportunities found.", - "targetType": "urls", - "target": "https:\/\/appwrite.io\/", - "categories": [ - "performance", - "accessibility" + "$id": "tier-0", + "name": "Hobby", + "desc": "Hobby plan", + "order": 0, + "price": 25, + "trial": 14, + "bandwidth": 25, + "storage": 25, + "imageTransformations": 100, + "screenshotsGenerated": 50, + "members": 25, + "webhooks": 25, + "wafRules": 2, + "projects": 2, + "platforms": 3, + "users": 25, + "teams": 25, + "databases": 25, + "databasesReads": 500000, + "databasesWrites": 250000, + "databasesBatchSize": 100, + "buckets": 25, + "fileSize": 25, + "functions": 25, + "sites": 1, + "executions": 25, + "executionsRetentionCount": 10000, + "GBHours": 100, + "realtime": 25, + "realtimeMessages": 100000, + "messages": 1000, + "topics": 1, + "authPhone": 10, + "domains": 5, + "activityLogs": 7, + "usageLogs": 30, + "usageLogsIntervals": [ + "15m", + "1h", + "1d" ], - "insights": [], - "analyzedAt": "2020-10-15T06:38:00.000+00:00" + "projectInactivityDays": 7, + "alertLimit": 80, + "usage": null, + "addons": null, + "budgetCapEnabled": true, + "customSmtp": true, + "emailBranding": true, + "requiresPaymentMethod": true, + "requiresBillingAddress": true, + "isAvailable": true, + "selfService": true, + "premiumSupport": true, + "budgeting": true, + "supportsMockNumbers": true, + "supportsOrganizationRoles": true, + "supportsCredits": true, + "supportsDisposableEmailValidation": true, + "supportsCanonicalEmailValidation": true, + "supportsFreeEmailValidation": true, + "supportsCorporateEmailValidation": true, + "supportsProjectSpecificRoles": true, + "backupsEnabled": true, + "usagePerProject": true, + "supportedAddons": null, + "backupPolicies": true, + "deploymentSize": 30, + "buildSize": 2000, + "databasesAllowEncrypt": false, + "limits": null, + "group": "pro", + "program": null, + "dedicatedDatabases": null } }, - "activityEvent": { - "description": "ActivityEvent", + "billingPlanAddon": { + "description": "Addon", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Event ID.", - "x-example": "5e5ea5c16897e" - }, - "actorType": { - "type": "string", - "description": "Actor type.", - "x-example": "user" - }, - "actorId": { - "type": "string", - "description": "Actor ID.", - "x-example": "610fc2f985ee0" - }, - "actorEmail": { - "type": "string", - "description": "Actor Email.", - "x-example": "john@appwrite.io" - }, - "actorName": { - "type": "string", - "description": "Actor Name.", - "x-example": "John Doe" - }, - "resourceParent": { - "type": "string", - "description": "Resource parent.", - "x-example": "database\/ID" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "collection" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "610fc2f985ee0" - }, - "resource": { - "type": "string", - "description": "Resource.", - "x-example": "collections\/610fc2f985ee0" - }, - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userAgent": { - "type": "string", - "description": "User agent.", - "x-example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36" - }, - "ip": { - "type": "string", - "description": "IP address.", - "x-example": "127.0.0.1" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "country": { - "type": "string", - "description": "Location.", - "x-example": "US" - }, - "time": { - "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "projectId": { - "type": "string", - "description": "Project ID.", - "x-example": "610fc2f985ee0" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "610fc2f985ee0" - }, - "hostname": { - "type": "string", - "description": "Hostname.", - "x-example": "appwrite.io" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "seats": { + "type": "object", + "description": "Addon seats", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ] }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" + "projects": { + "type": "object", + "description": "Addon projects", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ] } }, "required": [ - "$id", - "actorType", - "actorId", - "actorEmail", - "actorName", - "resourceParent", - "resourceType", - "resourceId", - "resource", - "event", - "userAgent", - "ip", - "mode", - "country", - "time", - "projectId", - "teamId", - "hostname", - "countryCode", - "countryName" + "seats", + "projects" ], "example": { - "$id": "5e5ea5c16897e", - "actorType": "user", - "actorId": "610fc2f985ee0", - "actorEmail": "john@appwrite.io", - "actorName": "John Doe", - "resourceParent": "database\/ID", - "resourceType": "collection", - "resourceId": "610fc2f985ee0", - "resource": "collections\/610fc2f985ee0", - "event": "account.sessions.create", - "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36", - "ip": "127.0.0.1", - "mode": "admin", - "country": "US", - "time": "2020-10-15T06:38:00.000+00:00", - "projectId": "610fc2f985ee0", - "teamId": "610fc2f985ee0", - "hostname": "appwrite.io", - "countryCode": "US", - "countryName": "United States" + "seats": null, + "projects": null } }, - "additionalResource": { - "description": "AdditionalResource", + "billingPlanAddonDetails": { + "description": "Details", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Resource name", - "x-example": "" + "supported": { + "type": "boolean", + "description": "Is the addon supported in the plan?", + "x-example": true }, - "unit": { + "planIncluded": { + "type": "integer", + "description": "Addon plan included value", + "x-example": 1, + "format": "int32" + }, + "limit": { + "type": "integer", + "description": "Addon limit", + "x-example": 5, + "format": "int32" + }, + "type": { "type": "string", - "description": "Resource unit", - "x-example": "GB" + "description": "Addon type", + "x-example": "numeric" }, "currency": { "type": "string", @@ -104801,2778 +113469,2612 @@ } }, "required": [ - "name", - "unit", + "supported", + "planIncluded", + "limit", + "type", "currency", "price", "value", "invoiceDesc" ], "example": { - "name": "", - "unit": "GB", + "supported": true, + "planIncluded": 1, + "limit": 5, + "type": "numeric", "currency": "USD", "price": 5, "value": 25, "invoiceDesc": "" } }, - "addon": { - "description": "Addon", + "billingPlanLimits": { + "description": "PlanLimits", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Addon ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Addon creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Addon update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Addon permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "key": { - "type": "string", - "description": "Addon key", - "x-example": "baa" - }, - "resourceType": { - "type": "string", - "description": "Resource type (organization or project)", - "x-example": "organization" - }, - "resourceId": { - "type": "string", - "description": "Resource ID", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "Payment status. Possible values: pending (awaiting payment confirmation e.g. 3DS), active (payment confirmed and addon is running).", - "x-example": "active" - }, - "currentValue": { - "type": "integer", - "description": "Current value for this billing cycle. For toggle addons: 1 (on) or 0 (off). For numeric addons: the active quantity.", - "x-example": 1, - "format": "int32" - }, - "nextValue": { + "credits": { "type": "integer", - "description": "Value to apply at the start of the next billing cycle. Null means no change is scheduled. For toggle addons, 0 means the addon will be removed at the next cycle.", - "x-example": null, + "description": "Credits limit per billing cycle", + "x-example": 100, "format": "int32", "nullable": true - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "key", - "resourceType", - "resourceId", - "status", - "currentValue" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "key": "baa", - "resourceType": "organization", - "resourceId": "5e5ea5c16897e", - "status": "active", - "currentValue": 1, - "nextValue": null - } - }, - "addonPrice": { - "description": "AddonPrice", - "type": "object", - "properties": { - "addonKey": { - "type": "string", - "description": "Addon key.", - "x-example": "baa" - }, - "name": { - "type": "string", - "description": "Addon display name.", - "x-example": "HIPAA BAA" - }, - "monthlyPrice": { - "type": "number", - "description": "Full monthly price of the addon.", - "x-example": 350, - "format": "double" - }, - "proratedAmount": { - "type": "number", - "description": "Calculated prorated amount for the current billing cycle.", - "x-example": 175.5, - "format": "double" - }, - "remainingDays": { - "type": "integer", - "description": "Days remaining in the current billing cycle.", - "x-example": 15, - "format": "int32" - }, - "totalCycleDays": { - "type": "integer", - "description": "Total days in the billing cycle.", - "x-example": 30, - "format": "int32" - }, - "currency": { - "type": "string", - "description": "Currency code.", - "x-example": "USD" - }, - "billingCycleEnd": { - "type": "string", - "description": "When the current billing cycle ends.", - "x-example": "2024-02-01T00:00:00.000+00:00" - } - }, - "required": [ - "addonKey", - "name", - "monthlyPrice", - "proratedAmount", - "remainingDays", - "totalCycleDays", - "currency", - "billingCycleEnd" - ], - "example": { - "addonKey": "baa", - "name": "HIPAA BAA", - "monthlyPrice": 350, - "proratedAmount": 175.5, - "remainingDays": 15, - "totalCycleDays": 30, - "currency": "USD", - "billingCycleEnd": "2024-02-01T00:00:00.000+00:00" - } - }, - "aggregationBreakdown": { - "description": "Breakdown", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Aggregation ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Project name", - "x-example": "" - }, - "region": { - "type": "string", - "description": "Project region", - "x-example": "fra" }, - "amount": { + "dailyCredits": { "type": "integer", - "description": "Aggregated amount", - "x-example": 2, - "format": "int32" - }, - "resources": { - "type": "array", - "description": "", - "items": { - "$ref": "#\/components\/schemas\/usageResources" - }, - "x-example": "" + "description": "Daily credits limit (if applicable)", + "x-example": 5, + "format": "int32", + "nullable": true } }, - "required": [ - "$id", - "name", - "region", - "amount", - "resources" - ], "example": { - "$id": "5e5ea5c16897e", - "name": "", - "region": "fra", - "amount": 2, - "resources": "" + "credits": 100, + "dailyCredits": 5 } }, - "aggregationTeam": { - "description": "Team", + "billingPlanDedicatedDatabaseLimits": { + "description": "dedicatedDatabaseLimits", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Aggregation ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Aggregation creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Aggregation update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Aggregation permissions. [Learn more about permissions](\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "from": { - "type": "string", - "description": "Beginning date of the invoice", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "to": { - "type": "string", - "description": "End date of the invoice", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "usageStorage": { - "type": "integer", - "description": "Total storage usage", - "x-example": 20009090, - "format": "int32" - }, - "usageTotalStorage": { - "type": "integer", - "description": "Total storage usage with builds storage", - "x-example": 20009090, - "format": "int32" - }, - "usageFilesStorage": { - "type": "integer", - "description": "Total files storage usage", - "x-example": 20009090, - "format": "int32" - }, - "usageDeploymentsStorage": { + "minCpu": { "type": "integer", - "description": "Total deployments storage usage", - "x-example": 20009090, - "format": "int32" + "description": "Minimum CPU allocation in millicores.", + "x-example": 125, + "format": "int32", + "nullable": true }, - "usageBuildsStorage": { + "maxCpu": { "type": "integer", - "description": "Total builds storage usage", - "x-example": 20009090, - "format": "int32" + "description": "Maximum CPU allocation in millicores.", + "x-example": 16000, + "format": "int32", + "nullable": true }, - "usageDatabasesStorage": { + "minMemoryMb": { "type": "integer", - "description": "Total databases storage usage", - "x-example": 2009090, - "format": "int32" + "description": "Minimum memory allocation in megabytes.", + "x-example": 128, + "format": "int32", + "nullable": true }, - "usageUsers": { + "maxMemoryMb": { "type": "integer", - "description": "Total active users for the billing period", - "x-example": 2000, - "format": "int32" + "description": "Maximum memory allocation in megabytes.", + "x-example": 65536, + "format": "int32", + "nullable": true }, - "usageExecutions": { + "minStorageGb": { "type": "integer", - "description": "Total number of executions for the billing period", - "x-example": 2000, - "format": "int32" + "description": "Minimum storage allocation in gigabytes.", + "x-example": 1, + "format": "int32", + "nullable": true }, - "usageBandwidth": { + "maxStorageGb": { "type": "integer", - "description": "Total bandwidth usage for the billing period", - "x-example": 2000, - "format": "int32" + "description": "Maximum storage allocation in gigabytes.", + "x-example": 16384, + "format": "int32", + "nullable": true }, - "usageRealtime": { + "maxReplicas": { "type": "integer", - "description": "Peak concurrent realtime connections for the billing period", - "x-example": 200, - "format": "int32" + "description": "Maximum number of high-availability replicas per dedicated database.", + "x-example": 5, + "format": "int32", + "nullable": true }, - "usageRealtimeMessages": { + "maxConnections": { "type": "integer", - "description": "Total realtime messages sent for the billing period", + "description": "Maximum number of client connections.", "x-example": 10000, - "format": "int32" + "format": "int32", + "nullable": true }, - "usageRealtimeBandwidth": { + "maxIpAllowlistSize": { "type": "integer", - "description": "Total realtime bandwidth usage for the billing period", - "x-example": 5000000, - "format": "int32" + "description": "Maximum number of entries allowed in the IP allowlist.", + "x-example": 100, + "format": "int32", + "nullable": true }, - "additionalMembers": { + "maxExtensions": { "type": "integer", - "description": "Additional members", - "x-example": 5, - "format": "int32" + "description": "Maximum number of database extensions that can be enabled.", + "x-example": 50, + "format": "int32", + "nullable": true }, - "additionalMemberAmount": { + "maxBackupRetentionDays": { "type": "integer", - "description": "Additional members cost", - "x-example": 30, - "format": "int32" + "description": "Maximum number of days a backup can be retained.", + "x-example": 365, + "format": "int32", + "nullable": true }, - "additionalStorageAmount": { + "maxPitrRetentionDays": { "type": "integer", - "description": "Additional storage usage cost", - "x-example": 40, - "format": "int32" + "description": "Maximum number of days of point-in-time recovery data that can be retained.", + "x-example": 35, + "format": "int32", + "nullable": true }, - "additionalUsersAmount": { + "maxSqlApiMaxRows": { "type": "integer", - "description": "Additional users usage cost.", - "x-example": 4, - "format": "int32" + "description": "Maximum number of rows a single SQL API query can return.", + "x-example": 1000000, + "format": "int32", + "nullable": true }, - "additionalExecutionsAmount": { + "maxSqlApiMaxBytes": { "type": "integer", - "description": "Additional executions usage cost", - "x-example": 30, - "format": "int32" + "description": "Maximum response size in bytes for a single SQL API query.", + "x-example": 104857600, + "format": "int32", + "nullable": true }, - "additionalBandwidthAmount": { + "maxSqlApiTimeoutSeconds": { "type": "integer", - "description": "Additional bandwidth usage cost", - "x-example": 40, - "format": "int32" + "description": "Maximum execution time in seconds for a single SQL API query.", + "x-example": 300, + "format": "int32", + "nullable": true }, - "additionalRealtimeAmount": { + "maxSqlApiAllowedStatements": { "type": "integer", - "description": "Additional realtime usage cost", - "x-example": 20, - "format": "int32" - }, - "plan": { - "type": "string", - "description": "Billing plan", - "x-example": "tier-0" + "description": "Maximum number of SQL statement types that can be permitted through the SQL API.", + "x-example": 10, + "format": "int32", + "nullable": true }, - "amount": { - "type": "integer", - "description": "Aggregated amount", - "x-example": 2, - "format": "int32" + "allowedSqlStatements": { + "type": "array", + "description": "SQL statement types permitted through the SQL API.", + "items": { + "type": "string" + }, + "x-example": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "nullable": true }, - "breakdown": { + "allowedStorageClasses": { "type": "array", - "description": "Aggregation project breakdown", + "description": "Storage classes available for dedicated databases.", "items": { - "$ref": "#\/components\/schemas\/aggregationBreakdown" + "type": "string" }, - "x-example": [] + "x-example": [ + "ssd" + ], + "nullable": true }, - "resources": { + "allowedSyncModes": { "type": "array", - "description": "Usage resources", + "description": "Replica synchronization modes available for dedicated databases.", "items": { - "$ref": "#\/components\/schemas\/usageResources" + "type": "string" }, - "x-example": [] + "x-example": [ + "async", + "sync", + "quorum" + ], + "nullable": true + } + }, + "example": { + "minCpu": 125, + "maxCpu": 16000, + "minMemoryMb": 128, + "maxMemoryMb": 65536, + "minStorageGb": 1, + "maxStorageGb": 16384, + "maxReplicas": 5, + "maxConnections": 10000, + "maxIpAllowlistSize": 100, + "maxExtensions": 50, + "maxBackupRetentionDays": 365, + "maxPitrRetentionDays": 35, + "maxSqlApiMaxRows": 1000000, + "maxSqlApiMaxBytes": 104857600, + "maxSqlApiTimeoutSeconds": 300, + "maxSqlApiAllowedStatements": 10, + "allowedSqlStatements": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "allowedStorageClasses": [ + "ssd" + ], + "allowedSyncModes": [ + "async", + "sync", + "quorum" + ] + } + }, + "billingPlanSupportedAddons": { + "description": "BillingPlanSupportedAddons", + "type": "object", + "properties": { + "baa": { + "type": "boolean", + "description": "Whether the plan supports BAA (Business Associate Agreement) addon", + "x-example": true + }, + "premiumGeoDB": { + "type": "boolean", + "description": "Whether the plan supports Premium Geo DB addon (project-level)", + "x-example": true + }, + "premiumGeoDBOrg": { + "type": "boolean", + "description": "Whether the plan supports Premium Geo DB addon (organization-level)", + "x-example": true } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "from", - "to", - "usageStorage", - "usageTotalStorage", - "usageFilesStorage", - "usageDeploymentsStorage", - "usageBuildsStorage", - "usageDatabasesStorage", - "usageUsers", - "usageExecutions", - "usageBandwidth", - "usageRealtime", - "usageRealtimeMessages", - "usageRealtimeBandwidth", - "additionalMembers", - "additionalMemberAmount", - "additionalStorageAmount", - "additionalUsersAmount", - "additionalExecutionsAmount", - "additionalBandwidthAmount", - "additionalRealtimeAmount", - "plan", - "amount", - "breakdown", - "resources" + "baa", + "premiumGeoDB", + "premiumGeoDBOrg" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "from": "2020-10-15T06:38:00.000+00:00", - "to": "2020-10-15T06:38:00.000+00:00", - "usageStorage": 20009090, - "usageTotalStorage": 20009090, - "usageFilesStorage": 20009090, - "usageDeploymentsStorage": 20009090, - "usageBuildsStorage": 20009090, - "usageDatabasesStorage": 2009090, - "usageUsers": 2000, - "usageExecutions": 2000, - "usageBandwidth": 2000, - "usageRealtime": 200, - "usageRealtimeMessages": 10000, - "usageRealtimeBandwidth": 5000000, - "additionalMembers": 5, - "additionalMemberAmount": 30, - "additionalStorageAmount": 40, - "additionalUsersAmount": 4, - "additionalExecutionsAmount": 30, - "additionalBandwidthAmount": 40, - "additionalRealtimeAmount": 20, - "plan": "tier-0", - "amount": 2, - "breakdown": [], - "resources": [] + "baa": true, + "premiumGeoDB": true, + "premiumGeoDBOrg": true } }, - "backupArchive": { - "description": "Archive", + "block": { + "description": "Block", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Archive ID.", - "x-example": "5e5ea5c16897e" - }, "$createdAt": { "type": "string", - "description": "Archive creation time in ISO 8601 format.", + "description": "Block creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "resourceType": { "type": "string", - "description": "Archive update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Resource type that is blocked", + "x-example": "project" }, - "policyId": { + "resourceId": { "type": "string", - "description": "Archive policy ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Resource identifier that is blocked", + "x-example": "5e5ea5c16897e" }, - "size": { - "type": "integer", - "description": "Archive size in bytes.", - "x-example": 100000, - "format": "int32" + "mode": { + "type": "string", + "description": "Block mode. full blocks reads and writes; readOnly blocks writes only.", + "x-example": "readOnly" }, - "status": { + "reason": { "type": "string", - "description": "The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.", - "x-example": "completed" + "description": "Reason for the block. Can be null if no reason was provided.", + "x-example": "Payment overdue", + "nullable": true }, - "startedAt": { + "expiredAt": { "type": "string", - "description": "The backup start time.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "migrationId": { + "projectName": { "type": "string", - "description": "Migration ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Name of the project this block applies to.", + "x-example": "My Project" }, - "services": { - "type": "array", - "description": "The services that are backed up by this archive.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'storage']" + "region": { + "type": "string", + "description": "Region of the project this block applies to.", + "x-example": "fra" }, - "resources": { - "type": "array", - "description": "The resources that are backed up by this archive.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" + "organizationName": { + "type": "string", + "description": "Name of the organization that owns the project.", + "x-example": "Acme Inc." }, - "resourceId": { + "organizationId": { "type": "string", - "description": "The resource ID to backup. Set only if this archive should backup a single resource.", - "x-example": "DB1", - "nullable": true + "description": "ID of the organization that owns the project.", + "x-example": "5e5ea5c16897e" }, - "resourceType": { + "billingPlan": { "type": "string", - "description": "The resource type to backup. Set only if this archive should backup a single resource.", - "x-example": "database", - "nullable": true + "description": "Billing plan of the organization that owns the project.", + "x-example": "pro" } }, "required": [ - "$id", "$createdAt", - "$updatedAt", - "policyId", - "size", - "status", - "startedAt", - "migrationId", - "services", - "resources" + "resourceType", + "resourceId", + "mode", + "projectName", + "region", + "organizationName", + "organizationId", + "billingPlan" ], "example": { - "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "policyId": "did8jx6ws45jana098ab7", - "size": 100000, - "status": "completed", - "startedAt": "2020-10-15T06:38:00.000+00:00", - "migrationId": "did8jx6ws45jana098ab7", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "resourceId": "DB1", - "resourceType": "database" + "resourceType": "project", + "resourceId": "5e5ea5c16897e", + "mode": "readOnly", + "reason": "Payment overdue", + "expiredAt": "2020-10-15T06:38:00.000+00:00", + "projectName": "My Project", + "region": "fra", + "organizationName": "Acme Inc.", + "organizationId": "5e5ea5c16897e", + "billingPlan": "pro" } }, - "dedicatedDatabaseBackup": { - "description": "Backup", + "blockDelete": { + "description": "BlockDelete", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Backup ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Backup creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "databaseId": { - "type": "string", - "description": "Database ID this backup belongs to.", - "x-example": "5e5ea5c16897e" + "deleted": { + "type": "integer", + "description": "Number of blocks deleted", + "x-example": 1, + "format": "int32" }, - "projectId": { + "blocks": { + "type": "array", + "description": "List of deleted blocks", + "items": { + "$ref": "#\/components\/schemas\/block" + }, + "x-example": [] + } + }, + "required": [ + "deleted", + "blocks" + ], + "example": { + "deleted": 1, + "blocks": [] + } + }, + "dedicatedDatabaseBranch": { + "description": "Branch", + "type": "object", + "properties": { + "branchId": { "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" + "description": "Branch identifier.", + "x-example": "a1b2c3d4" }, - "policyId": { + "branchName": { "type": "string", - "description": "Backup policy ID when the backup was created by a schedule.", - "x-example": "5e5ea5c16897e" + "description": "Branch name.", + "x-example": "branch-a1b2c3d4" }, - "trigger": { + "namespace": { "type": "string", - "description": "Backup trigger. Possible values: manual, schedule.", - "x-example": "schedule" + "description": "Kubernetes namespace where the branch is deployed.", + "x-example": "db-myproject-mydb-branch-a1b2c3d4" }, - "type": { - "type": "string", - "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", - "x-example": "full" + "expiresAt": { + "type": "integer", + "description": "Unix timestamp when the branch expires.", + "x-example": 1711411200, + "format": "int32" }, - "status": { + "host": { "type": "string", - "description": "Backup status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error), verified (integrity check passed).", - "x-example": "completed" + "description": "Branch hostname for direct connections.", + "x-example": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center" }, - "sizeBytes": { + "port": { "type": "integer", - "description": "Backup size in bytes.", - "x-example": 1073741824, + "description": "Branch port. Null until the backing reports one.", + "x-example": 5432, "format": "int32" }, - "startedAt": { + "database": { "type": "string", - "description": "Backup start time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database name the client sends for routing to the branch.", + "x-example": "db-myproject-mydb-a1b2c3d4" }, - "completedAt": { + "username": { "type": "string", - "description": "Backup completion time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database username. Shared with the parent database.", + "x-example": "appwrite" }, - "verifiedAt": { + "password": { "type": "string", - "description": "Backup verification time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database password. Shared with the parent database.", + "x-example": "********" }, - "expiresAt": { + "ssl": { + "type": "boolean", + "description": "Whether SSL is required.", + "x-example": false + }, + "engine": { "type": "string", - "description": "Backup expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database engine. Possible values: postgresql, mysql, mongodb.", + "x-example": "postgresql" }, - "error": { + "connectionString": { "type": "string", - "description": "Error message if backup failed.", - "x-example": "" + "description": "Full connection string for the branch.", + "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" } }, "required": [ - "$id", - "$createdAt", - "databaseId", - "projectId", - "policyId", - "trigger", - "type", - "status", - "sizeBytes", - "startedAt", - "completedAt", - "verifiedAt", + "branchId", + "branchName", + "namespace", "expiresAt", - "error" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "databaseId": "5e5ea5c16897e", - "projectId": "5e5ea5c16897e", - "policyId": "5e5ea5c16897e", - "trigger": "schedule", - "type": "full", - "status": "completed", - "sizeBytes": 1073741824, - "startedAt": "2020-10-15T06:38:00.000+00:00", - "completedAt": "2020-10-15T06:38:00.000+00:00", - "verifiedAt": "2020-10-15T06:38:00.000+00:00", - "expiresAt": "2020-10-15T06:38:00.000+00:00", - "error": "" - } - }, - "dedicatedDatabaseBackupList": { - "description": "BackupList", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of backups.", - "x-example": 5, - "format": "int32" - }, - "backups": { - "type": "array", - "description": "List of backups.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" - }, - "x-example": [] - } - }, - "required": [ - "total", - "backups" + "host", + "port", + "database", + "username", + "password", + "ssl", + "engine", + "connectionString" ], "example": { - "total": 5, - "backups": [] + "branchId": "a1b2c3d4", + "branchName": "branch-a1b2c3d4", + "namespace": "db-myproject-mydb-branch-a1b2c3d4", + "expiresAt": 1711411200, + "host": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center", + "port": 5432, + "database": "db-myproject-mydb-a1b2c3d4", + "username": "appwrite", + "password": "********", + "ssl": false, + "engine": "postgresql", + "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" } }, - "dedicatedDatabaseBackupStorage": { - "description": "BackupStorageConfig", + "dedicatedDatabaseBranchList": { + "description": "BranchList", "type": "object", "properties": { - "provider": { - "type": "string", - "description": "Storage provider. Possible values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", - "x-example": "s3" - }, - "bucket": { - "type": "string", - "description": "Storage bucket or container name.", - "x-example": "my-backup-bucket" - }, - "region": { - "type": "string", - "description": "Storage region.", - "x-example": "us-east-1" - }, - "prefix": { - "type": "string", - "description": "Object key prefix for backups.", - "x-example": "backups\/" - }, - "endpoint": { - "type": "string", - "description": "Custom endpoint for S3-compatible storage.", - "x-example": "https:\/\/minio.example.com" + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranch" + }, + "x-example": [] } }, "required": [ - "provider", - "bucket", - "region", - "prefix", - "endpoint" + "branches" ], "example": { - "provider": "s3", - "bucket": "my-backup-bucket", - "region": "us-east-1", - "prefix": "backups\/", - "endpoint": "https:\/\/minio.example.com" + "branches": [] } }, - "billingAddress": { - "description": "Address", + "campaign": { + "description": "Campaign", "type": "object", "properties": { "$id": { "type": "string", - "description": "Region ID", - "x-example": "eu-fr" - }, - "userId": { - "type": "string", - "description": "User ID", - "x-example": "5e5ea5c16897e" - }, - "streetAddress": { - "type": "string", - "description": "Street address", - "x-example": "13th Avenue" - }, - "addressLine2": { - "type": "string", - "description": "Address line 2", + "description": "Campaign ID", "x-example": "" }, - "country": { + "template": { "type": "string", - "description": "Address country", - "x-example": "USA" + "description": "Campaign template", + "x-example": "" }, - "city": { + "title": { "type": "string", - "description": "city", + "description": "Campaign title", "x-example": "" }, - "state": { + "description": { "type": "string", - "description": "state", + "description": "Campaign description", "x-example": "" }, - "postalCode": { + "plan": { "type": "string", - "description": "postal code", - "x-example": "" - } - }, - "required": [ - "$id", - "userId", - "streetAddress", - "addressLine2", - "country", - "city", - "state", - "postalCode" - ], - "example": { - "$id": "eu-fr", - "userId": "5e5ea5c16897e", - "streetAddress": "13th Avenue", - "addressLine2": "", - "country": "USA", - "city": "", - "state": "", - "postalCode": "" - } - }, - "billingLimits": { - "description": "Limits", - "type": "object", - "properties": { - "bandwidth": { - "type": "integer", - "description": "Bandwidth limit", - "x-example": 5, - "format": "int32", + "description": "Billing plan campaign is associated with", + "x-example": "", "nullable": true }, - "storage": { - "type": "integer", - "description": "Storage limit", - "x-example": 150, - "format": "int32", + "cta": { + "type": "string", + "description": "Campaign CTA", + "x-example": "", "nullable": true }, - "users": { - "type": "integer", - "description": "Users limit", - "x-example": 200000, - "format": "int32", + "claimed": { + "type": "string", + "description": "Campaign info when claimed", + "x-example": "", "nullable": true }, - "executions": { - "type": "integer", - "description": "Executions limit", - "x-example": 750000, - "format": "int32", + "unclaimed": { + "type": "string", + "description": "Campaign infor when unclaimed", + "x-example": "", "nullable": true }, - "GBHours": { - "type": "integer", - "description": "GBHours limit", - "x-example": 100, - "format": "int32", - "nullable": true + "image": { + "type": "object", + "additionalProperties": true, + "description": "Campaign images", + "x-example": "" }, - "imageTransformations": { - "type": "integer", - "description": "Image transformations limit", - "x-example": 100, - "format": "int32", + "reviews": { + "type": "array", + "description": "Campaign reviews", + "items": { + "$ref": "#\/components\/schemas\/review" + }, + "x-example": "", "nullable": true }, - "authPhone": { - "type": "integer", - "description": "Auth phone limit", - "x-example": 10, - "format": "int32", + "onlyNewOrgs": { + "type": "boolean", + "description": "Campaign valid only for new orgs.", + "x-example": "", "nullable": true }, - "budgetLimit": { - "type": "integer", - "description": "Budget limit percentage", - "x-example": 100, - "format": "int32", + "footer": { + "type": "boolean", + "description": "Is footer", + "x-example": "", "nullable": true } }, + "required": [ + "$id", + "template", + "title", + "description" + ], "example": { - "bandwidth": 5, - "storage": 150, - "users": 200000, - "executions": 750000, - "GBHours": 100, - "imageTransformations": 100, - "authPhone": 10, - "budgetLimit": 100 + "$id": "", + "template": "", + "title": "", + "description": "", + "plan": "", + "cta": "", + "claimed": "", + "unclaimed": "", + "image": "", + "reviews": "", + "onlyNewOrgs": "", + "footer": "" } }, - "billingPlan": { - "description": "billingPlan", + "coupon": { + "description": "Coupon", "type": "object", "properties": { "$id": { "type": "string", - "description": "Plan ID.", - "x-example": "tier-0" - }, - "name": { - "type": "string", - "description": "Plan name", - "x-example": "Hobby" + "description": "coupon ID", + "x-example": "NEWBONUS" }, - "desc": { + "code": { "type": "string", - "description": "Plan description", - "x-example": "Hobby plan" - }, - "order": { - "type": "integer", - "description": "Plan order", - "x-example": 0, - "format": "int32" + "description": "coupon ID", + "x-example": "NEWBONUS" }, - "price": { + "credits": { "type": "number", - "description": "Price", - "x-example": 25, - "format": "double" - }, - "trial": { - "type": "integer", - "description": "Trial days", - "x-example": 14, - "format": "int32" - }, - "bandwidth": { - "type": "integer", - "description": "Bandwidth", - "x-example": 25, - "format": "int32" - }, - "storage": { - "type": "integer", - "description": "Storage", - "x-example": 25, - "format": "int32" - }, - "imageTransformations": { - "type": "integer", - "description": "Image Transformations", - "x-example": 100, - "format": "int32" - }, - "screenshotsGenerated": { - "type": "integer", - "description": "Screenshots generated", + "description": "Provided credit amount", "x-example": 50, - "format": "int32" - }, - "members": { - "type": "integer", - "description": "Members", - "x-example": 25, - "format": "int32" - }, - "webhooks": { - "type": "integer", - "description": "Webhooks", - "x-example": 25, - "format": "int32" + "format": "double" }, - "projects": { - "type": "integer", - "description": "Projects", - "x-example": 2, - "format": "int32" + "expiration": { + "type": "string", + "description": "Coupon expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "platforms": { + "validity": { "type": "integer", - "description": "Platforms", - "x-example": 3, + "description": "Credit validity in days.", + "x-example": 180, "format": "int32" }, - "users": { - "type": "integer", - "description": "Users", - "x-example": 25, - "format": "int32" + "campaign": { + "type": "string", + "description": "Campaign the coupon is associated with`.", + "x-example": "AppwriteHeroes" }, - "teams": { - "type": "integer", - "description": "Teams", - "x-example": 25, - "format": "int32" + "status": { + "type": "string", + "description": "Status of the coupon. Can be one of `disabled`, `active` or `expired`.", + "x-example": "disabled" }, - "databases": { - "type": "integer", - "description": "Databases", - "x-example": 25, - "format": "int32" + "onlyNewOrgs": { + "type": "boolean", + "description": "If the coupon is only valid for new organizations or not.", + "x-example": true + } + }, + "required": [ + "$id", + "code", + "credits", + "expiration", + "validity", + "campaign", + "status", + "onlyNewOrgs" + ], + "example": { + "$id": "NEWBONUS", + "code": "NEWBONUS", + "credits": 50, + "expiration": "2020-10-15T06:38:00.000+00:00", + "validity": 180, + "campaign": "AppwriteHeroes", + "status": "disabled", + "onlyNewOrgs": true + } + }, + "credit": { + "description": "Credit", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Credit ID.", + "x-example": "5e5ea5c16897e" }, - "databasesReads": { - "type": "integer", - "description": "Database reads per month", - "x-example": 500000, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Credit creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "databasesWrites": { - "type": "integer", - "description": "Database writes per month", - "x-example": 250000, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Credit update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "databasesBatchSize": { - "type": "integer", - "description": "Database batch size limit", - "x-example": 100, - "format": "int32" + "$permissions": { + "type": "array", + "description": "Credit permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] }, - "buckets": { - "type": "integer", - "description": "Buckets", - "x-example": 25, - "format": "int32" + "couponId": { + "type": "string", + "description": "coupon ID", + "x-example": "NEWBONUS" }, - "fileSize": { - "type": "integer", - "description": "File size", - "x-example": 25, - "format": "int32" + "userId": { + "type": "string", + "description": "ID of the User.", + "x-example": "5e5ea5c16897e" }, - "functions": { - "type": "integer", - "description": "Functions", - "x-example": 25, - "format": "int32" + "teamId": { + "type": "string", + "description": "ID of the Team.", + "x-example": "5e5ea5c16897e" }, - "sites": { - "type": "integer", - "description": "Sites", - "x-example": 1, - "format": "int32" + "credits": { + "type": "number", + "description": "Provided credit amount", + "x-example": 50, + "format": "double" }, - "executions": { - "type": "integer", - "description": "Function executions", - "x-example": 25, - "format": "int32" + "total": { + "type": "number", + "description": "Provided credit amount", + "x-example": 50, + "format": "double" }, - "executionsRetentionCount": { - "type": "integer", - "description": "Rolling max executions retained per function\/site", - "x-example": 10000, - "format": "int32" + "expiration": { + "type": "string", + "description": "Credit expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "GBHours": { + "status": { + "type": "string", + "description": "Status of the credit. Can be one of `disabled`, `active` or `expired`.", + "x-example": "disabled" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "couponId", + "userId", + "teamId", + "credits", + "total", + "expiration", + "status" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "couponId": "NEWBONUS", + "userId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "credits": 50, + "total": 50, + "expiration": "2020-10-15T06:38:00.000+00:00", + "status": "disabled" + } + }, + "creditAvailable": { + "description": "CreditAvailable", + "type": "object", + "properties": { + "available": { "type": "integer", - "description": "GB hours for functions", + "description": "Total available credits for the organization.", "x-example": 100, "format": "int32" + } + }, + "required": [ + "available" + ], + "example": { + "available": 100 + } + }, + "creditList": { + "description": "CreditList", + "type": "object", + "properties": { + "credits": { + "type": "array", + "description": "Credits", + "items": { + "$ref": "#\/components\/schemas\/credit" + }, + "x-example": 5 }, - "realtime": { - "type": "integer", - "description": "Realtime connections", - "x-example": 25, - "format": "int32" - }, - "realtimeMessages": { + "total": { "type": "integer", - "description": "Realtime messages", - "x-example": 100000, + "description": "Total number of credits", + "x-example": 5, "format": "int32" }, - "messages": { - "type": "integer", - "description": "Messages per month", - "x-example": 1000, - "format": "int32" + "available": { + "type": "number", + "description": "Total available credit balance in USD", + "x-example": 5, + "format": "double" + } + }, + "required": [ + "credits", + "total", + "available" + ], + "example": { + "credits": 5, + "total": 5, + "available": 5 + } + }, + "databaseMigration": { + "description": "Database Migration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Database migration ID.", + "x-example": "5e5ea5c16897e" }, - "topics": { - "type": "integer", - "description": "Topics for messaging", - "x-example": 1, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Migration creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "authPhone": { - "type": "integer", - "description": "SMS authentications per month", - "x-example": 10, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Migration update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "domains": { - "type": "integer", - "description": "Custom domains", - "x-example": 5, - "format": "int32" + "projectId": { + "type": "string", + "description": "Project ID that owns the migrating database.", + "x-example": "5e5ea5c16897e" }, - "logs": { - "type": "integer", - "description": "Log days", - "x-example": 25, - "format": "int32" + "databaseId": { + "type": "string", + "description": "Logical database ID being migrated.", + "x-example": "5e5ea5c16897e" }, - "projectInactivityDays": { + "specification": { + "type": "string", + "description": "Dedicated compute specification provisioned for the migration target.", + "x-example": "s-2vcpu-4gb" + }, + "phase": { + "type": "string", + "description": "Migration phase. Possible values: pending, provisioned, capturing, backfilling, catching_up, verifying, ready_to_cutover, cutover, soaking, done, failed, rolled_back.", + "x-example": "pending" + }, + "attempt": { "type": "integer", - "description": "Number of days of console inactivity before a project is paused. 0 means pausing is disabled.", - "x-example": 7, + "description": "Number of times a migration step has failed and been recorded.", + "x-example": 0, "format": "int32" }, - "alertLimit": { + "lastError": { + "type": "string", + "description": "Reason the most recent migration step failed, empty while none has.", + "x-example": "" + }, + "lagDocuments": { "type": "integer", - "description": "Alert threshold percentage", - "x-example": 80, + "description": "Number of documents still pending replication to the target.", + "x-example": 0, "format": "int32" }, - "usage": { - "type": "object", - "description": "Additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/usageBillingPlan" - } - ] + "verifiedAt": { + "type": "string", + "description": "Time the migrated data was verified against the source in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "addons": { - "type": "object", - "description": "Addons", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlanAddon" - } - ] + "cutoverAt": { + "type": "string", + "description": "Time routing was flipped to the target in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "budgetCapEnabled": { - "type": "boolean", - "description": "Budget cap enabled or disabled.", - "x-example": true + "soakUntil": { + "type": "string", + "description": "Time the post-cutover soak window ends in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "customSmtp": { + "autoCutover": { "type": "boolean", - "description": "Custom SMTP", + "description": "Whether the migration cuts over automatically once ready.", "x-example": true }, - "emailBranding": { + "paused": { "type": "boolean", - "description": "Appwrite branding in email", - "x-example": true + "description": "Whether the migration is paused.", + "x-example": false + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "projectId", + "databaseId", + "specification", + "phase", + "attempt", + "lastError", + "lagDocuments", + "verifiedAt", + "cutoverAt", + "soakUntil", + "autoCutover", + "paused" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "databaseId": "5e5ea5c16897e", + "specification": "s-2vcpu-4gb", + "phase": "pending", + "attempt": 0, + "lastError": "", + "lagDocuments": 0, + "verifiedAt": "2020-10-15T06:38:00.000+00:00", + "cutoverAt": "2020-10-15T06:38:00.000+00:00", + "soakUntil": "2020-10-15T06:38:00.000+00:00", + "autoCutover": true, + "paused": false + } + }, + "dedicatedDatabase": { + "description": "DedicatedDatabase", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Dedicated database ID.", + "x-example": "5e5ea5c16897e" }, - "requiresPaymentMethod": { - "type": "boolean", - "description": "Does plan require payment method", - "x-example": true + "$createdAt": { + "type": "string", + "description": "Database creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "requiresBillingAddress": { - "type": "boolean", - "description": "Does plan require billing address", - "x-example": true + "$updatedAt": { + "type": "string", + "description": "Database update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "isAvailable": { - "type": "boolean", - "description": "Is the billing plan available", - "x-example": true + "projectId": { + "type": "string", + "description": "Project ID that owns this database.", + "x-example": "5e5ea5c16897e" }, - "selfService": { - "type": "boolean", - "description": "Can user change the plan themselves", - "x-example": true + "name": { + "type": "string", + "description": "Database display name.", + "x-example": "My Production Database" }, - "premiumSupport": { - "type": "boolean", - "description": "Does plan enable premium support", - "x-example": true + "api": { + "type": "string", + "description": "Product API that owns this database: tablesdb, documentsdb, vectorsdb, mysql, postgresql, or mongodb.", + "x-example": "postgresql" }, - "budgeting": { - "type": "boolean", - "description": "Does plan support budget cap", - "x-example": true + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb.", + "x-example": "postgresql" }, - "supportsMockNumbers": { - "type": "boolean", - "description": "Does plan support mock numbers", - "x-example": true + "version": { + "type": "string", + "description": "Database engine version.", + "x-example": "16" }, - "supportsOrganizationRoles": { - "type": "boolean", - "description": "Does plan support organization roles", - "x-example": true + "specification": { + "type": "string", + "description": "Specification identifier.", + "x-example": "s-2vcpu-2gb" }, - "supportsCredits": { - "type": "boolean", - "description": "Does plan support credit", - "x-example": true + "backend": { + "type": "string", + "description": "Database backend provider. Possible values: prisma, edge.", + "x-example": "edge" }, - "supportsDisposableEmailValidation": { - "type": "boolean", - "description": "Does plan support blocking disposable email addresses.", - "x-example": true + "hostname": { + "type": "string", + "description": "Database hostname for connections.", + "x-example": "db-myproject-mydb.fra.appwrite.center" }, - "supportsCanonicalEmailValidation": { - "type": "boolean", - "description": "Does plan support requiring canonical email addresses.", - "x-example": true + "connectionPort": { + "type": "integer", + "description": "Database port for connections. Derived from the engine when the backing has not reported one yet.", + "x-example": 5432, + "format": "int32" }, - "supportsFreeEmailValidation": { - "type": "boolean", - "description": "Does plan support blocking free email addresses.", - "x-example": true + "connectionUser": { + "type": "string", + "description": "Database username for connections.", + "x-example": "appwrite_user" }, - "supportsCorporateEmailValidation": { - "type": "boolean", - "description": "Does plan support restricting sign-ups to corporate email addresses only.", - "x-example": true + "connectionPassword": { + "type": "string", + "description": "Database password for connections.", + "x-example": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }, - "supportsProjectSpecificRoles": { - "type": "boolean", - "description": "Does plan support project-specific member roles.", - "x-example": true + "connectionString": { + "type": "string", + "description": "Full database connection string (URI format).", + "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require" }, - "backupsEnabled": { + "ssl": { "type": "boolean", - "description": "Does plan support backup policies.", + "description": "Whether SSL\/TLS is required for client connections.", "x-example": true }, - "usagePerProject": { - "type": "boolean", - "description": "Whether usage addons are calculated per project.", - "x-example": true + "status": { + "type": "string", + "description": "Database status. Possible values: provisioning, ready, inactive, paused, failed, deleted, restoring, scaling.", + "x-example": "ready" }, - "supportedAddons": { - "type": "object", - "description": "Supported addons for this plan", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlanSupportedAddons" - } - ] + "containerStatus": { + "type": "string", + "description": "Container status for lifecycle-managed database runtimes: active or inactive.", + "x-example": "active" }, - "backupPolicies": { + "lastAccessedAt": { + "type": "string", + "description": "Last activity timestamp in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "idleUntil": { + "type": "string", + "description": "Display-only timestamp when the database is expected to be considered idle (ISO 8601 format). Derived from last activity; lifecycle transitions are driven by lifecycleState.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "lifecycleState": { + "type": "string", + "description": "Idle-lifecycle state of the database. Possible values: active, warm, cold, hibernated.", + "x-example": "active" + }, + "idleTimeoutMinutes": { "type": "integer", - "description": "How many policies does plan support", - "x-example": true, + "description": "Minutes of inactivity before container scales to zero.", + "x-example": 15, "format": "int32" }, - "deploymentSize": { + "cpu": { "type": "integer", - "description": "Maximum function and site deployment size in MB", - "x-example": 30, + "description": "CPU allocated in millicores.", + "x-example": 2000, "format": "int32" }, - "buildSize": { + "memory": { "type": "integer", - "description": "Maximum function and site deployment size in MB", - "x-example": 2000, + "description": "Memory allocated in MB.", + "x-example": 4096, "format": "int32" }, - "databasesAllowEncrypt": { - "type": "boolean", - "description": "Does the plan support encrypted string attributes or not.", - "x-example": false + "storage": { + "type": "integer", + "description": "Storage allocated in GB.", + "x-example": 100, + "format": "int32" }, - "limits": { - "type": "object", - "description": "Plan specific limits", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlanLimits" - } - ], - "nullable": true + "storageClass": { + "type": "string", + "description": "Storage class. Currently always 'ssd'; DigitalOcean exposes a single block-storage class.", + "x-example": "ssd" }, - "group": { + "storageMaxGb": { + "type": "integer", + "description": "Maximum storage allowed in GB. 0 means use system default.", + "x-example": 100, + "format": "int32" + }, + "nodePool": { "type": "string", - "description": "Group of this billing plan for variants", - "x-example": "pro", - "enum": [ - "starter", - "pro", - "scale" - ] + "description": "Kubernetes node pool where the database is scheduled.", + "x-example": "db-pool-4vcpu-8gb" }, - "program": { - "type": "object", - "description": "Details of the program this plan is a part of.", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/program" - } - ], - "nullable": true - } - }, - "required": [ - "$id", - "name", - "desc", - "order", - "price", - "trial", - "bandwidth", - "storage", - "imageTransformations", - "screenshotsGenerated", - "members", - "webhooks", - "projects", - "platforms", - "users", - "teams", - "databases", - "databasesReads", - "databasesWrites", - "databasesBatchSize", - "buckets", - "fileSize", - "functions", - "sites", - "executions", - "executionsRetentionCount", - "GBHours", - "realtime", - "realtimeMessages", - "messages", - "topics", - "authPhone", - "domains", - "logs", - "projectInactivityDays", - "alertLimit", - "usage", - "addons", - "budgetCapEnabled", - "customSmtp", - "emailBranding", - "requiresPaymentMethod", - "requiresBillingAddress", - "isAvailable", - "selfService", - "premiumSupport", - "budgeting", - "supportsMockNumbers", - "supportsOrganizationRoles", - "supportsCredits", - "supportsDisposableEmailValidation", - "supportsCanonicalEmailValidation", - "supportsFreeEmailValidation", - "supportsCorporateEmailValidation", - "supportsProjectSpecificRoles", - "backupsEnabled", - "usagePerProject", - "supportedAddons", - "backupPolicies", - "deploymentSize", - "buildSize", - "databasesAllowEncrypt", - "group" - ], - "example": { - "$id": "tier-0", - "name": "Hobby", - "desc": "Hobby plan", - "order": 0, - "price": 25, - "trial": 14, - "bandwidth": 25, - "storage": 25, - "imageTransformations": 100, - "screenshotsGenerated": 50, - "members": 25, - "webhooks": 25, - "projects": 2, - "platforms": 3, - "users": 25, - "teams": 25, - "databases": 25, - "databasesReads": 500000, - "databasesWrites": 250000, - "databasesBatchSize": 100, - "buckets": 25, - "fileSize": 25, - "functions": 25, - "sites": 1, - "executions": 25, - "executionsRetentionCount": 10000, - "GBHours": 100, - "realtime": 25, - "realtimeMessages": 100000, - "messages": 1000, - "topics": 1, - "authPhone": 10, - "domains": 5, - "logs": 25, - "projectInactivityDays": 7, - "alertLimit": 80, - "usage": null, - "addons": null, - "budgetCapEnabled": true, - "customSmtp": true, - "emailBranding": true, - "requiresPaymentMethod": true, - "requiresBillingAddress": true, - "isAvailable": true, - "selfService": true, - "premiumSupport": true, - "budgeting": true, - "supportsMockNumbers": true, - "supportsOrganizationRoles": true, - "supportsCredits": true, - "supportsDisposableEmailValidation": true, - "supportsCanonicalEmailValidation": true, - "supportsFreeEmailValidation": true, - "supportsCorporateEmailValidation": true, - "supportsProjectSpecificRoles": true, - "backupsEnabled": true, - "usagePerProject": true, - "supportedAddons": null, - "backupPolicies": true, - "deploymentSize": 30, - "buildSize": 2000, - "databasesAllowEncrypt": false, - "limits": null, - "group": "pro", - "program": null - } - }, - "billingPlanAddon": { - "description": "Addon", - "type": "object", - "properties": { - "seats": { - "type": "object", - "description": "Addon seats", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlanAddonDetails" - } - ] + "replicas": { + "type": "integer", + "description": "Number of high availability replicas. High availability is enabled when greater than 0.", + "x-example": 2, + "format": "int32" }, - "projects": { - "type": "object", - "description": "Addon projects", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlanAddonDetails" - } + "syncMode": { + "type": "string", + "description": "Replication sync mode: async, sync, or quorum.", + "x-example": "async" + }, + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region replicas. Cross-region availability is enabled when greater than 0.", + "x-example": 1, + "format": "int32" + }, + "networkMaxConnections": { + "type": "integer", + "description": "Maximum concurrent client connections. This is the limit a client pool may reach; the engine's own max_connections reported by the status endpoint is a smaller backend limit the pooler multiplexes onto and does not constrain a client pool.", + "x-example": 500, + "format": "int32" + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "x-example": 900, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "items": { + "type": "string" + }, + "x-example": [ + "10.0.0.0\/8", + "192.168.1.0\/24" ] - } - }, - "required": [ - "seats", - "projects" - ], - "example": { - "seats": null, - "projects": null - } - }, - "billingPlanAddonDetails": { - "description": "Details", - "type": "object", - "properties": { - "supported": { + }, + "backupEnabled": { "type": "boolean", - "description": "Is the addon supported in the plan?", + "description": "Whether automatic backups are enabled.", "x-example": true }, - "planIncluded": { + "pitr": { + "type": "boolean", + "description": "Whether point-in-time recovery is enabled.", + "x-example": true + }, + "pitrRetentionDays": { "type": "integer", - "description": "Addon plan included value", - "x-example": 1, + "description": "Number of days to retain PITR data.", + "x-example": 14, "format": "int32" }, - "limit": { + "storageAutoscaling": { + "type": "boolean", + "description": "Whether automatic storage expansion is enabled.", + "x-example": true + }, + "storageAutoscalingThresholdPercent": { "type": "integer", - "description": "Addon limit", - "x-example": 5, + "description": "Storage usage percentage that triggers automatic expansion.", + "x-example": 85, "format": "int32" }, - "type": { - "type": "string", - "description": "Addon type", - "x-example": "numeric" + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 500, + "format": "int32" }, - "currency": { + "maintenanceWindowDay": { "type": "string", - "description": "Price currency", - "x-example": "USD" + "description": "Day of the week for the maintenance window. Possible values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" }, - "price": { - "type": "number", - "description": "Price", - "x-example": 5, - "format": "double" + "maintenanceWindowHourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) when the maintenance window starts.", + "x-example": 3, + "format": "int32" }, - "value": { + "metricsEnabled": { + "type": "boolean", + "description": "Whether metrics collection is enabled.", + "x-example": false + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Whether the SQL API sidecar is enabled for this database.", + "x-example": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types accepted by the SQL API. Defaults to read\/write DML only; DDL\/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "items": { + "type": "string" + }, + "x-example": "SELECT" + }, + "sqlApiMaxRows": { "type": "integer", - "description": "Resource value", - "x-example": 25, + "description": "Maximum rows returned per SQL API execution. Results larger than this are truncated.", + "x-example": 10000, "format": "int32" }, - "invoiceDesc": { + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes. Results larger than this are truncated.", + "x-example": 10485760, + "format": "int32" + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum server-side SQL API execution time in seconds before the query is cancelled.", + "x-example": 30, + "format": "int32" + }, + "error": { "type": "string", - "description": "Description on invoice", + "description": "Error message if status is failed.", "x-example": "" } }, "required": [ - "supported", - "planIncluded", - "limit", - "type", - "currency", - "price", - "value", - "invoiceDesc" + "$id", + "$createdAt", + "$updatedAt", + "projectId", + "name", + "api", + "engine", + "version", + "specification", + "backend", + "hostname", + "connectionPort", + "connectionUser", + "connectionPassword", + "connectionString", + "ssl", + "status", + "containerStatus", + "lifecycleState", + "idleTimeoutMinutes", + "cpu", + "memory", + "storage", + "storageClass", + "storageMaxGb", + "nodePool", + "replicas", + "syncMode", + "crossRegionReplicas", + "networkMaxConnections", + "networkIdleTimeoutSeconds", + "networkIPAllowlist", + "backupEnabled", + "pitr", + "pitrRetentionDays", + "storageAutoscaling", + "storageAutoscalingThresholdPercent", + "storageAutoscalingMaxGb", + "maintenanceWindowDay", + "maintenanceWindowHourUtc", + "metricsEnabled", + "sqlApiEnabled", + "sqlApiAllowedStatements", + "sqlApiMaxRows", + "sqlApiMaxBytes", + "sqlApiTimeoutSeconds", + "error" ], "example": { - "supported": true, - "planIncluded": 1, - "limit": 5, - "type": "numeric", - "currency": "USD", - "price": 5, - "value": 25, - "invoiceDesc": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "name": "My Production Database", + "api": "postgresql", + "engine": "postgresql", + "version": "16", + "specification": "s-2vcpu-2gb", + "backend": "edge", + "hostname": "db-myproject-mydb.fra.appwrite.center", + "connectionPort": 5432, + "connectionUser": "appwrite_user", + "connectionPassword": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", + "connectionString": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require", + "ssl": true, + "status": "ready", + "containerStatus": "active", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00", + "idleUntil": "2020-10-15T06:38:00.000+00:00", + "lifecycleState": "active", + "idleTimeoutMinutes": 15, + "cpu": 2000, + "memory": 4096, + "storage": 100, + "storageClass": "ssd", + "storageMaxGb": 100, + "nodePool": "db-pool-4vcpu-8gb", + "replicas": 2, + "syncMode": "async", + "crossRegionReplicas": 1, + "networkMaxConnections": 500, + "networkIdleTimeoutSeconds": 900, + "networkIPAllowlist": [ + "10.0.0.0\/8", + "192.168.1.0\/24" + ], + "backupEnabled": true, + "pitr": true, + "pitrRetentionDays": 14, + "storageAutoscaling": true, + "storageAutoscalingThresholdPercent": 85, + "storageAutoscalingMaxGb": 500, + "maintenanceWindowDay": "sun", + "maintenanceWindowHourUtc": 3, + "metricsEnabled": false, + "sqlApiEnabled": true, + "sqlApiAllowedStatements": "SELECT", + "sqlApiMaxRows": 10000, + "sqlApiMaxBytes": 10485760, + "sqlApiTimeoutSeconds": 30, + "error": "" } }, - "billingPlanLimits": { - "description": "PlanLimits", + "dedicatedDatabaseExecution": { + "description": "Execution", "type": "object", "properties": { - "credits": { + "rows": { + "type": "object", + "additionalProperties": true, + "description": "Result rows as a list of column-name => value maps. Empty for non-returning statements.", + "x-example": [ + { + "id": 1, + "name": "example" + } + ] + }, + "rowCount": { "type": "integer", - "description": "Credits limit per billing cycle", - "x-example": 100, - "format": "int32", - "nullable": true + "description": "Number of rows returned (for SELECT) or affected (for INSERT\/UPDATE\/DELETE).", + "x-example": 1, + "format": "int32" }, - "dailyCredits": { + "columns": { + "type": "array", + "description": "Column metadata in result-set order.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecutionColumn" + }, + "x-example": [] + }, + "durationMs": { "type": "integer", - "description": "Daily credits limit (if applicable)", - "x-example": 5, - "format": "int32", - "nullable": true + "description": "Server-side execution time in milliseconds.", + "x-example": 12, + "format": "int32" + }, + "truncated": { + "type": "boolean", + "description": "True when the configured row or byte cap was hit and the result was truncated.", + "x-example": false + }, + "bytes": { + "type": "integer", + "description": "Serialised payload size in bytes.", + "x-example": 1024, + "format": "int32" } }, + "required": [ + "rows", + "rowCount", + "columns", + "durationMs", + "truncated", + "bytes" + ], "example": { - "credits": 100, - "dailyCredits": 5 + "rows": [ + { + "id": 1, + "name": "example" + } + ], + "rowCount": 1, + "columns": [], + "durationMs": 12, + "truncated": false, + "bytes": 1024 } }, - "billingPlanSupportedAddons": { - "description": "BillingPlanSupportedAddons", + "dedicatedDatabaseExecutionColumn": { + "description": "ExecutionColumn", "type": "object", "properties": { - "baa": { - "type": "boolean", - "description": "Whether the plan supports BAA (Business Associate Agreement) addon", - "x-example": true + "name": { + "type": "string", + "description": "Column name as returned by the database.", + "x-example": "id" + }, + "type": { + "type": "string", + "description": "Engine-specific column type (e.g. int4, text, timestamptz).", + "x-example": "int4" } }, "required": [ - "baa" + "name", + "type" ], "example": { - "baa": true + "name": "id", + "type": "int4" } }, - "block": { - "description": "Block", + "dedicatedDatabaseRestoration": { + "description": "Restoration", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Restoration ID.", + "x-example": "5e5ea5c16897e" + }, "$createdAt": { "type": "string", - "description": "Block creation date in ISO 8601 format.", + "description": "Restoration creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "resourceType": { + "databaseId": { "type": "string", - "description": "Resource type that is blocked", - "x-example": "project" + "description": "Database ID being restored.", + "x-example": "5e5ea5c16897e" }, - "resourceId": { + "projectId": { "type": "string", - "description": "Resource identifier that is blocked", + "description": "Project ID.", "x-example": "5e5ea5c16897e" }, - "reason": { + "backupId": { "type": "string", - "description": "Reason for the block. Can be null if no reason was provided.", - "x-example": "Payment overdue", - "nullable": true + "description": "Backup ID used for restoration (null for PITR).", + "x-example": "5e5ea5c16897e" }, - "expiredAt": { + "type": { "type": "string", - "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Restoration type. Possible values: backup (restore from a specific backup snapshot), pitr (point-in-time recovery to a specific timestamp).", + "x-example": "backup" }, - "projectName": { + "status": { "type": "string", - "description": "Name of the project this block applies to.", - "x-example": "My Project" + "description": "Restoration status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error).", + "x-example": "completed" }, - "region": { + "targetTime": { "type": "string", - "description": "Region of the project this block applies to.", - "x-example": "fra" + "description": "Target time for PITR restoration in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "organizationName": { + "startedAt": { "type": "string", - "description": "Name of the organization that owns the project.", - "x-example": "Acme Inc." + "description": "Restoration start time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "organizationId": { + "completedAt": { "type": "string", - "description": "ID of the organization that owns the project.", - "x-example": "5e5ea5c16897e" + "description": "Restoration completion time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "billingPlan": { + "error": { "type": "string", - "description": "Billing plan of the organization that owns the project.", - "x-example": "pro" + "description": "Error message if restoration failed.", + "x-example": "" } }, "required": [ + "$id", "$createdAt", - "resourceType", - "resourceId", - "projectName", - "region", - "organizationName", - "organizationId", - "billingPlan" + "databaseId", + "projectId", + "backupId", + "type", + "status", + "targetTime", + "startedAt", + "completedAt", + "error" ], "example": { + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceType": "project", - "resourceId": "5e5ea5c16897e", - "reason": "Payment overdue", - "expiredAt": "2020-10-15T06:38:00.000+00:00", - "projectName": "My Project", - "region": "fra", - "organizationName": "Acme Inc.", - "organizationId": "5e5ea5c16897e", - "billingPlan": "pro" + "databaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "backupId": "5e5ea5c16897e", + "type": "backup", + "status": "completed", + "targetTime": "2020-10-15T06:38:00.000+00:00", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "error": "" } }, - "blockDelete": { - "description": "BlockDelete", + "databaseStatus": { + "description": "Status", "type": "object", "properties": { - "deleted": { + "health": { + "type": "string", + "description": "Overall health status: healthy, degraded, or unhealthy.", + "x-example": "healthy" + }, + "ready": { + "type": "boolean", + "description": "Whether the database is ready to accept connections.", + "x-example": true + }, + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb.", + "x-example": "postgresql" + }, + "version": { + "type": "string", + "description": "Database engine version.", + "x-example": "17" + }, + "uptime": { "type": "integer", - "description": "Number of blocks deleted", - "x-example": 1, + "description": "Database uptime in seconds.", + "x-example": 86400, "format": "int32" }, - "blocks": { - "type": "array", - "description": "List of deleted blocks", - "items": { - "$ref": "#\/components\/schemas\/block" + "connections": { + "type": "object", + "description": "Connection statistics.", + "x-example": { + "current": 12, + "max": 100 }, - "x-example": [] - } - }, - "required": [ - "deleted", - "blocks" - ], - "example": { - "deleted": 1, - "blocks": [] - } - }, - "dedicatedDatabaseBranch": { - "description": "Branch", - "type": "object", - "properties": { - "branchId": { - "type": "string", - "description": "Branch identifier.", - "x-example": "a1b2c3d4" + "allOf": [ + { + "$ref": "#\/components\/schemas\/databaseStatusConnections" + } + ] }, - "branchName": { - "type": "string", - "description": "Branch name.", - "x-example": "branch-a1b2c3d4" + "syncMode": { + "type": "string", + "description": "Requested replication sync mode. Possible values: async, sync, quorum. Compare with effectiveSyncMode for what the primary is enforcing.", + "x-example": "async" }, - "namespace": { + "effectiveSyncMode": { "type": "string", - "description": "Kubernetes namespace where the branch is deployed.", - "x-example": "db-myproject-mydb-branch-a1b2c3d4" + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read.", + "x-example": "async", + "nullable": true }, - "expiresAt": { + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "x-example": false + }, + "syncAcknowledgements": { "type": "integer", - "description": "Unix timestamp when the branch expires.", - "x-example": 1711411200, + "description": "Number of standby acknowledgements the primary waits for before a write is committed.", + "x-example": 1, "format": "int32" }, - "host": { - "type": "string", - "description": "Branch hostname for direct connections.", - "x-example": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center" - }, - "port": { + "syncStandbyCount": { "type": "integer", - "description": "Branch port.", - "x-example": 5432, + "description": "Number of standbys registered with the primary for synchronous replication.", + "x-example": 2, "format": "int32" }, - "database": { - "type": "string", - "description": "Database name the client sends for routing to the branch.", - "x-example": "db-myproject-mydb-a1b2c3d4" - }, - "username": { - "type": "string", - "description": "Database username. Shared with the parent database.", - "x-example": "appwrite" - }, - "password": { - "type": "string", - "description": "Database password. Shared with the parent database.", - "x-example": "********" - }, - "ssl": { + "syncStateConfirmed": { "type": "boolean", - "description": "Whether SSL is required.", - "x-example": false + "description": "Whether the reported sync state was read from the engine. When false the state could not be confirmed and the other sync fields carry no reading.", + "x-example": true }, - "engine": { - "type": "string", - "description": "Database engine. Possible values: postgres, mysql, mariadb, mongodb.", - "x-example": "postgres" + "replicas": { + "type": "array", + "description": "List of database replicas and their status. Every configured member appears, including one the backend has not brought up, which is reported as not healthy.", + "items": { + "$ref": "#\/components\/schemas\/databaseStatusReplica" + }, + "x-example": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "lagSeconds": 0.2 + } + ] }, - "connectionString": { - "type": "string", - "description": "Full connection string for the branch.", - "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" - } - }, - "required": [ - "branchId", - "branchName", - "namespace", - "expiresAt", - "host", - "port", - "database", - "username", - "password", - "ssl", - "engine", - "connectionString" - ], - "example": { - "branchId": "a1b2c3d4", - "branchName": "branch-a1b2c3d4", - "namespace": "db-myproject-mydb-branch-a1b2c3d4", - "expiresAt": 1711411200, - "host": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center", - "port": 5432, - "database": "db-myproject-mydb-a1b2c3d4", - "username": "appwrite", - "password": "********", - "ssl": false, - "engine": "postgres", - "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" - } - }, - "dedicatedDatabaseBranchList": { - "description": "BranchList", - "type": "object", - "properties": { - "branches": { + "volumes": { "type": "array", - "description": "List of branches.", + "description": "Storage volume information.", "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseBranch" + "$ref": "#\/components\/schemas\/databaseStatusVolume" }, - "x-example": [] + "x-example": { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } } }, "required": [ - "branches" + "health", + "ready", + "engine", + "version", + "uptime", + "connections", + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "syncStateConfirmed", + "replicas", + "volumes" ], "example": { - "branches": [] + "health": "healthy", + "ready": true, + "engine": "postgresql", + "version": "17", + "uptime": 86400, + "connections": { + "current": 12, + "max": 100 + }, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "replicas": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "lagSeconds": 0.2 + } + ], + "volumes": { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } } }, - "campaign": { - "description": "Campaign", + "dnsRecord": { + "description": "DNSRecord", "type": "object", "properties": { "$id": { "type": "string", - "description": "Campaign ID", - "x-example": "" + "description": "DNS Record ID.", + "x-example": "5f40a6e10c65e" }, - "template": { + "$createdAt": { "type": "string", - "description": "Campaign template", - "x-example": "" + "description": "DNS Record creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "title": { + "$updatedAt": { "type": "string", - "description": "Campaign title", - "x-example": "" + "description": "DNS Record update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "description": { + "type": { "type": "string", - "description": "Campaign description", - "x-example": "" + "description": "DNS record type (e.g. A, CNAME, MX).", + "x-example": "A" }, - "plan": { + "name": { "type": "string", - "description": "Billing plan campaign is associated with", - "x-example": "", - "nullable": true + "description": "Record name or subdomain.", + "x-example": "mail" }, - "cta": { + "value": { "type": "string", - "description": "Campaign CTA", - "x-example": "", - "nullable": true + "description": "Value of the record (IP address, domain, etc.).", + "x-example": "192.0.2.1" }, - "claimed": { - "type": "string", - "description": "Campaign info when claimed", - "x-example": "", - "nullable": true + "ttl": { + "type": "integer", + "description": "Time to live (in seconds).", + "x-example": 86400, + "format": "int32" }, - "unclaimed": { - "type": "string", - "description": "Campaign infor when unclaimed", - "x-example": "", - "nullable": true + "priority": { + "type": "integer", + "description": "Record priority (commonly used for MX).", + "x-example": 10, + "format": "int32" }, - "image": { - "type": "object", - "additionalProperties": true, - "description": "Campaign images", - "x-example": "" + "lock": { + "type": "boolean", + "description": "Whether this record is locked (read-only).", + "x-example": false }, - "reviews": { - "type": "array", - "description": "Campaign reviews", - "items": { - "$ref": "#\/components\/schemas\/review" - }, - "x-example": "", - "nullable": true + "weight": { + "type": "integer", + "description": "Record weight (used for SRV records).", + "x-example": 10, + "format": "int32" }, - "onlyNewOrgs": { - "type": "boolean", - "description": "Campaign valid only for new orgs.", - "x-example": "", - "nullable": true + "port": { + "type": "integer", + "description": "Target port (used for SRV records).", + "x-example": 443, + "format": "int32" }, - "footer": { - "type": "boolean", - "description": "Is footer", - "x-example": "", - "nullable": true + "comment": { + "type": "string", + "description": "Comment for the DNS record.", + "x-example": "Mail server record" } }, "required": [ "$id", - "template", - "title", - "description" + "$createdAt", + "$updatedAt", + "type", + "name", + "value", + "ttl", + "priority", + "lock", + "weight", + "port", + "comment" ], "example": { - "$id": "", - "template": "", - "title": "", - "description": "", - "plan": "", - "cta": "", - "claimed": "", - "unclaimed": "", - "image": "", - "reviews": "", - "onlyNewOrgs": "", - "footer": "" + "$id": "5f40a6e10c65e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "type": "A", + "name": "mail", + "value": "192.0.2.1", + "ttl": 86400, + "priority": 10, + "lock": false, + "weight": 10, + "port": 443, + "comment": "Mail server record" } }, - "dedicatedDatabaseConnection": { - "description": "Connection", + "domain": { + "description": "Domain", "type": "object", "properties": { "$id": { "type": "string", - "description": "Connection ID.", + "description": "Domain ID.", "x-example": "5e5ea5c16897e" }, - "username": { + "$createdAt": { "type": "string", - "description": "Connection username.", - "x-example": "app_readonly" + "description": "Domain creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "database": { + "$updatedAt": { "type": "string", - "description": "Database name.", - "x-example": "appwrite" + "description": "Domain update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "role": { + "domain": { "type": "string", - "description": "Connection role. Common values: readonly, readwrite.", - "x-example": "readonly" + "description": "Domain name.", + "x-example": "example.com" }, - "$createdAt": { - "type": "string", - "description": "Connection creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "username", - "database", - "role", - "$createdAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "username": "app_readonly", - "database": "appwrite", - "role": "readonly", - "$createdAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "coupon": { - "description": "Coupon", - "type": "object", - "properties": { - "$id": { + "registrar": { "type": "string", - "description": "coupon ID", - "x-example": "NEWBONUS" + "description": "Domain registrar (e.g. \"appwrite\" or \"third_party\").", + "x-example": "appwrite" }, - "code": { + "nameservers": { "type": "string", - "description": "coupon ID", - "x-example": "NEWBONUS" + "description": "Nameservers setting. \"Appwrite\" or empty string.", + "x-example": "Appwrite" }, - "credits": { - "type": "number", - "description": "Provided credit amount", - "x-example": 50, - "format": "double" + "expire": { + "type": "string", + "description": "Domain expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "expiration": { + "renewal": { "type": "string", - "description": "Coupon expiration time in ISO 8601 format.", + "description": "Domain renewal date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "validity": { + "autoRenewal": { + "type": "boolean", + "description": "If set to true, the domain will automatically renew.", + "x-example": true + }, + "renewalPrice": { "type": "integer", - "description": "Credit validity in days.", - "x-example": 180, + "description": "Renewal price (in cents).", + "x-example": 2599, "format": "int32" }, - "campaign": { + "transferStatus": { "type": "string", - "description": "Campaign the coupon is associated with`.", - "x-example": "AppwriteHeroes" + "description": "Transfer status for domains being transferred in.", + "x-example": "pending_registry", + "enum": [ + "transferrable", + "not_transferrable", + "pending_owner", + "pending_admin", + "pending_registry", + "completed", + "cancelled", + "service_unavailable" + ], + "x-enum-name": "DomainTransferStatusEnum" }, - "status": { + "teamId": { "type": "string", - "description": "Status of the coupon. Can be one of `disabled`, `active` or `expired`.", - "x-example": "disabled" + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "onlyNewOrgs": { - "type": "boolean", - "description": "If the coupon is only valid for new organizations or not.", - "x-example": true + "dnsRecords": { + "type": "array", + "description": "Dns records", + "items": { + "$ref": "#\/components\/schemas\/dnsRecord" + }, + "x-example": [] } }, "required": [ "$id", - "code", - "credits", - "expiration", - "validity", - "campaign", - "status", - "onlyNewOrgs" + "$createdAt", + "$updatedAt", + "domain", + "registrar", + "nameservers", + "expire", + "renewal", + "autoRenewal", + "renewalPrice", + "transferStatus", + "teamId", + "dnsRecords" ], "example": { - "$id": "NEWBONUS", - "code": "NEWBONUS", - "credits": 50, - "expiration": "2020-10-15T06:38:00.000+00:00", - "validity": 180, - "campaign": "AppwriteHeroes", - "status": "disabled", - "onlyNewOrgs": true + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "example.com", + "registrar": "appwrite", + "nameservers": "Appwrite", + "expire": "2020-10-15T06:38:00.000+00:00", + "renewal": "2020-10-15T06:38:00.000+00:00", + "autoRenewal": true, + "renewalPrice": 2599, + "transferStatus": "pending_registry", + "teamId": "5e5ea5c16897e", + "dnsRecords": [] } }, - "dedicatedDatabaseCredentials": { - "description": "Credentials", + "domainPrice": { + "description": "DomainPrice", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "host": { - "type": "string", - "description": "Database hostname.", - "x-example": "db-myproject-mydb.fra.appwrite.center" - }, - "port": { - "type": "integer", - "description": "Database port.", - "x-example": 5432, - "format": "int32" - }, - "username": { + "domain": { "type": "string", - "description": "Database username.", - "x-example": "appwrite" + "description": "Domain name.", + "x-example": "example.com" }, - "password": { + "tld": { "type": "string", - "description": "Database password.", - "x-example": "********" + "description": "Top-level domain for the requested domain.", + "x-example": "com" }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" + "available": { + "type": "boolean", + "description": "Whether the domain is currently available for registration.", + "x-example": true }, - "tcpHost": { - "type": "string", - "description": "Database TCP hostname or address.", - "x-example": "db-myproject-mydb.fra.appwrite.center" + "price": { + "type": "number", + "description": "Domain registration price.", + "x-example": 25.99, + "format": "double" }, - "tcpPort": { + "periodYears": { "type": "integer", - "description": "Database TCP port.", - "x-example": 5432, + "description": "Price period in years.", + "x-example": 1, "format": "int32" }, - "tcpDatabase": { - "type": "string", - "description": "Database name for direct TCP connections.", - "x-example": "appwrite" - }, - "engine": { - "type": "string", - "description": "Database engine. Possible values: postgres, mysql, mariadb, mongodb.", - "x-example": "postgres" - }, - "ssl": { + "premium": { "type": "boolean", - "description": "Whether SSL is required.", + "description": "Whether the domain is a premium domain.", "x-example": false - }, - "connectionString": { - "type": "string", - "description": "Full connection string.", - "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" } }, "required": [ - "$id", - "host", - "port", - "username", - "password", - "database", - "tcpHost", - "tcpPort", - "tcpDatabase", - "engine", - "ssl", - "connectionString" + "domain", + "tld", + "available", + "price", + "periodYears", + "premium" ], "example": { - "$id": "5e5ea5c16897e", - "host": "db-myproject-mydb.fra.appwrite.center", - "port": 5432, - "username": "appwrite", - "password": "********", - "database": "appwrite", - "tcpHost": "db-myproject-mydb.fra.appwrite.center", - "tcpPort": 5432, - "tcpDatabase": "appwrite", - "engine": "postgres", - "ssl": false, - "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb.fra.appwrite.center:5432\/appwrite?sslmode=disable" + "domain": "example.com", + "tld": "com", + "available": true, + "price": 25.99, + "periodYears": 1, + "premium": false } }, - "credit": { - "description": "Credit", + "domainPurchase": { + "description": "DomainPurchase", "type": "object", "properties": { "$id": { "type": "string", - "description": "Credit ID.", + "description": "Purchase\/invoice ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Credit creation time in ISO 8601 format.", + "description": "Purchase creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Credit update date in ISO 8601 format.", + "description": "Purchase update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$permissions": { - "type": "array", - "description": "Credit permissions. [Learn more about permissions](\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] + "domainId": { + "type": "string", + "description": "Domain document ID.", + "x-example": "5e5ea5c16897e" }, - "couponId": { + "domain": { "type": "string", - "description": "coupon ID", - "x-example": "NEWBONUS" + "description": "Domain name.", + "x-example": "example.com" }, - "userId": { + "organizationId": { "type": "string", - "description": "ID of the User.", + "description": "Team ID that owns the domain.", "x-example": "5e5ea5c16897e" }, - "teamId": { + "status": { "type": "string", - "description": "ID of the Team.", - "x-example": "5e5ea5c16897e" + "description": "Domain purchase status.", + "x-example": "pending", + "enum": [ + "pending", + "succeeded", + "failed", + "cancelled" + ], + "x-enum-name": "DomainPurchaseStatus" }, - "credits": { - "type": "number", - "description": "Provided credit amount", - "x-example": 50, - "format": "double" + "clientSecret": { + "type": "string", + "description": "Stripe client secret for 3DS; empty when not applicable.", + "x-example": "" }, - "total": { + "amount": { "type": "number", - "description": "Provided credit amount", - "x-example": 50, + "description": "Purchase amount.", + "x-example": 25.99, "format": "double" }, - "expiration": { - "type": "string", - "description": "Credit expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "status": { + "currency": { "type": "string", - "description": "Status of the credit. Can be one of `disabled`, `active` or `expired`.", - "x-example": "disabled" + "description": "Currency code.", + "x-example": "USD" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "$permissions", - "couponId", - "userId", - "teamId", - "credits", - "total", - "expiration", - "status" + "domainId", + "domain", + "organizationId", + "status", + "clientSecret", + "amount", + "currency" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "couponId": "NEWBONUS", - "userId": "5e5ea5c16897e", - "teamId": "5e5ea5c16897e", - "credits": 50, - "total": 50, - "expiration": "2020-10-15T06:38:00.000+00:00", - "status": "disabled" + "domainId": "5e5ea5c16897e", + "domain": "example.com", + "organizationId": "5e5ea5c16897e", + "status": "pending", + "clientSecret": "", + "amount": 25.99, + "currency": "USD" } }, - "creditAvailable": { - "description": "CreditAvailable", + "domainSuggestion": { + "description": "DomainSuggestion", "type": "object", "properties": { + "domain": { + "type": "string", + "description": "Domain suggestion.", + "x-example": "example.com" + }, + "premium": { + "type": "boolean", + "description": "Is the domain premium?", + "x-example": true + }, + "price": { + "type": "number", + "description": "Domain price.", + "x-example": 25.99, + "format": "double", + "nullable": true + }, "available": { - "type": "integer", - "description": "Total available credits for the organization.", - "x-example": 100, - "format": "int32" + "type": "boolean", + "description": "Is the domain available?", + "x-example": true } }, "required": [ + "domain", + "premium", "available" ], "example": { - "available": 100 + "domain": "example.com", + "premium": true, + "price": 25.99, + "available": true } }, - "creditList": { - "description": "CreditList", + "domainTransferOut": { + "description": "domainTransferOut", "type": "object", "properties": { - "credits": { - "type": "array", - "description": "Credits", - "items": { - "$ref": "#\/components\/schemas\/credit" - }, - "x-example": 5 + "authCode": { + "type": "string", + "description": "Domain transfer authorization code.", + "x-example": "mock_1a2b3c4d" + } + }, + "required": [ + "authCode" + ], + "example": { + "authCode": "mock_1a2b3c4d" + } + }, + "domainTransferStatus": { + "description": "domainTransferStatus", + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Transfer status.", + "x-example": "pending_registry", + "enum": [ + "transferrable", + "not_transferrable", + "pending_owner", + "pending_admin", + "pending_registry", + "completed", + "cancelled", + "service_unavailable" + ], + "x-enum-name": "DomainTransferStatusEnum" }, - "total": { - "type": "integer", - "description": "Total number of credits", - "x-example": 5, - "format": "int32" + "reason": { + "type": "string", + "description": "Additional transfer status information.", + "x-example": "Transfer in progress" }, - "available": { - "type": "number", - "description": "Total available credit balance in USD", - "x-example": 5, - "format": "double" + "timestamp": { + "type": "string", + "description": "Transfer status timestamp in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "credits", - "total", - "available" + "status", + "reason", + "timestamp" ], "example": { - "credits": 5, - "total": 5, - "available": 5 + "status": "pending_registry", + "reason": "Transfer in progress", + "timestamp": "2020-10-15T06:38:00.000+00:00" } }, - "dedicatedDatabase": { - "description": "DedicatedDatabase", + "downgradeFeedback": { + "description": "Downgrade Feedback", "type": "object", "properties": { "$id": { "type": "string", - "description": "Dedicated database ID.", + "description": "Feedback ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Database creation time in ISO 8601 format.", + "description": "Feedback 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.", + "description": "Feedback update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "projectId": { - "type": "string", - "description": "Project ID that owns this database.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Database display name.", - "x-example": "My Production Database" - }, - "api": { - "type": "string", - "description": "Product API that owns this database: compute, documentsdb, or vectorsdb.", - "x-example": "compute" - }, - "engine": { - "type": "string", - "description": "Database engine: postgres, mysql, mariadb, or mongodb.", - "x-example": "postgres" - }, - "version": { - "type": "string", - "description": "Database engine version.", - "x-example": "16" - }, - "specification": { - "type": "string", - "description": "Specification identifier.", - "x-example": "s-2vcpu-2gb" - }, - "backend": { - "type": "string", - "description": "Database backend provider. Possible values: prisma, edge.", - "x-example": "edge" - }, - "hostname": { - "type": "string", - "description": "Database hostname for connections.", - "x-example": "db-myproject-mydb.fra.appwrite.center" - }, - "connectionPort": { - "type": "integer", - "description": "Database port for connections.", - "x-example": 5432, - "format": "int32" - }, - "connectionUser": { + "title": { "type": "string", - "description": "Database username for connections.", - "x-example": "appwrite_user" + "description": "Feedback reason", + "x-example": "I encountered a bug and outage that caused my app to lose its value" }, - "connectionPassword": { + "message": { "type": "string", - "description": "Database password for connections.", - "x-example": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" + "description": "Feedback message", + "x-example": "The platform experienced significant downtime which affected my users." }, - "connectionString": { + "fromPlanId": { "type": "string", - "description": "Full database connection string (URI format).", - "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres" + "description": "Plan ID downgrading from", + "x-example": "pro" }, - "status": { + "toPlanId": { "type": "string", - "description": "Database status. Possible values: provisioning, ready, inactive, paused, failed, deleted, restoring, scaling.", - "x-example": "ready" + "description": "Plan ID downgrading to", + "x-example": "free" }, - "containerStatus": { + "teamId": { "type": "string", - "description": "Container status for lifecycle-managed database runtimes: active or inactive.", - "x-example": "active" + "description": "Organization ID", + "x-example": "5e5ea5c16897e" }, - "lastAccessedAt": { + "userId": { "type": "string", - "description": "Last activity timestamp in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "User ID who submitted feedback", + "x-example": "5e5ea5c16897e" }, - "idleUntil": { + "version": { "type": "string", - "description": "Timestamp when container will be considered idle and scale to zero (ISO 8601 format).", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "idleTimeoutMinutes": { - "type": "integer", - "description": "Minutes of inactivity before container scales to zero.", - "x-example": 15, - "format": "int32" - }, - "cpu": { - "type": "integer", - "description": "CPU allocated in millicores.", - "x-example": 2000, - "format": "int32" + "description": "Console version", + "x-example": "1.8.0" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "title", + "message", + "fromPlanId", + "toPlanId", + "teamId", + "userId", + "version" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "title": "I encountered a bug and outage that caused my app to lose its value", + "message": "The platform experienced significant downtime which affected my users.", + "fromPlanId": "pro", + "toPlanId": "free", + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "version": "1.8.0" + } + }, + "estimation": { + "description": "Estimation", + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Total amount", + "x-example": 50, + "format": "double" }, - "memory": { - "type": "integer", - "description": "Memory allocated in MB.", - "x-example": 4096, - "format": "int32" + "grossAmount": { + "type": "number", + "description": "Gross payable amount", + "x-example": 50, + "format": "double" }, - "storage": { - "type": "integer", - "description": "Storage allocated in GB.", - "x-example": 100, - "format": "int32" + "discount": { + "type": "number", + "description": "Discount amount", + "x-example": 50, + "format": "double" }, - "storageClass": { - "type": "string", - "description": "Storage class. Currently always 'ssd'; DigitalOcean exposes a single block-storage class.", - "x-example": "ssd" + "credits": { + "type": "number", + "description": "Credits amount", + "x-example": 50, + "format": "double" }, - "storageMaxGb": { - "type": "integer", - "description": "Maximum storage allowed in GB. 0 means use system default.", - "x-example": 100, - "format": "int32" + "items": { + "type": "array", + "description": "Estimation items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "x-example": [] }, - "nodePool": { - "type": "string", - "description": "Kubernetes node pool where the database is scheduled.", - "x-example": "db-pool-4vcpu-8gb" + "discounts": { + "type": "array", + "description": "Estimation discount items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "x-example": [] }, - "replicas": { + "trialDays": { "type": "integer", - "description": "Number of high availability replicas. High availability is enabled when greater than 0.", - "x-example": 2, + "description": "Trial days", + "x-example": 14, "format": "int32" }, - "highAvailabilitySyncMode": { + "trialEndDate": { "type": "string", - "description": "Replication sync mode: async, sync, or quorum.", - "x-example": "async" - }, - "networkMaxConnections": { - "type": "integer", - "description": "Maximum concurrent connections.", - "x-example": 500, - "format": "int32" - }, - "networkIdleTimeoutSeconds": { - "type": "integer", - "description": "Connection idle timeout in seconds.", - "x-example": 900, - "format": "int32" - }, - "networkIPAllowlist": { + "description": "Trial end date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "amount", + "grossAmount", + "discount", + "credits", + "items", + "discounts", + "trialDays" + ], + "example": { + "amount": 50, + "grossAmount": 50, + "discount": 50, + "credits": 50, + "items": [], + "discounts": [], + "trialDays": 14, + "trialEndDate": "2020-10-15T06:38:00.000+00:00" + } + }, + "estimationDeleteOrganization": { + "description": "DeleteOrganization", + "type": "object", + "properties": { + "unpaidInvoices": { "type": "array", - "description": "IP addresses\/CIDR ranges allowed to connect.", + "description": "List of unpaid invoices", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/invoice" }, - "x-example": [ - "10.0.0.0\/8", - "192.168.1.0\/24" - ] - }, - "backupEnabled": { - "type": "boolean", - "description": "Whether automatic backups are enabled.", - "x-example": true - }, - "backupPitr": { - "type": "boolean", - "description": "Whether point-in-time recovery is enabled.", - "x-example": true + "x-example": [] + } + }, + "required": [ + "unpaidInvoices" + ], + "example": { + "unpaidInvoices": [] + } + }, + "estimation_item": { + "description": "Item", + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label", + "x-example": "Plan name" }, - "backupCron": { + "value": { + "type": "number", + "description": "Gross payable amount", + "x-example": 50, + "format": "double" + } + }, + "required": [ + "label", + "value" + ], + "example": { + "label": "Plan name", + "value": 50 + } + }, + "estimationPlanChange": { + "description": "EstimationPlanChange", + "type": "object", + "properties": { + "currentBillingPlanId": { "type": "string", - "description": "Backup schedule in cron format.", - "x-example": "0 3 * * *" - }, - "backupRetentionDays": { - "type": "integer", - "description": "Number of days to retain backups.", - "x-example": 30, - "format": "int32" - }, - "pitrRetentionDays": { - "type": "integer", - "description": "Number of days to retain PITR data.", - "x-example": 14, - "format": "int32" + "description": "Current billing plan ID", + "x-example": "tier-2" }, - "storageAutoscaling": { - "type": "boolean", - "description": "Whether automatic storage expansion is enabled.", - "x-example": true + "targetBillingPlanId": { + "type": "string", + "description": "Target billing plan ID", + "x-example": "tier-0" }, - "storageAutoscalingThresholdPercent": { - "type": "integer", - "description": "Storage usage percentage that triggers automatic expansion.", - "x-example": 85, - "format": "int32" + "direction": { + "type": "string", + "description": "Direction of plan change: upgrade, downgrade, or same", + "x-example": "downgrade" }, - "storageAutoscalingMaxGb": { - "type": "integer", - "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", - "x-example": 500, - "format": "int32" + "estimation": { + "type": "object", + "description": "Cost estimation details", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeEstimationDetails" + } + ] }, - "maintenanceWindowDay": { - "type": "string", - "description": "Day of the week for the maintenance window. Possible values: sun, mon, tue, wed, thu, fri, sat.", - "x-example": "sun" + "limits": { + "type": "object", + "description": "Plan limits and compliance information", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/planChangeLimits" + } + ] + } + }, + "required": [ + "currentBillingPlanId", + "targetBillingPlanId", + "direction", + "estimation", + "limits" + ], + "example": { + "currentBillingPlanId": "tier-2", + "targetBillingPlanId": "tier-0", + "direction": "downgrade", + "estimation": null, + "limits": null + } + }, + "estimationUpdatePlan": { + "description": "UpdatePlan", + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Total amount", + "x-example": 50, + "format": "double" }, - "maintenanceWindowHourUtc": { - "type": "integer", - "description": "Hour in UTC (0-23) when the maintenance window starts.", - "x-example": 3, - "format": "int32" + "grossAmount": { + "type": "number", + "description": "Gross payable amount", + "x-example": 50, + "format": "double" }, - "metricsEnabled": { - "type": "boolean", - "description": "Whether metrics collection is enabled.", - "x-example": false + "discount": { + "type": "number", + "description": "Discount amount", + "x-example": 50, + "format": "double" }, - "sqlApiEnabled": { - "type": "boolean", - "description": "Whether the SQL API sidecar is enabled for this database.", - "x-example": true + "credits": { + "type": "number", + "description": "Credits amount", + "x-example": 50, + "format": "double" }, - "sqlApiAllowedStatements": { + "items": { "type": "array", - "description": "Statement types accepted by the SQL API. Defaults to read\/write DML only; DDL\/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "description": "Estimation items", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/estimation_item" }, - "x-example": "SELECT" - }, - "sqlApiMaxRows": { - "type": "integer", - "description": "Maximum rows returned per SQL API execution. Results larger than this are truncated.", - "x-example": 10000, - "format": "int32" + "x-example": [] }, - "sqlApiMaxBytes": { - "type": "integer", - "description": "Maximum serialised SQL API result payload in bytes. Results larger than this are truncated.", - "x-example": 10485760, - "format": "int32" + "discounts": { + "type": "array", + "description": "Estimation discount items", + "items": { + "$ref": "#\/components\/schemas\/estimation_item" + }, + "x-example": [] }, - "sqlApiTimeoutSeconds": { + "trialDays": { "type": "integer", - "description": "Maximum server-side SQL API execution time in seconds before the query is cancelled.", - "x-example": 30, + "description": "Trial days", + "x-example": 14, "format": "int32" }, - "error": { + "trialEndDate": { "type": "string", - "description": "Error message if status is failed.", - "x-example": "" + "description": "Trial end date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "organizationCredits": { + "type": "number", + "description": "Organization's existing credits", + "x-example": 0, + "format": "double" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "projectId", - "name", - "api", - "engine", - "version", - "specification", - "backend", - "hostname", - "connectionPort", - "connectionUser", - "connectionPassword", - "connectionString", - "status", - "containerStatus", - "lastAccessedAt", - "idleUntil", - "idleTimeoutMinutes", - "cpu", - "memory", - "storage", - "storageClass", - "storageMaxGb", - "nodePool", - "replicas", - "highAvailabilitySyncMode", - "networkMaxConnections", - "networkIdleTimeoutSeconds", - "networkIPAllowlist", - "backupEnabled", - "backupPitr", - "backupCron", - "backupRetentionDays", - "pitrRetentionDays", - "storageAutoscaling", - "storageAutoscalingThresholdPercent", - "storageAutoscalingMaxGb", - "maintenanceWindowDay", - "maintenanceWindowHourUtc", - "metricsEnabled", - "sqlApiEnabled", - "sqlApiAllowedStatements", - "sqlApiMaxRows", - "sqlApiMaxBytes", - "sqlApiTimeoutSeconds", - "error" + "amount", + "grossAmount", + "discount", + "credits", + "items", + "discounts", + "trialDays", + "organizationCredits" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "projectId": "5e5ea5c16897e", - "name": "My Production Database", - "api": "compute", - "engine": "postgres", - "version": "16", - "specification": "s-2vcpu-2gb", - "backend": "edge", - "hostname": "db-myproject-mydb.fra.appwrite.center", - "connectionPort": 5432, - "connectionUser": "appwrite_user", - "connectionPassword": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", - "connectionString": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres", - "status": "ready", - "containerStatus": "active", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00", - "idleUntil": "2020-10-15T06:38:00.000+00:00", - "idleTimeoutMinutes": 15, - "cpu": 2000, - "memory": 4096, - "storage": 100, - "storageClass": "ssd", - "storageMaxGb": 100, - "nodePool": "db-pool-4vcpu-8gb", - "replicas": 2, - "highAvailabilitySyncMode": "async", - "networkMaxConnections": 500, - "networkIdleTimeoutSeconds": 900, - "networkIPAllowlist": [ - "10.0.0.0\/8", - "192.168.1.0\/24" - ], - "backupEnabled": true, - "backupPitr": true, - "backupCron": "0 3 * * *", - "backupRetentionDays": 30, - "pitrRetentionDays": 14, - "storageAutoscaling": true, - "storageAutoscalingThresholdPercent": 85, - "storageAutoscalingMaxGb": 500, - "maintenanceWindowDay": "sun", - "maintenanceWindowHourUtc": 3, - "metricsEnabled": false, - "sqlApiEnabled": true, - "sqlApiAllowedStatements": "SELECT", - "sqlApiMaxRows": 10000, - "sqlApiMaxBytes": 10485760, - "sqlApiTimeoutSeconds": 30, - "error": "" + "amount": 50, + "grossAmount": 50, + "discount": 50, + "credits": 50, + "items": [], + "discounts": [], + "trialDays": 14, + "trialEndDate": "2020-10-15T06:38:00.000+00:00", + "organizationCredits": 0 } }, - "dedicatedDatabaseExecution": { - "description": "Execution", + "dedicatedDatabaseExtensions": { + "description": "Extensions", "type": "object", "properties": { - "rows": { - "type": "object", - "additionalProperties": true, - "description": "Result rows as a list of column-name => value maps. Empty for non-returning statements.", + "installed": { + "type": "array", + "description": "List of installed extensions.", + "items": { + "type": "string" + }, "x-example": [ - { - "id": 1, - "name": "example" - } + "pgvector", + "uuid-ossp" ] }, - "rowCount": { - "type": "integer", - "description": "Number of rows returned (for SELECT) or affected (for INSERT\/UPDATE\/DELETE).", - "x-example": 1, - "format": "int32" + "available": { + "type": "array", + "description": "List of available extensions that can be installed.", + "items": { + "type": "string" + }, + "x-example": [ + "postgis", + "pg_trgm" + ] }, - "columns": { + "metadata": { "type": "array", - "description": "Column metadata in result-set order.", + "description": "Curated metadata (display name, description, category) for each available extension.", "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseExecutionColumn" + "$ref": "#\/components\/schemas\/postgresExtension" }, "x-example": [] - }, - "durationMs": { - "type": "integer", - "description": "Server-side execution time in milliseconds.", - "x-example": 12, - "format": "int32" - }, - "truncated": { - "type": "boolean", - "description": "True when the configured row or byte cap was hit and the result was truncated.", - "x-example": false - }, - "bytes": { - "type": "integer", - "description": "Serialised payload size in bytes.", - "x-example": 1024, - "format": "int32" } }, "required": [ - "rows", - "rowCount", - "columns", - "durationMs", - "truncated", - "bytes" + "installed", + "available", + "metadata" ], "example": { - "rows": [ - { - "id": 1, - "name": "example" - } + "installed": [ + "pgvector", + "uuid-ossp" ], - "rowCount": 1, - "columns": [], - "durationMs": 12, - "truncated": false, - "bytes": 1024 + "available": [ + "postgis", + "pg_trgm" + ], + "metadata": [] } }, - "dedicatedDatabaseExecutionColumn": { - "description": "ExecutionColumn", + "dedicatedDatabaseMember": { + "description": "Member", "type": "object", "properties": { - "name": { + "$id": { "type": "string", - "description": "Column name as returned by the database.", - "x-example": "id" + "description": "Member identifier.", + "x-example": "1" }, - "type": { + "role": { "type": "string", - "description": "Engine-specific column type (e.g. int4, text, timestamptz).", - "x-example": "int4" + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology and this member has not been probed, so no member can be named the write target).", + "x-example": "replica" + }, + "status": { + "type": "string", + "description": "Member pod status. Possible values: pending (configured but absent from the backend topology, so nothing is bringing it up), provisioning (pod missing or Pending), starting (Running but not Ready), active (Running and Ready), failed (Failed phase or CrashLoopBackOff container), or the lowercased pod phase reported by the cluster.", + "x-example": "active" + }, + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds.", + "x-example": 0.5, + "format": "double" } }, "required": [ - "name", - "type" + "$id", + "role", + "status", + "lagSeconds" ], "example": { - "name": "id", - "type": "int4" + "$id": "1", + "role": "replica", + "status": "active", + "lagSeconds": 0.5 } }, - "dedicatedDatabaseRestoration": { - "description": "Restoration", + "dedicatedDatabaseOperation": { + "description": "Operation", "type": "object", "properties": { "$id": { "type": "string", - "description": "Restoration ID.", + "description": "Operation ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Restoration creation time in ISO 8601 format.", + "description": "Operation creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "databaseId": { "type": "string", - "description": "Database ID being restored.", - "x-example": "5e5ea5c16897e" - }, - "projectId": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "backupId": { - "type": "string", - "description": "Backup ID used for restoration (null for PITR).", + "description": "Database ID the operation ran against.", "x-example": "5e5ea5c16897e" }, "type": { "type": "string", - "description": "Restoration type. Possible values: backup (restore from a specific backup snapshot), pitr (point-in-time recovery to a specific timestamp).", - "x-example": "backup" + "description": "Operation type, such as provision, update, restore, pausing, resuming, failover, backup-create or cross-region-enable.", + "x-example": "update" }, "status": { "type": "string", - "description": "Restoration status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error).", + "description": "Operation status. Possible values: running (in progress), completed (finished successfully), failed (ended in an error).", "x-example": "completed" }, - "targetTime": { + "attempts": { + "type": "integer", + "description": "Number of times this operation has been attempted.", + "x-example": 1, + "format": "int32" + }, + "requestedAt": { "type": "string", - "description": "Target time for PITR restoration in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Time the operation was requested, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, "startedAt": { "type": "string", - "description": "Restoration start time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Time the operation started, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, "completedAt": { "type": "string", - "description": "Restoration completion time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Time the operation reached a terminal state, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "error": { + "errorCode": { "type": "string", - "description": "Error message if restoration failed.", + "description": "Machine-readable failure code. `LockLost` marks an attempt that was fenced and abandoned because another worker took over the database.", + "x-example": "LockLost" + }, + "errorMessage": { + "type": "string", + "description": "Failure message if the operation failed.", "x-example": "" } }, @@ -107580,4024 +116082,4612 @@ "$id", "$createdAt", "databaseId", - "projectId", - "backupId", "type", "status", - "targetTime", - "startedAt", - "completedAt", - "error" + "attempts", + "errorCode", + "errorMessage" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "databaseId": "5e5ea5c16897e", - "projectId": "5e5ea5c16897e", - "backupId": "5e5ea5c16897e", - "type": "backup", + "type": "update", "status": "completed", - "targetTime": "2020-10-15T06:38:00.000+00:00", + "attempts": 1, + "requestedAt": "2020-10-15T06:38:00.000+00:00", "startedAt": "2020-10-15T06:38:00.000+00:00", "completedAt": "2020-10-15T06:38:00.000+00:00", - "error": "" + "errorCode": "LockLost", + "errorMessage": "" } }, - "databaseStatus": { - "description": "Status", + "dedicatedDatabaseOperationList": { + "description": "OperationList", "type": "object", "properties": { - "health": { - "type": "string", - "description": "Overall health status: healthy, degraded, or unhealthy.", - "x-example": "healthy" - }, - "ready": { - "type": "boolean", - "description": "Whether the database is ready to accept connections.", - "x-example": true - }, - "engine": { - "type": "string", - "description": "Database engine: postgres, mysql, mariadb, or mongodb.", - "x-example": "postgres" - }, - "version": { - "type": "string", - "description": "Database engine version.", - "x-example": "17" - }, - "uptime": { + "total": { "type": "integer", - "description": "Database uptime in seconds.", - "x-example": 86400, + "description": "Total number of operations.", + "x-example": 5, "format": "int32" }, - "connections": { - "type": "object", - "description": "Connection statistics.", - "x-example": { - "current": 12, - "max": 100 - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/databaseStatusConnections" - } - ] - }, - "replicas": { + "operations": { "type": "array", - "description": "List of database replicas and their status.", + "description": "List of operations.", "items": { - "$ref": "#\/components\/schemas\/databaseStatusReplica" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" }, - "x-example": [ - { - "index": 0, - "role": "primary", - "healthy": true, - "lagSeconds": null - }, - { - "index": 1, - "role": "replica", - "healthy": true, - "lagSeconds": 0.2 - } - ] + "x-example": "" + } + }, + "required": [ + "total", + "operations" + ], + "example": { + "total": 5, + "operations": "" + } + }, + "dedicatedDatabaseReplicas": { + "description": "Replicas", + "type": "object", + "properties": { + "replicas": { + "type": "integer", + "description": "Number of configured replicas. Zero means high availability is disabled.", + "x-example": 2, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Requested replication sync mode. Possible values: async (asynchronous, fastest), sync (synchronous, strong consistency), quorum (quorum-based, majority of replicas must confirm). This is what was asked for; compare it with effectiveSyncMode for what the primary is enforcing.", + "x-example": "async" + }, + "effectiveSyncMode": { + "type": "string", + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read. A value below the requested syncMode means writes are being acknowledged with weaker durability than configured.", + "x-example": "async", + "nullable": true }, - "volumes": { + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "x-example": false + }, + "syncAcknowledgements": { + "type": "integer", + "description": "Number of standby acknowledgements the primary waits for before a write is committed. Zero means writes are acknowledged locally.", + "x-example": 1, + "format": "int32" + }, + "syncStandbyCount": { + "type": "integer", + "description": "Number of standbys registered with the primary for synchronous replication.", + "x-example": 2, + "format": "int32" + }, + "syncStateConfirmed": { + "type": "boolean", + "description": "Whether the reported sync state was read from the engine. When false the state could not be confirmed and the other sync fields carry no reading.", + "x-example": true + }, + "members": { "type": "array", - "description": "Storage volume information.", + "description": "Per-pod statuses for the primary and every replica.", "items": { - "$ref": "#\/components\/schemas\/databaseStatusVolume" + "$ref": "#\/components\/schemas\/dedicatedDatabaseMember" }, - "x-example": { - "data": { - "path": "\/var\/lib\/postgresql\/data", - "usedPercent": "45%", - "available": "55GB", - "mounted": true - } - } + "x-example": [] } }, "required": [ - "health", - "ready", - "engine", - "version", - "uptime", - "connections", "replicas", - "volumes" + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "syncStateConfirmed", + "members" ], "example": { - "health": "healthy", - "ready": true, - "engine": "postgres", - "version": "17", - "uptime": 86400, - "connections": { - "current": 12, - "max": 100 - }, - "replicas": [ - { - "index": 0, - "role": "primary", - "healthy": true, - "lagSeconds": null - }, - { - "index": 1, - "role": "replica", - "healthy": true, - "lagSeconds": 0.2 - } - ], - "volumes": { - "data": { - "path": "\/var\/lib\/postgresql\/data", - "usedPercent": "45%", - "available": "55GB", - "mounted": true - } - } + "replicas": 2, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "members": [] } }, - "dnsRecord": { - "description": "DNSRecord", + "invoice": { + "description": "Invoice", "type": "object", "properties": { "$id": { "type": "string", - "description": "DNS Record ID.", - "x-example": "5f40a6e10c65e" + "description": "Invoice ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "DNS Record creation time in ISO 8601 format.", + "description": "Invoice creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "DNS Record update date in ISO 8601 format.", + "description": "Invoice update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "type": { + "$permissions": { + "type": "array", + "description": "Invoice permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "teamId": { "type": "string", - "description": "DNS record type (e.g. A, CNAME, MX).", - "x-example": "A" + "description": "Project ID", + "x-example": "5e5ea5c16897e" }, - "name": { + "aggregationId": { "type": "string", - "description": "Record name or subdomain.", - "x-example": "mail" + "description": "Aggregation ID", + "x-example": "5e5ea5c16897e" }, - "value": { + "plan": { "type": "string", - "description": "Value of the record (IP address, domain, etc.).", - "x-example": "192.0.2.1" + "description": "Billing plan selected. Can be one of `tier-0`, `tier-1` or `tier-2`.", + "x-example": "tier-1" }, - "ttl": { - "type": "integer", - "description": "Time to live (in seconds).", - "x-example": 86400, - "format": "int32" + "usage": { + "type": "array", + "description": "Usage breakdown per resource", + "items": { + "$ref": "#\/components\/schemas\/usageResources" + }, + "x-example": [] }, - "priority": { - "type": "integer", - "description": "Record priority (commonly used for MX).", - "x-example": 10, - "format": "int32" + "amount": { + "type": "number", + "description": "Invoice Amount", + "x-example": 50, + "format": "double" }, - "lock": { - "type": "boolean", - "description": "Whether this record is locked (read-only).", - "x-example": false + "tax": { + "type": "number", + "description": "Tax percentage", + "x-example": 17, + "format": "double" }, - "weight": { - "type": "integer", - "description": "Record weight (used for SRV records).", - "x-example": 10, - "format": "int32" + "taxAmount": { + "type": "number", + "description": "Tax amount", + "x-example": 12.5, + "format": "double" }, - "port": { - "type": "integer", - "description": "Target port (used for SRV records).", - "x-example": 443, - "format": "int32" + "vat": { + "type": "number", + "description": "VAT percentage", + "x-example": 17, + "format": "double" }, - "comment": { + "vatAmount": { + "type": "number", + "description": "VAT amount", + "x-example": 12.5, + "format": "double" + }, + "grossAmount": { + "type": "number", + "description": "Gross amount after vat, tax, and discounts applied.", + "x-example": 12.5, + "format": "double" + }, + "creditsUsed": { + "type": "number", + "description": "Credits used.", + "x-example": 30, + "format": "double" + }, + "currency": { "type": "string", - "description": "Comment for the DNS record.", - "x-example": "Mail server record" + "description": "Currency the invoice is in", + "x-example": "USD" + }, + "clientSecret": { + "type": "string", + "description": "Client secret for processing failed payments in front-end", + "x-example": "pi_daslfasdfkla_asdkfl" + }, + "status": { + "type": "string", + "description": "Invoice status", + "x-example": "succeeded" + }, + "type": { + "type": "string", + "description": "Invoice type. Can be one of `subscription`, `domain_purchase`, `domain_renewal`, `domain_transfer`, or `addon_*`.", + "x-example": "subscription" + }, + "lastError": { + "type": "string", + "description": "Last payment error associated with the invoice", + "x-example": "Your card has insufficient balance." + }, + "dueAt": { + "type": "string", + "description": "Invoice due date.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "from": { + "type": "string", + "description": "Beginning date of the invoice", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "to": { + "type": "string", + "description": "End date of the invoice", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", "$createdAt", "$updatedAt", + "$permissions", + "teamId", + "aggregationId", + "plan", + "usage", + "amount", + "tax", + "taxAmount", + "vat", + "vatAmount", + "grossAmount", + "creditsUsed", + "currency", + "clientSecret", + "status", "type", - "name", - "value", - "ttl", - "priority", - "lock", - "weight", - "port", - "comment" + "lastError", + "dueAt", + "from", + "to" ], "example": { - "$id": "5f40a6e10c65e", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "A", - "name": "mail", - "value": "192.0.2.1", - "ttl": 86400, - "priority": 10, - "lock": false, - "weight": 10, - "port": 443, - "comment": "Mail server record" + "$permissions": [ + "read(\"any\")" + ], + "teamId": "5e5ea5c16897e", + "aggregationId": "5e5ea5c16897e", + "plan": "tier-1", + "usage": [], + "amount": 50, + "tax": 17, + "taxAmount": 12.5, + "vat": 17, + "vatAmount": 12.5, + "grossAmount": 12.5, + "creditsUsed": 30, + "currency": "USD", + "clientSecret": "pi_daslfasdfkla_asdkfl", + "status": "succeeded", + "type": "subscription", + "lastError": "Your card has insufficient balance.", + "dueAt": "2020-10-15T06:38:00.000+00:00", + "from": "2020-10-15T06:38:00.000+00:00", + "to": "2020-10-15T06:38:00.000+00:00" } }, - "domain": { - "description": "Domain", + "organization": { + "description": "Organization", "type": "object", "properties": { "$id": { "type": "string", - "description": "Domain ID.", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Domain creation time in ISO 8601 format.", + "description": "Team 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.", + "description": "Team update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "domain": { + "name": { "type": "string", - "description": "Domain name.", - "x-example": "example.com" + "description": "Team name.", + "x-example": "VIP" }, - "registrar": { + "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" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + }, + "billingBudget": { + "type": "integer", + "description": "Project budget limit", + "x-example": 50, + "format": "int32" + }, + "budgetAlerts": { + "type": "array", + "description": "Project budget limit", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [ + 50, + 75 + ] + }, + "billingPlan": { "type": "string", - "description": "Domain registrar (e.g. \"appwrite\" or \"third_party\").", - "x-example": "appwrite" + "description": "Organization's billing plan ID.", + "x-example": "tier-1" }, - "nameservers": { + "billingPlanId": { "type": "string", - "description": "Nameservers setting. \"Appwrite\" or empty string.", - "x-example": "Appwrite" + "description": "Organization's billing plan ID.", + "x-example": "tier-1" }, - "expire": { + "billingPlanDetails": { + "type": "object", + "description": "Organization's billing plan.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlan" + } + ] + }, + "billingEmail": { "type": "string", - "description": "Domain expiry date in ISO 8601 format.", + "description": "Billing email set for the organization.", + "x-example": "billing@org.example" + }, + "billingStartDate": { + "type": "string", + "description": "Billing cycle start date.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "renewal": { + "billingCurrentInvoiceDate": { "type": "string", - "description": "Domain renewal date in ISO 8601 format.", + "description": "Current invoice cycle start date.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "autoRenewal": { - "type": "boolean", - "description": "If set to true, the domain will automatically renew.", - "x-example": true + "billingNextInvoiceDate": { + "type": "string", + "description": "Next invoice cycle start date.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "renewalPrice": { + "billingTrialStartDate": { + "type": "string", + "description": "Start date of trial.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "billingTrialDays": { "type": "integer", - "description": "Renewal price (in cents).", - "x-example": 2599, + "description": "Number of trial days.", + "x-example": 14, "format": "int32" }, - "transferStatus": { + "billingAggregationId": { "type": "string", - "description": "Transfer status for domains being transferred in.", - "x-example": "pending_registry", - "enum": [ - "transferrable", - "not_transferrable", - "pending_owner", - "pending_admin", - "pending_registry", - "completed", - "cancelled", - "service_unavailable" - ], - "x-enum-name": "DomainTransferStatusEnum" + "description": "Current active aggregation id.", + "x-example": "adbc3de4rddfsd" }, - "teamId": { + "billingInvoiceId": { "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "description": "Current active aggregation id.", + "x-example": "adbc3de4rddfsd" }, - "dnsRecords": { - "type": "array", - "description": "Dns records", - "items": { - "$ref": "#\/components\/schemas\/dnsRecord" - }, - "x-example": [] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "domain", - "registrar", - "nameservers", - "expire", - "renewal", - "autoRenewal", - "renewalPrice", - "transferStatus", - "teamId", - "dnsRecords" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domain": "example.com", - "registrar": "appwrite", - "nameservers": "Appwrite", - "expire": "2020-10-15T06:38:00.000+00:00", - "renewal": "2020-10-15T06:38:00.000+00:00", - "autoRenewal": true, - "renewalPrice": 2599, - "transferStatus": "pending_registry", - "teamId": "5e5ea5c16897e", - "dnsRecords": [] - } - }, - "domainPrice": { - "description": "DomainPrice", - "type": "object", - "properties": { - "domain": { + "paymentMethodId": { "type": "string", - "description": "Domain name.", - "x-example": "example.com" + "description": "Default payment method.", + "x-example": "adbc3de4rddfsd" }, - "tld": { + "billingAddressId": { "type": "string", - "description": "Top-level domain for the requested domain.", - "x-example": "com" - }, - "available": { - "type": "boolean", - "description": "Whether the domain is currently available for registration.", - "x-example": true - }, - "price": { - "type": "number", - "description": "Domain registration price.", - "x-example": 25.99, - "format": "double" - }, - "periodYears": { - "type": "integer", - "description": "Price period in years.", - "x-example": 1, - "format": "int32" + "description": "Default payment method.", + "x-example": "adbc3de4rddfsd" }, - "premium": { - "type": "boolean", - "description": "Whether the domain is a premium domain.", - "x-example": false - } - }, - "required": [ - "domain", - "tld", - "available", - "price", - "periodYears", - "premium" - ], - "example": { - "domain": "example.com", - "tld": "com", - "available": true, - "price": 25.99, - "periodYears": 1, - "premium": false - } - }, - "domainPurchase": { - "description": "DomainPurchase", - "type": "object", - "properties": { - "$id": { + "backupPaymentMethodId": { + "type": "string", + "description": "Backup payment method.", + "x-example": "adbc3de4rddfsd" + }, + "status": { "type": "string", - "description": "Purchase\/invoice ID.", - "x-example": "5e5ea5c16897e" + "description": "Team status.", + "x-example": "active" }, - "$createdAt": { + "remarks": { "type": "string", - "description": "Purchase creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Remarks on team status.", + "x-example": "Pending initial payment" }, - "$updatedAt": { + "agreementBAA": { "type": "string", - "description": "Purchase update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Organization agreements", + "x-example": "" }, - "domainId": { + "programManagerName": { "type": "string", - "description": "Domain document ID.", - "x-example": "5e5ea5c16897e" + "description": "Program manager's name.", + "x-example": "" }, - "domain": { + "programManagerCalendar": { "type": "string", - "description": "Domain name.", - "x-example": "example.com" + "description": "Program manager's calendar link.", + "x-example": "" }, - "organizationId": { + "programDiscordChannelName": { "type": "string", - "description": "Team ID that owns the domain.", - "x-example": "5e5ea5c16897e" + "description": "Program's discord channel name.", + "x-example": "" }, - "status": { + "programDiscordChannelUrl": { "type": "string", - "description": "Domain purchase status.", - "x-example": "pending", - "enum": [ - "pending", - "succeeded", - "failed", - "cancelled" + "description": "Program's discord channel URL.", + "x-example": "" + }, + "billingLimits": { + "type": "object", + "description": "Billing limits reached", + "x-example": "", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingLimits" + } ], - "x-enum-name": "DomainPurchaseStatus" + "nullable": true }, - "clientSecret": { + "billingPlanDowngrade": { "type": "string", - "description": "Stripe client secret for 3DS; empty when not applicable.", + "description": "Billing plan selected for downgrade.", + "x-example": "tier-1" + }, + "billingTaxId": { + "type": "string", + "description": "Tax Id", "x-example": "" }, - "amount": { - "type": "number", - "description": "Purchase amount.", - "x-example": 25.99, - "format": "double" + "markedForDeletion": { + "type": "boolean", + "description": "Marked for deletion", + "x-example": "" }, - "currency": { + "platform": { "type": "string", - "description": "Currency code.", - "x-example": "USD" + "description": "Product with which the organization is associated (appwrite or imagine)", + "x-example": "imagine" + }, + "projects": { + "type": "array", + "description": "Selected projects", + "items": { + "type": "string" + }, + "x-example": "" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "domainId", - "domain", - "organizationId", + "name", + "total", + "prefs", + "billingBudget", + "budgetAlerts", + "billingPlan", + "billingPlanId", + "billingPlanDetails", + "billingEmail", + "billingStartDate", + "billingCurrentInvoiceDate", + "billingNextInvoiceDate", + "billingTrialStartDate", + "billingTrialDays", + "billingAggregationId", + "billingInvoiceId", + "paymentMethodId", + "billingAddressId", + "backupPaymentMethodId", "status", - "clientSecret", - "amount", - "currency" + "remarks", + "agreementBAA", + "programManagerName", + "programManagerCalendar", + "programDiscordChannelName", + "programDiscordChannelUrl", + "billingPlanDowngrade", + "billingTaxId", + "markedForDeletion", + "platform", + "projects" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domainId": "5e5ea5c16897e", - "domain": "example.com", - "organizationId": "5e5ea5c16897e", - "status": "pending", - "clientSecret": "", - "amount": 25.99, - "currency": "USD" + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "billingBudget": 50, + "budgetAlerts": [ + 50, + 75 + ], + "billingPlan": "tier-1", + "billingPlanId": "tier-1", + "billingPlanDetails": null, + "billingEmail": "billing@org.example", + "billingStartDate": "2020-10-15T06:38:00.000+00:00", + "billingCurrentInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingNextInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialStartDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialDays": 14, + "billingAggregationId": "adbc3de4rddfsd", + "billingInvoiceId": "adbc3de4rddfsd", + "paymentMethodId": "adbc3de4rddfsd", + "billingAddressId": "adbc3de4rddfsd", + "backupPaymentMethodId": "adbc3de4rddfsd", + "status": "active", + "remarks": "Pending initial payment", + "agreementBAA": "", + "programManagerName": "", + "programManagerCalendar": "", + "programDiscordChannelName": "", + "programDiscordChannelUrl": "", + "billingLimits": "", + "billingPlanDowngrade": "tier-1", + "billingTaxId": "", + "markedForDeletion": "", + "platform": "imagine", + "projects": "" } }, - "domainSuggestion": { - "description": "DomainSuggestion", + "paymentAuthentication": { + "description": "PaymentAuthentication", "type": "object", "properties": { - "domain": { + "message": { "type": "string", - "description": "Domain suggestion.", - "x-example": "example.com" - }, - "premium": { - "type": "boolean", - "description": "Is the domain premium?", - "x-example": true + "description": "Message for the end user to show on Console.", + "x-example": "" }, - "price": { - "type": "number", - "description": "Domain price.", - "x-example": 25.99, - "format": "double", - "nullable": true + "clientSecret": { + "type": "string", + "description": "Stripe client secret to use for validation.", + "x-example": "" }, - "available": { - "type": "boolean", - "description": "Is the domain available?", - "x-example": true - } - }, - "required": [ - "domain", - "premium", - "available" - ], - "example": { - "domain": "example.com", - "premium": true, - "price": 25.99, - "available": true - } - }, - "domainTransferOut": { - "description": "domainTransferOut", - "type": "object", - "properties": { - "authCode": { + "organizationId": { "type": "string", - "description": "Domain transfer authorization code.", - "x-example": "mock_1a2b3c4d" - } - }, - "required": [ - "authCode" - ], - "example": { - "authCode": "mock_1a2b3c4d" - } - }, - "domainTransferStatus": { - "description": "domainTransferStatus", - "type": "object", - "properties": { - "status": { + "description": "Organization ID for which the payment authentication is needed.", + "x-example": "" + }, + "invoiceId": { "type": "string", - "description": "Transfer status.", - "x-example": "pending_registry", - "enum": [ - "transferrable", - "not_transferrable", - "pending_owner", - "pending_admin", - "pending_registry", - "completed", - "cancelled", - "service_unavailable" - ], - "x-enum-name": "DomainTransferStatusEnum" + "description": "Invoice ID against which the payment needs to be validated.", + "x-example": "" }, - "reason": { + "addonId": { "type": "string", - "description": "Additional transfer status information.", - "x-example": "Transfer in progress" + "description": "Addon ID to use when calling the addon validate endpoint. Empty when authentication is not for an addon.", + "x-example": "" }, - "timestamp": { + "projectId": { "type": "string", - "description": "Transfer status timestamp in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Project ID for project-level addon payments. Empty for organization-level addons.", + "x-example": "" } }, "required": [ - "status", - "reason", - "timestamp" + "message", + "clientSecret", + "organizationId", + "invoiceId", + "addonId", + "projectId" ], "example": { - "status": "pending_registry", - "reason": "Transfer in progress", - "timestamp": "2020-10-15T06:38:00.000+00:00" + "message": "", + "clientSecret": "", + "organizationId": "", + "invoiceId": "", + "addonId": "", + "projectId": "" } }, - "downgradeFeedback": { - "description": "Downgrade Feedback", + "paymentMethod": { + "description": "paymentMethod", "type": "object", "properties": { "$id": { "type": "string", - "description": "Feedback ID.", + "description": "Payment Method ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Feedback creation date in ISO 8601 format.", + "description": "Payment method creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Feedback update date in ISO 8601 format.", + "description": "Payment method update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "title": { - "type": "string", - "description": "Feedback reason", - "x-example": "I encountered a bug and outage that caused my app to lose its value" + "$permissions": { + "type": "array", + "description": "Payment method permissions. [Learn more about permissions](\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] }, - "message": { + "providerMethodId": { "type": "string", - "description": "Feedback message", - "x-example": "The platform experienced significant downtime which affected my users." + "description": "Payment method ID from the payment provider", + "x-example": "abdk3ed3sdkfj" }, - "fromPlanId": { + "clientSecret": { "type": "string", - "description": "Plan ID downgrading from", - "x-example": "pro" + "description": "Client secret hash for payment setup", + "x-example": "seti_ddfe" }, - "toPlanId": { + "providerUserId": { "type": "string", - "description": "Plan ID downgrading to", - "x-example": "free" + "description": "User ID from the payment provider.", + "x-example": "abdk3ed3sdkfj" }, - "teamId": { + "userId": { "type": "string", - "description": "Organization ID", + "description": "ID of the Team.", "x-example": "5e5ea5c16897e" }, - "userId": { + "expiryMonth": { + "type": "integer", + "description": "Expiry month of the payment method.", + "x-example": 2, + "format": "int32" + }, + "expiryYear": { + "type": "integer", + "description": "Expiry year of the payment method.", + "x-example": 2024, + "format": "int32" + }, + "last4": { "type": "string", - "description": "User ID who submitted feedback", - "x-example": "5e5ea5c16897e" + "description": "Last 4 digit of the payment method", + "x-example": "4242" }, - "version": { + "brand": { "type": "string", - "description": "Console version", - "x-example": "1.8.0" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "title", - "message", - "fromPlanId", - "toPlanId", - "teamId", - "userId", - "version" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "title": "I encountered a bug and outage that caused my app to lose its value", - "message": "The platform experienced significant downtime which affected my users.", - "fromPlanId": "pro", - "toPlanId": "free", - "teamId": "5e5ea5c16897e", - "userId": "5e5ea5c16897e", - "version": "1.8.0" - } - }, - "estimation": { - "description": "Estimation", - "type": "object", - "properties": { - "amount": { - "type": "number", - "description": "Total amount", - "x-example": 50, - "format": "double" + "description": "Payment method brand", + "x-example": "visa" }, - "grossAmount": { - "type": "number", - "description": "Gross payable amount", - "x-example": 50, - "format": "double" + "name": { + "type": "string", + "description": "Name of the owner", + "x-example": "John Doe" }, - "discount": { - "type": "number", - "description": "Discount amount", - "x-example": 50, - "format": "double" + "mandateId": { + "type": "string", + "description": "Mandate ID of the payment method", + "x-example": "yxc" }, - "credits": { - "type": "number", - "description": "Credits amount", - "x-example": 50, - "format": "double" + "country": { + "type": "string", + "description": "Country of the payment method", + "x-example": "de" }, - "items": { - "type": "array", - "description": "Estimation items", - "items": { - "$ref": "#\/components\/schemas\/estimation_item" - }, - "x-example": [] + "state": { + "type": "string", + "description": "State of the payment method", + "x-example": "" }, - "discounts": { - "type": "array", - "description": "Estimation discount items", - "items": { - "$ref": "#\/components\/schemas\/estimation_item" - }, - "x-example": [] + "lastError": { + "type": "string", + "description": "Last payment error associated with the payment method.", + "x-example": "Your card has insufficient funds." }, - "trialDays": { - "type": "integer", - "description": "Trial days", - "x-example": 14, - "format": "int32" + "default": { + "type": "boolean", + "description": "True when it's the default payment method.", + "x-example": false }, - "trialEndDate": { - "type": "string", - "description": "Trial end date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "amount", - "grossAmount", - "discount", - "credits", - "items", - "discounts", - "trialDays" - ], - "example": { - "amount": 50, - "grossAmount": 50, - "discount": 50, - "credits": 50, - "items": [], - "discounts": [], - "trialDays": 14, - "trialEndDate": "2020-10-15T06:38:00.000+00:00" - } - }, - "estimationDeleteOrganization": { - "description": "DeleteOrganization", - "type": "object", - "properties": { - "unpaidInvoices": { - "type": "array", - "description": "List of unpaid invoices", - "items": { - "$ref": "#\/components\/schemas\/invoice" - }, - "x-example": [] + "expired": { + "type": "boolean", + "description": "True when payment method has expired.", + "x-example": false + }, + "failed": { + "type": "boolean", + "description": "True when payment method has failed to process multiple times.", + "x-example": false } }, "required": [ - "unpaidInvoices" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "providerMethodId", + "clientSecret", + "providerUserId", + "userId", + "expiryMonth", + "expiryYear", + "last4", + "brand", + "name", + "mandateId", + "country", + "state", + "lastError", + "default", + "expired", + "failed" ], "example": { - "unpaidInvoices": [] + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "providerMethodId": "abdk3ed3sdkfj", + "clientSecret": "seti_ddfe", + "providerUserId": "abdk3ed3sdkfj", + "userId": "5e5ea5c16897e", + "expiryMonth": 2, + "expiryYear": 2024, + "last4": "4242", + "brand": "visa", + "name": "John Doe", + "mandateId": "yxc", + "country": "de", + "state": "", + "lastError": "Your card has insufficient funds.", + "default": false, + "expired": false, + "failed": false } }, - "estimation_item": { - "description": "Item", + "dedicatedDatabasePITRWindows": { + "description": "PITRWindows", "type": "object", "properties": { - "label": { + "earliest": { "type": "string", - "description": "Label", - "x-example": "Plan name" + "description": "Earliest available recovery point.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "value": { - "type": "number", - "description": "Gross payable amount", - "x-example": 50, - "format": "double" + "latest": { + "type": "string", + "description": "Latest available recovery point.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "label", - "value" + "earliest", + "latest" ], "example": { - "label": "Plan name", - "value": 50 + "earliest": "2020-10-15T06:38:00.000+00:00", + "latest": "2020-10-15T06:38:00.000+00:00" } }, - "estimationPlanChange": { - "description": "EstimationPlanChange", + "planChangeEstimationDetails": { + "description": "PlanChangeEstimationDetails", "type": "object", "properties": { - "currentBillingPlanId": { - "type": "string", - "description": "Current billing plan ID", - "x-example": "tier-2" - }, - "targetBillingPlanId": { - "type": "string", - "description": "Target billing plan ID", - "x-example": "tier-0" - }, - "direction": { + "currency": { "type": "string", - "description": "Direction of plan change: upgrade, downgrade, or same", - "x-example": "downgrade" + "description": "Currency code", + "x-example": "USD" }, - "estimation": { - "type": "object", - "description": "Cost estimation details", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/planChangeEstimationDetails" - } - ] + "grossAmount": { + "type": "number", + "description": "Gross amount after all discounts and credits", + "x-example": 15, + "format": "double" }, - "limits": { - "type": "object", - "description": "Plan limits and compliance information", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/planChangeLimits" - } - ] - } - }, - "required": [ - "currentBillingPlanId", - "targetBillingPlanId", - "direction", - "estimation", - "limits" - ], - "example": { - "currentBillingPlanId": "tier-2", - "targetBillingPlanId": "tier-0", - "direction": "downgrade", - "estimation": null, - "limits": null - } - }, - "estimationUpdatePlan": { - "description": "UpdatePlan", - "type": "object", - "properties": { - "amount": { + "credits": { "type": "number", - "description": "Total amount", - "x-example": 50, + "description": "Credits applied from coupon", + "x-example": 0, "format": "double" }, - "grossAmount": { + "organizationCredits": { "type": "number", - "description": "Gross payable amount", - "x-example": 50, + "description": "Organization's existing credits applied", + "x-example": 5, "format": "double" }, "discount": { "type": "number", - "description": "Discount amount", - "x-example": 50, + "description": "Discount amount from prorated invoices", + "x-example": 0, "format": "double" }, - "credits": { + "amount": { "type": "number", - "description": "Credits amount", - "x-example": 50, + "description": "Total amount before discounts and credits", + "x-example": 20, "format": "double" }, + "nextInvoiceDate": { + "type": "string", + "description": "Next invoice date", + "x-example": "2025-12-01T00:00:00.000Z" + }, "items": { - "type": "array", - "description": "Estimation items", - "items": { - "$ref": "#\/components\/schemas\/estimation_item" - }, - "x-example": [] + "type": "object", + "additionalProperties": true, + "description": "Line items breakdown", + "x-example": [ + { + "label": "Starter plan", + "value": 0 + }, + { + "label": "Additional seats", + "value": 10 + } + ] }, "discounts": { - "type": "array", - "description": "Estimation discount items", - "items": { - "$ref": "#\/components\/schemas\/estimation_item" - }, - "x-example": [] - }, - "trialDays": { - "type": "integer", - "description": "Trial days", - "x-example": 14, - "format": "int32" - }, - "trialEndDate": { - "type": "string", - "description": "Trial end date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "organizationCredits": { - "type": "number", - "description": "Organization's existing credits", - "x-example": 0, - "format": "double" + "type": "object", + "additionalProperties": true, + "description": "Applied discounts breakdown", + "x-example": [ + { + "label": "Organization credits", + "value": 5 + } + ] } }, "required": [ - "amount", + "currency", "grossAmount", - "discount", "credits", + "organizationCredits", + "discount", + "amount", + "nextInvoiceDate", "items", - "discounts", - "trialDays", - "organizationCredits" + "discounts" ], "example": { - "amount": 50, - "grossAmount": 50, - "discount": 50, - "credits": 50, - "items": [], - "discounts": [], - "trialDays": 14, - "trialEndDate": "2020-10-15T06:38:00.000+00:00", - "organizationCredits": 0 + "currency": "USD", + "grossAmount": 15, + "credits": 0, + "organizationCredits": 5, + "discount": 0, + "amount": 20, + "nextInvoiceDate": "2025-12-01T00:00:00.000Z", + "items": [ + { + "label": "Starter plan", + "value": 0 + }, + { + "label": "Additional seats", + "value": 10 + } + ], + "discounts": [ + { + "label": "Organization credits", + "value": 5 + } + ] } }, - "dedicatedDatabaseExtensions": { - "description": "Extensions", + "planChangeLimits": { + "description": "PlanChangeLimits", "type": "object", "properties": { - "installed": { + "totalProjects": { + "type": "integer", + "description": "Total number of projects in the organization", + "x-example": 5, + "format": "int32" + }, + "nonCompliantProjects": { + "type": "integer", + "description": "Number of projects exceeding target plan limits", + "x-example": 2, + "format": "int32" + }, + "canChangePlan": { + "type": "boolean", + "description": "Whether the plan change is allowed", + "x-example": false + }, + "projects": { "type": "array", - "description": "List of installed extensions.", + "description": "Project compliance details", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/planChangeProjectCompliance" }, - "x-example": [ - "pgvector", - "uuid-ossp" - ] + "x-example": [] }, - "available": { + "unsupportedAddons": { "type": "array", - "description": "List of available extensions that can be installed.", + "description": "Active addon keys that the target plan does not support. When non-empty, `canChangePlan` is false.", "items": { "type": "string" }, "x-example": [ - "postgis", - "pg_trgm" + "baa" ] } }, "required": [ - "installed", - "available" + "totalProjects", + "nonCompliantProjects", + "canChangePlan", + "projects", + "unsupportedAddons" ], "example": { - "installed": [ - "pgvector", - "uuid-ossp" - ], - "available": [ - "postgis", - "pg_trgm" + "totalProjects": 5, + "nonCompliantProjects": 2, + "canChangePlan": false, + "projects": [], + "unsupportedAddons": [ + "baa" ] } }, - "dedicatedDatabaseHAReplica": { - "description": "HAReplica", + "planChangeProjectCompliance": { + "description": "PlanChangeProjectCompliance", "type": "object", "properties": { "$id": { "type": "string", - "description": "Replica identifier.", - "x-example": "replica-1" + "description": "Project ID", + "x-example": "proj_a" }, - "role": { + "name": { "type": "string", - "description": "Replica role. Possible values: primary (accepts reads and writes), replica (read-only follower).", - "x-example": "replica" + "description": "Project name", + "x-example": "Marketing Site" }, - "status": { - "type": "string", - "description": "Replica health status. Possible values: healthy (fully synced), degraded (lagging behind primary), unhealthy (replication broken or unreachable).", - "x-example": "healthy" + "isCompliant": { + "type": "boolean", + "description": "Whether the project complies with target plan limits", + "x-example": false }, - "lagSeconds": { - "type": "number", - "description": "Replication lag in seconds.", - "x-example": 0.5, - "format": "double" + "resources": { + "type": "array", + "description": "Resource compliance details", + "items": { + "$ref": "#\/components\/schemas\/planChangeResourceCompliance" + }, + "x-example": [] + }, + "error": { + "type": "string", + "description": "Failure reason when compliance could not be evaluated. Present only when the project DB or Regions API was unreachable; in that case `isCompliant` is false (fail closed) and `resources` is empty.", + "x-example": "Failed to get project compliance from Regions API. Status: 500", + "nullable": true } }, "required": [ "$id", - "role", - "status", - "lagSeconds" + "name", + "isCompliant", + "resources" ], "example": { - "$id": "replica-1", - "role": "replica", - "status": "healthy", - "lagSeconds": 0.5 + "$id": "proj_a", + "name": "Marketing Site", + "isCompliant": false, + "resources": [], + "error": "Failed to get project compliance from Regions API. Status: 500" } }, - "dedicatedDatabaseHAStatus": { - "description": "HAStatus", + "planChangeResourceCompliance": { + "description": "PlanChangeResourceCompliance", "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether high availability is enabled.", - "x-example": true + "type": { + "type": "string", + "description": "Resource type", + "x-example": "databases" + }, + "currentUsage": { + "type": "integer", + "description": "Current usage count", + "x-example": 3, + "format": "int32" }, - "replicaCount": { + "limit": { "type": "integer", - "description": "Number of configured replicas.", - "x-example": 2, + "description": "Allowed limit in target plan", + "x-example": 1, "format": "int32" }, - "syncMode": { + "status": { "type": "string", - "description": "Replication sync mode. Possible values: async (asynchronous, fastest), sync (synchronous, strong consistency), quorum (quorum-based, majority of replicas must confirm).", - "x-example": "async" + "description": "Compliance status", + "x-example": "over_limit" }, - "replicas": { - "type": "array", - "description": "List of replica statuses.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseHAReplica" - }, - "x-example": [] + "excess": { + "type": "integer", + "description": "Number of resources exceeding the limit", + "x-example": 2, + "format": "int32" + }, + "resolutionHint": { + "type": "string", + "description": "Suggestion for resolving the compliance issue", + "x-example": "Delete or migrate 2 databases." } }, "required": [ - "enabled", - "replicaCount", - "syncMode", - "replicas" + "type", + "currentUsage", + "limit", + "status", + "excess", + "resolutionHint" ], "example": { - "enabled": true, - "replicaCount": 2, - "syncMode": "async", - "replicas": [] + "type": "databases", + "currentUsage": 3, + "limit": 1, + "status": "over_limit", + "excess": 2, + "resolutionHint": "Delete or migrate 2 databases." } }, - "invoice": { - "description": "Invoice", + "backupPolicy": { + "description": "backup", "type": "object", "properties": { "$id": { "type": "string", - "description": "Invoice ID.", + "description": "Backup policy ID.", "x-example": "5e5ea5c16897e" }, + "name": { + "type": "string", + "description": "Backup policy name.", + "x-example": "Hourly backups" + }, "$createdAt": { "type": "string", - "description": "Invoice creation time in ISO 8601 format.", + "description": "Policy creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Invoice update date in ISO 8601 format.", + "description": "Policy update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$permissions": { + "services": { "type": "array", - "description": "Invoice permissions. [Learn more about permissions](\/docs\/permissions).", + "description": "The services that are backed up by this policy.", "items": { "type": "string" }, - "x-example": [ - "read(\"any\")" - ] - }, - "teamId": { - "type": "string", - "description": "Project ID", - "x-example": "5e5ea5c16897e" - }, - "aggregationId": { - "type": "string", - "description": "Aggregation ID", - "x-example": "5e5ea5c16897e" - }, - "plan": { - "type": "string", - "description": "Billing plan selected. Can be one of `tier-0`, `tier-1` or `tier-2`.", - "x-example": "tier-1" + "x-example": "['databases', 'storage']" }, - "usage": { + "resources": { "type": "array", - "description": "Usage breakdown per resource", + "description": "The resources that are backed up by this policy.", "items": { - "$ref": "#\/components\/schemas\/usageResources" + "type": "string" }, - "x-example": [] - }, - "amount": { - "type": "number", - "description": "Invoice Amount", - "x-example": 50, - "format": "double" - }, - "tax": { - "type": "number", - "description": "Tax percentage", - "x-example": 17, - "format": "double" - }, - "taxAmount": { - "type": "number", - "description": "Tax amount", - "x-example": 12.5, - "format": "double" - }, - "vat": { - "type": "number", - "description": "VAT percentage", - "x-example": 17, - "format": "double" - }, - "vatAmount": { - "type": "number", - "description": "VAT amount", - "x-example": 12.5, - "format": "double" - }, - "grossAmount": { - "type": "number", - "description": "Gross amount after vat, tax, and discounts applied.", - "x-example": 12.5, - "format": "double" - }, - "creditsUsed": { - "type": "number", - "description": "Credits used.", - "x-example": 30, - "format": "double" - }, - "currency": { - "type": "string", - "description": "Currency the invoice is in", - "x-example": "USD" - }, - "clientSecret": { - "type": "string", - "description": "Client secret for processing failed payments in front-end", - "x-example": "pi_daslfasdfkla_asdkfl" - }, - "status": { - "type": "string", - "description": "Invoice status", - "x-example": "succeeded" - }, - "type": { - "type": "string", - "description": "Invoice type. Can be one of `subscription`, `domain_purchase`, `domain_renewal`, `domain_transfer`, or `addon_*`.", - "x-example": "subscription" + "x-example": "['databases', 'collections', 'attributes', 'indexes']" }, - "lastError": { + "resourceId": { "type": "string", - "description": "Last payment error associated with the invoice", - "x-example": "Your card has insufficient balance." + "description": "The resource ID to backup. Set only if this policy should backup a single resource.", + "x-example": "DB1", + "nullable": true }, - "dueAt": { + "resourceType": { "type": "string", - "description": "Invoice due date.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "The resource type to backup. Set only if this policy should backup a single resource.", + "x-example": "database", + "nullable": true }, - "from": { + "retention": { + "type": "integer", + "description": "How many days to keep the backup before it will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "schedule": { "type": "string", - "description": "Beginning date of the invoice", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Policy backup schedule in CRON format.", + "x-example": "0 * * * *" }, - "to": { + "type": { "type": "string", - "description": "End date of the invoice", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup).", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is this policy enabled.", + "x-example": true } }, "required": [ "$id", + "name", "$createdAt", "$updatedAt", - "$permissions", - "teamId", - "aggregationId", - "plan", - "usage", - "amount", - "tax", - "taxAmount", - "vat", - "vatAmount", - "grossAmount", - "creditsUsed", - "currency", - "clientSecret", - "status", + "services", + "resources", + "retention", + "schedule", "type", - "lastError", - "dueAt", - "from", - "to" + "enabled" ], "example": { "$id": "5e5ea5c16897e", + "name": "Hourly backups", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "teamId": "5e5ea5c16897e", - "aggregationId": "5e5ea5c16897e", - "plan": "tier-1", - "usage": [], - "amount": 50, - "tax": 17, - "taxAmount": 12.5, - "vat": 17, - "vatAmount": 12.5, - "grossAmount": 12.5, - "creditsUsed": 30, - "currency": "USD", - "clientSecret": "pi_daslfasdfkla_asdkfl", - "status": "succeeded", - "type": "subscription", - "lastError": "Your card has insufficient balance.", - "dueAt": "2020-10-15T06:38:00.000+00:00", - "from": "2020-10-15T06:38:00.000+00:00", - "to": "2020-10-15T06:38:00.000+00:00" + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database", + "retention": 7, + "schedule": "0 * * * *", + "type": "full", + "enabled": true } }, - "organization": { - "description": "Organization", + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", "type": "object", "properties": { "$id": { "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "$createdAt": { + "enabled": { + "type": "boolean", + "description": "Whether the deny aliased email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyDisposableEmail": { + "description": "Policy Deny Disposable Email", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "$updatedAt": { + "enabled": { + "type": "boolean", + "description": "Whether the deny disposable email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyFreeEmail": { + "description": "Policy Deny Free Email", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "name": { + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyDenyCorporateEmail": { + "description": "Policy Deny Corporate Email", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Team name.", - "x-example": "VIP" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "total": { + "enabled": { + "type": "boolean", + "description": "Whether the deny non-corporate email policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "dedicatedDatabasePooler": { + "description": "PoolerConfig", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether connection pooling is enabled.", + "x-example": true + }, + "mode": { + "type": "string", + "description": "Connection pool mode. Possible values: transaction (releases connections back to pool after each transaction), session (holds connections for the entire client session).", + "x-example": "transaction" + }, + "maxConnections": { "type": "integer", - "description": "Total number of team members.", - "x-example": 7, + "description": "Client-connection ceiling the pooler accepts. Enforced on MySQL and MariaDB; on PostgreSQL the pooler has no client cap, so this reports the database's advertised networkMaxConnections and cannot be set here.", + "x-example": 200, "format": "int32" }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/preferences" - } - ] + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "x-example": 25, + "format": "int32" }, - "billingBudget": { + "port": { "type": "integer", - "description": "Project budget limit", - "x-example": 50, + "description": "Pooler listening port.", + "x-example": 6432, "format": "int32" }, - "budgetAlerts": { - "type": "array", - "description": "Project budget limit", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [ - 50, - 75 - ] + "readWriteSplitting": { + "type": "boolean", + "description": "Whether SELECTs are routed to HA replicas while writes and locked reads stay on the primary. Active only when HA is enabled.", + "x-example": true }, - "billingPlan": { + "poolerCpuRequest": { "type": "string", - "description": "Organization's billing plan ID.", - "x-example": "tier-1" + "description": "Effective CPU request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (5% of DB CPU, floor 100m) unless overridden.", + "x-example": "100m" }, - "billingPlanId": { + "poolerCpuLimit": { "type": "string", - "description": "Organization's billing plan ID.", - "x-example": "tier-1" - }, - "billingPlanDetails": { - "type": "object", - "description": "Organization's billing plan.", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingPlan" - } - ] + "description": "Effective CPU limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (10% of DB CPU, floor 200m) unless overridden.", + "x-example": "200m" }, - "billingEmail": { + "poolerMemoryRequest": { "type": "string", - "description": "Billing email set for the organization.", - "x-example": "billing@org.example" + "description": "Effective memory request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (7.5% of DB memory, floor 64Mi) unless overridden.", + "x-example": "64Mi" }, - "billingStartDate": { + "poolerMemoryLimit": { "type": "string", - "description": "Billing cycle start date.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "billingCurrentInvoiceDate": { + "description": "Effective memory limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (15% of DB memory, floor 128Mi) unless overridden.", + "x-example": "128Mi" + } + }, + "required": [ + "enabled", + "mode", + "maxConnections", + "defaultPoolSize", + "port", + "readWriteSplitting", + "poolerCpuRequest", + "poolerCpuLimit", + "poolerMemoryRequest", + "poolerMemoryLimit" + ], + "example": { + "enabled": true, + "mode": "transaction", + "maxConnections": 200, + "defaultPoolSize": 25, + "port": 6432, + "readWriteSplitting": true, + "poolerCpuRequest": "100m", + "poolerCpuLimit": "200m", + "poolerMemoryRequest": "64Mi", + "poolerMemoryLimit": "128Mi" + } + }, + "postgresExtension": { + "description": "Postgres extension", + "type": "object", + "properties": { + "key": { "type": "string", - "description": "Current invoice cycle start date.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Extension key used with CREATE EXTENSION.", + "x-example": "vector" }, - "billingNextInvoiceDate": { + "name": { "type": "string", - "description": "Next invoice cycle start date.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Human-readable extension name.", + "x-example": "pgvector" }, - "billingTrialStartDate": { + "description": { "type": "string", - "description": "Start date of trial.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "billingTrialDays": { - "type": "integer", - "description": "Number of trial days.", - "x-example": 14, - "format": "int32" + "description": "Short description of what the extension provides.", + "x-example": "Vector data type and similarity search for embeddings." }, - "billingAggregationId": { + "category": { "type": "string", - "description": "Current active aggregation id.", - "x-example": "adbc3de4rddfsd" - }, - "billingInvoiceId": { + "description": "Category the extension belongs to.", + "x-example": "search" + } + }, + "required": [ + "key", + "name", + "description", + "category" + ], + "example": { + "key": "vector", + "name": "pgvector", + "description": "Vector data type and similarity search for embeddings.", + "category": "search" + } + }, + "program": { + "description": "Program", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Current active aggregation id.", - "x-example": "adbc3de4rddfsd" + "description": "Program ID", + "x-example": "" }, - "paymentMethodId": { + "title": { "type": "string", - "description": "Default payment method.", - "x-example": "adbc3de4rddfsd" + "description": "Program title", + "x-example": "" }, - "billingAddressId": { + "description": { "type": "string", - "description": "Default payment method.", - "x-example": "adbc3de4rddfsd" + "description": "Program description", + "x-example": "" }, - "backupPaymentMethodId": { + "tag": { "type": "string", - "description": "Backup payment method.", - "x-example": "adbc3de4rddfsd" + "description": "Program tag for highlighting on console", + "x-example": null }, - "status": { + "icon": { "type": "string", - "description": "Team status.", - "x-example": "active" + "description": "Program icon for highlighting on console", + "x-example": null }, - "remarks": { + "url": { "type": "string", - "description": "Remarks on team status.", - "x-example": "Pending initial payment" + "description": "URL for more information on this program", + "x-example": "" }, - "agreementBAA": { + "active": { + "type": "boolean", + "description": "Whether this program is active", + "x-example": false + }, + "external": { + "type": "boolean", + "description": "Whether this program is external", + "x-example": false + }, + "billingPlanId": { "type": "string", - "description": "Organization agreements", + "description": "Billing plan ID that this is program is associated with.", "x-example": "" + } + }, + "required": [ + "$id", + "title", + "description", + "tag", + "icon", + "url", + "active", + "external", + "billingPlanId" + ], + "example": { + "$id": "", + "title": "", + "description": "", + "tag": null, + "icon": null, + "url": "", + "active": false, + "external": false, + "billingPlanId": "" + } + }, + "consoleRegion": { + "description": "Region", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Region ID", + "x-example": "eu-fr" }, - "programManagerName": { + "name": { "type": "string", - "description": "Program manager's name.", - "x-example": "" + "description": "Region name", + "x-example": "EU (Frankfurt)" }, - "programManagerCalendar": { + "available": { + "type": "boolean", + "description": "Does the organization have access to this region.", + "x-example": false + }, + "disabled": { + "type": "boolean", + "description": "Does the backend support this region.", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Is this the region default.", + "x-example": true + }, + "flag": { "type": "string", - "description": "Program manager's calendar link.", - "x-example": "" + "description": "Region flag code.", + "x-example": "fr" + } + }, + "required": [ + "$id", + "name", + "available", + "disabled", + "default", + "flag" + ], + "example": { + "$id": "eu-fr", + "name": "EU (Frankfurt)", + "available": false, + "disabled": false, + "default": true, + "flag": "fr" + } + }, + "backupRestoration": { + "description": "Restoration", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Restoration ID.", + "x-example": "5e5ea5c16897e" }, - "programDiscordChannelName": { + "$createdAt": { "type": "string", - "description": "Program's discord channel name.", - "x-example": "" + "description": "Restoration creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "programDiscordChannelUrl": { + "$updatedAt": { "type": "string", - "description": "Program's discord channel URL.", - "x-example": "" + "description": "Restoration update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "billingLimits": { - "type": "object", - "description": "Billing limits reached", - "x-example": "", - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingLimits" - } - ], - "nullable": true + "archiveId": { + "type": "string", + "description": "Backup archive ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "billingPlanDowngrade": { + "policyId": { "type": "string", - "description": "Billing plan selected for downgrade.", - "x-example": "tier-1" + "description": "Backup policy ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "billingTaxId": { + "status": { "type": "string", - "description": "Tax Id", - "x-example": "" + "description": "The status of the restoration. Possible values: pending, downloading, processing, completed, failed.", + "x-example": "completed" }, - "markedForDeletion": { - "type": "boolean", - "description": "Marked for deletion", - "x-example": "" + "startedAt": { + "type": "string", + "description": "The backup start time.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "platform": { + "migrationId": { "type": "string", - "description": "Product with which the organization is associated (appwrite or imagine)", - "x-example": "imagine" + "description": "Migration ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "projects": { + "services": { "type": "array", - "description": "Selected projects", + "description": "The services that are backed up by this policy.", "items": { "type": "string" }, - "x-example": "" + "x-example": "['databases', 'storage']" + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this policy.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'collections', 'attributes', 'indexes']" + }, + "options": { + "type": "string", + "description": "Optional data in key-value object. ", + "x-example": "{databases.database[{oldId, newId, newName}]}" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "name", - "total", - "prefs", - "billingBudget", - "budgetAlerts", - "billingPlan", - "billingPlanId", - "billingPlanDetails", - "billingEmail", - "billingStartDate", - "billingCurrentInvoiceDate", - "billingNextInvoiceDate", - "billingTrialStartDate", - "billingTrialDays", - "billingAggregationId", - "billingInvoiceId", - "paymentMethodId", - "billingAddressId", - "backupPaymentMethodId", + "archiveId", + "policyId", "status", - "remarks", - "agreementBAA", - "programManagerName", - "programManagerCalendar", - "programDiscordChannelName", - "programDiscordChannelUrl", - "billingPlanDowngrade", - "billingTaxId", - "markedForDeletion", - "platform", - "projects" + "startedAt", + "migrationId", + "services", + "resources", + "options" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "billingBudget": 50, - "budgetAlerts": [ - 50, - 75 - ], - "billingPlan": "tier-1", - "billingPlanId": "tier-1", - "billingPlanDetails": null, - "billingEmail": "billing@org.example", - "billingStartDate": "2020-10-15T06:38:00.000+00:00", - "billingCurrentInvoiceDate": "2020-10-15T06:38:00.000+00:00", - "billingNextInvoiceDate": "2020-10-15T06:38:00.000+00:00", - "billingTrialStartDate": "2020-10-15T06:38:00.000+00:00", - "billingTrialDays": 14, - "billingAggregationId": "adbc3de4rddfsd", - "billingInvoiceId": "adbc3de4rddfsd", - "paymentMethodId": "adbc3de4rddfsd", - "billingAddressId": "adbc3de4rddfsd", - "backupPaymentMethodId": "adbc3de4rddfsd", - "status": "active", - "remarks": "Pending initial payment", - "agreementBAA": "", - "programManagerName": "", - "programManagerCalendar": "", - "programDiscordChannelName": "", - "programDiscordChannelUrl": "", - "billingLimits": "", - "billingPlanDowngrade": "tier-1", - "billingTaxId": "", - "markedForDeletion": "", - "platform": "imagine", - "projects": "" + "archiveId": "did8jx6ws45jana098ab7", + "policyId": "did8jx6ws45jana098ab7", + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "options": "{databases.database[{oldId, newId, newName}]}" } }, - "paymentAuthentication": { - "description": "PaymentAuthentication", + "dedicatedDatabaseRestorationList": { + "description": "Dedicated database restorations list", "type": "object", "properties": { - "message": { - "type": "string", - "description": "Message for the end user to show on Console.", - "x-example": "" + "total": { + "type": "integer", + "description": "Total number of restorations that matched your query.", + "x-example": 5, + "format": "int32" }, - "clientSecret": { + "restorations": { + "type": "array", + "description": "List of restorations.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + }, + "x-example": "" + } + }, + "required": [ + "total", + "restorations" + ], + "example": { + "total": 5, + "restorations": "" + } + }, + "review": { + "description": "Review", + "type": "object", + "properties": { + "name": { "type": "string", - "description": "Stripe client secret to use for validation.", + "description": "Name of user", "x-example": "" }, - "organizationId": { + "image": { "type": "string", - "description": "Organization ID for which the payment authentication is needed.", + "description": "Reviewer image", "x-example": "" }, - "invoiceId": { + "description": { "type": "string", - "description": "Invoice ID against which the payment needs to be validated.", + "description": "Reviewer description", "x-example": "" }, - "addonId": { + "review": { "type": "string", - "description": "Addon ID to use when calling the addon validate endpoint. Empty when authentication is not for an addon.", + "description": "Review", "x-example": "" } }, "required": [ - "message", - "clientSecret", - "organizationId", - "invoiceId", - "addonId" + "name", + "image", + "description", + "review" ], "example": { - "message": "", - "clientSecret": "", - "organizationId": "", - "invoiceId": "", - "addonId": "" + "name": "", + "image": "", + "description": "", + "review": "" } }, - "paymentMethod": { - "description": "paymentMethod", + "roles": { + "description": "Roles", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Payment Method ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Payment method creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Payment method update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { + "scopes": { "type": "array", - "description": "Payment method permissions. [Learn more about permissions](\/docs\/permissions).", + "description": "Array of scopes accessible to current user.", "items": { "type": "string" }, - "x-example": [ - "read(\"any\")" - ] - }, - "providerMethodId": { - "type": "string", - "description": "Payment method ID from the payment provider", - "x-example": "abdk3ed3sdkfj" + "x-example": "users.read" }, - "clientSecret": { + "roles": { + "type": "array", + "description": "Array of roles assigned to current user.", + "items": { + "type": "string" + }, + "x-example": "developer" + } + }, + "required": [ + "scopes", + "roles" + ], + "example": { + "scopes": "users.read", + "roles": "developer" + } + }, + "dedicatedDatabaseSpecification": { + "description": "Specification", + "type": "object", + "properties": { + "slug": { "type": "string", - "description": "Client secret hash for payment setup", - "x-example": "seti_ddfe" + "description": "Specification slug. Use this value when creating a dedicated database.", + "x-example": "s-2vcpu-2gb" }, - "providerUserId": { + "name": { "type": "string", - "description": "User ID from the payment provider.", - "x-example": "abdk3ed3sdkfj" + "description": "Human readable specification name.", + "x-example": "Standard" }, - "userId": { - "type": "string", - "description": "ID of the Team.", - "x-example": "5e5ea5c16897e" + "price": { + "type": "number", + "description": "Monthly price of the specification in USD.", + "x-example": 20, + "format": "double" }, - "expiryMonth": { + "cpu": { "type": "integer", - "description": "Expiry month of the payment method.", - "x-example": 2, + "description": "Allocated CPU in millicores.", + "x-example": 2000, "format": "int32" }, - "expiryYear": { + "memory": { "type": "integer", - "description": "Expiry year of the payment method.", - "x-example": 2024, + "description": "Allocated memory in MB.", + "x-example": 2048, "format": "int32" }, - "last4": { - "type": "string", - "description": "Last 4 digit of the payment method", - "x-example": "4242" - }, - "brand": { - "type": "string", - "description": "Payment method brand", - "x-example": "visa" - }, - "name": { - "type": "string", - "description": "Name of the owner", - "x-example": "John Doe" - }, - "mandateId": { - "type": "string", - "description": "Mandate ID of the payment method", - "x-example": "yxc" - }, - "country": { - "type": "string", - "description": "Country of the payment method", - "x-example": "de" - }, - "state": { - "type": "string", - "description": "State of the payment method", - "x-example": "" - }, - "lastError": { - "type": "string", - "description": "Last payment error associated with the payment method.", - "x-example": "Your card has insufficient funds." + "maxConnections": { + "type": "integer", + "description": "Maximum number of concurrent connections.", + "x-example": 200, + "format": "int32" }, - "default": { - "type": "boolean", - "description": "True when it's the default payment method.", - "x-example": false + "includedStorage": { + "type": "integer", + "description": "Included storage in GB before overage charges apply.", + "x-example": 25, + "format": "int32" }, - "expired": { - "type": "boolean", - "description": "True when payment method has expired.", - "x-example": false + "includedBandwidth": { + "type": "integer", + "description": "Included bandwidth in GB before overage charges apply.", + "x-example": 200, + "format": "int32" }, - "failed": { + "enabled": { "type": "boolean", - "description": "True when payment method has failed to process multiple times.", - "x-example": false + "description": "Whether the specification is available on the current plan.", + "x-example": true } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "providerMethodId", - "clientSecret", - "providerUserId", - "userId", - "expiryMonth", - "expiryYear", - "last4", - "brand", + "slug", "name", - "mandateId", - "country", - "state", - "lastError", - "default", - "expired", - "failed" + "price", + "cpu", + "memory", + "maxConnections", + "includedStorage", + "includedBandwidth", + "enabled" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "providerMethodId": "abdk3ed3sdkfj", - "clientSecret": "seti_ddfe", - "providerUserId": "abdk3ed3sdkfj", - "userId": "5e5ea5c16897e", - "expiryMonth": 2, - "expiryYear": 2024, - "last4": "4242", - "brand": "visa", - "name": "John Doe", - "mandateId": "yxc", - "country": "de", - "state": "", - "lastError": "Your card has insufficient funds.", - "default": false, - "expired": false, - "failed": false + "slug": "s-2vcpu-2gb", + "name": "Standard", + "price": 20, + "cpu": 2000, + "memory": 2048, + "maxConnections": 200, + "includedStorage": 25, + "includedBandwidth": 200, + "enabled": true } }, - "dedicatedDatabasePITRWindows": { - "description": "PITRWindows", + "dedicatedDatabaseSpecificationList": { + "description": "SpecificationList", "type": "object", "properties": { - "earliest": { - "type": "string", - "description": "Earliest available recovery point.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "specifications": { + "type": "array", + "description": "List of dedicated database specifications.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecification" + }, + "x-example": [] }, - "latest": { - "type": "string", - "description": "Latest available recovery point.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "total": { + "type": "integer", + "description": "Total number of specifications.", + "x-example": 9, + "format": "int32" + }, + "pricing": { + "type": "object", + "description": "Overage and add-on pricing shared across all specifications.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationPricing" + } + ] } }, "required": [ - "earliest", - "latest" + "specifications", + "total", + "pricing" ], "example": { - "earliest": "2020-10-15T06:38:00.000+00:00", - "latest": "2020-10-15T06:38:00.000+00:00" + "specifications": [], + "total": 9, + "pricing": null } }, - "planChangeEstimationDetails": { - "description": "PlanChangeEstimationDetails", + "dedicatedDatabaseSpecificationPricing": { + "description": "SpecificationPricing", "type": "object", "properties": { - "currency": { - "type": "string", - "description": "Currency code", - "x-example": "USD" - }, - "grossAmount": { + "storageOverageRate": { "type": "number", - "description": "Gross amount after all discounts and credits", - "x-example": 15, + "description": "Price per GB of storage above the included amount, per month, in USD.", + "x-example": 0.125, "format": "double" }, - "credits": { + "bandwidthOverageRate": { "type": "number", - "description": "Credits applied from coupon", - "x-example": 0, + "description": "Price per GB of bandwidth above the included amount, per month, in USD.", + "x-example": 0.08, "format": "double" }, - "organizationCredits": { + "replicaRate": { "type": "number", - "description": "Organization's existing credits applied", - "x-example": 5, + "description": "High availability replica price as a fraction of the specification cost.", + "x-example": 1, "format": "double" }, - "discount": { + "crossRegionReplicaRate": { "type": "number", - "description": "Discount amount from prorated invoices", - "x-example": 0, + "description": "Cross-region replica price as a fraction of the specification cost.", + "x-example": 1, "format": "double" }, - "amount": { + "pitrRate": { "type": "number", - "description": "Total amount before discounts and credits", - "x-example": 20, + "description": "Point-in-time recovery price as a fraction of the specification cost.", + "x-example": 0.2, "format": "double" + } + }, + "required": [ + "storageOverageRate", + "bandwidthOverageRate", + "replicaRate", + "crossRegionReplicaRate", + "pitrRate" + ], + "example": { + "storageOverageRate": 0.125, + "bandwidthOverageRate": 0.08, + "replicaRate": 1, + "crossRegionReplicaRate": 1, + "pitrRate": 0.2 + } + }, + "databaseStatusConnections": { + "description": "Connections", + "type": "object", + "properties": { + "current": { + "type": "integer", + "description": "Current number of active connections.", + "x-example": 12, + "format": "int32" }, - "nextInvoiceDate": { - "type": "string", - "description": "Next invoice date", - "x-example": "2025-12-01T00:00:00.000Z" - }, - "items": { - "type": "object", - "additionalProperties": true, - "description": "Line items breakdown", - "x-example": [ - { - "label": "Starter plan", - "value": 0 - }, - { - "label": "Additional seats", - "value": 10 - } - ] - }, - "discounts": { - "type": "object", - "additionalProperties": true, - "description": "Applied discounts breakdown", - "x-example": [ - { - "label": "Organization credits", - "value": 5 - } - ] + "max": { + "type": "integer", + "description": "The engine's own max_connections. On a pooled database this is the backend limit the pooler multiplexes onto, not the ceiling a client pool may reach \u2014 that is networkMaxConnections on the database resource.", + "x-example": 100, + "format": "int32" } }, "required": [ - "currency", - "grossAmount", - "credits", - "organizationCredits", - "discount", - "amount", - "nextInvoiceDate", - "items", - "discounts" + "current", + "max" ], "example": { - "currency": "USD", - "grossAmount": 15, - "credits": 0, - "organizationCredits": 5, - "discount": 0, - "amount": 20, - "nextInvoiceDate": "2025-12-01T00:00:00.000Z", - "items": [ - { - "label": "Starter plan", - "value": 0 - }, - { - "label": "Additional seats", - "value": 10 - } - ], - "discounts": [ - { - "label": "Organization credits", - "value": 5 - } - ] + "current": 12, + "max": 100 } }, - "planChangeLimits": { - "description": "PlanChangeLimits", + "databaseStatusReplica": { + "description": "Replica", "type": "object", "properties": { - "totalProjects": { + "index": { "type": "integer", - "description": "Total number of projects in the organization", - "x-example": 5, + "description": "Member index within the database. Read `role` for which member accepts writes: a failover moves the primary without renumbering the indexes.", + "x-example": 0, "format": "int32" }, - "nonCompliantProjects": { - "type": "integer", - "description": "Number of projects exceeding target plan limits", - "x-example": 2, - "format": "int32" + "role": { + "type": "string", + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology, so no member can be named the write target).", + "x-example": "primary" }, - "canChangePlan": { + "healthy": { "type": "boolean", - "description": "Whether the plan change is allowed", - "x-example": false - }, - "projects": { - "type": "array", - "description": "Project compliance details", - "items": { - "$ref": "#\/components\/schemas\/planChangeProjectCompliance" - }, - "x-example": [] + "description": "Whether the replica is healthy.", + "x-example": true }, - "unsupportedAddons": { - "type": "array", - "description": "Active addon keys that the target plan does not support. When non-empty, `canChangePlan` is false.", - "items": { - "type": "string" - }, - "x-example": [ - "baa" - ] + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds (null for primary).", + "x-example": 0.2, + "format": "double", + "nullable": true } }, "required": [ - "totalProjects", - "nonCompliantProjects", - "canChangePlan", - "projects", - "unsupportedAddons" + "index", + "role", + "healthy" ], "example": { - "totalProjects": 5, - "nonCompliantProjects": 2, - "canChangePlan": false, - "projects": [], - "unsupportedAddons": [ - "baa" - ] + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": 0.2 } }, - "planChangeProjectCompliance": { - "description": "PlanChangeProjectCompliance", + "databaseStatusVolume": { + "description": "Volume", "type": "object", "properties": { - "$id": { + "path": { "type": "string", - "description": "Project ID", - "x-example": "proj_a" + "description": "Mount path of the volume.", + "x-example": "\/var\/lib\/postgresql\/data" }, - "name": { + "usedPercent": { "type": "string", - "description": "Project name", - "x-example": "Marketing Site" - }, - "isCompliant": { - "type": "boolean", - "description": "Whether the project complies with target plan limits", - "x-example": false - }, - "resources": { - "type": "array", - "description": "Resource compliance details", - "items": { - "$ref": "#\/components\/schemas\/planChangeResourceCompliance" - }, - "x-example": [] + "description": "Percentage of storage used.", + "x-example": "45%" }, - "error": { + "available": { "type": "string", - "description": "Failure reason when compliance could not be evaluated. Present only when the project DB or Regions API was unreachable; in that case `isCompliant` is false (fail closed) and `resources` is empty.", - "x-example": "Failed to get project compliance from Regions API. Status: 500", - "nullable": true + "description": "Available storage space.", + "x-example": "55GB" + }, + "mounted": { + "type": "boolean", + "description": "Whether the volume is mounted.", + "x-example": true } }, "required": [ - "$id", - "name", - "isCompliant", - "resources" + "path", + "usedPercent", + "available", + "mounted" ], "example": { - "$id": "proj_a", - "name": "Marketing Site", - "isCompliant": false, - "resources": [], - "error": "Failed to get project compliance from Regions API. Status: 500" + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true } }, - "planChangeResourceCompliance": { - "description": "PlanChangeResourceCompliance", + "usageBillingPlan": { + "description": "usageBillingPlan", "type": "object", "properties": { - "type": { - "type": "string", - "description": "Resource type", - "x-example": "databases" + "bandwidth": { + "type": "object", + "description": "Bandwidth additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "currentUsage": { - "type": "integer", - "description": "Current usage count", - "x-example": 3, - "format": "int32" + "executions": { + "type": "object", + "description": "Executions additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "limit": { - "type": "integer", - "description": "Allowed limit in target plan", - "x-example": 1, - "format": "int32" + "member": { + "type": "object", + "description": "Member additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "status": { - "type": "string", - "description": "Compliance status", - "x-example": "over_limit" + "realtime": { + "type": "object", + "description": "Realtime additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "excess": { - "type": "integer", - "description": "Number of resources exceeding the limit", - "x-example": 2, - "format": "int32" + "realtimeMessages": { + "type": "object", + "description": "Realtime messages additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "resolutionHint": { - "type": "string", - "description": "Suggestion for resolving the compliance issue", - "x-example": "Delete or migrate 2 databases." + "realtimeBandwidth": { + "type": "object", + "description": "Realtime bandwidth additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "storage": { + "type": "object", + "description": "Storage additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "users": { + "type": "object", + "description": "User additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "GBHours": { + "type": "object", + "description": "GBHour additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "imageTransformations": { + "type": "object", + "description": "Image transformation additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "credits": { + "type": "object", + "description": "Credits additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] } }, "required": [ - "type", - "currentUsage", - "limit", - "status", - "excess", - "resolutionHint" + "bandwidth", + "executions", + "member", + "realtime", + "realtimeMessages", + "realtimeBandwidth", + "storage", + "users", + "GBHours", + "imageTransformations", + "credits" ], "example": { - "type": "databases", - "currentUsage": 3, - "limit": 1, - "status": "over_limit", - "excess": 2, - "resolutionHint": "Delete or migrate 2 databases." + "bandwidth": null, + "executions": null, + "member": null, + "realtime": null, + "realtimeMessages": null, + "realtimeBandwidth": null, + "storage": null, + "users": null, + "GBHours": null, + "imageTransformations": null, + "credits": null } }, - "backupPolicy": { - "description": "backup", + "usageDataPoint": { + "description": "usageDataPoint", "type": "object", "properties": { - "$id": { + "time": { "type": "string", - "description": "Backup policy ID.", - "x-example": "5e5ea5c16897e" + "description": "Bucket start timestamp (ISO 8601). When `interval` is omitted this is the request end time, marking the aggregate as-of moment.", + "x-example": "2026-04-09T12:00:00.000+00:00" }, - "name": { + "value": { + "type": "number", + "description": "Aggregated value for the bucket. Counters are whole numbers; gauge rates (e.g. queries per second) may be fractional.", + "x-example": 5000, + "format": "double" + }, + "path": { "type": "string", - "description": "Backup policy name.", - "x-example": "Hourly backups" + "description": "API endpoint path when broken down by `path`.", + "x-example": "\/v1\/storage\/files", + "nullable": true }, - "$createdAt": { + "method": { "type": "string", - "description": "Policy creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "HTTP method when broken down by `method`.", + "x-example": "POST", + "nullable": true }, - "$updatedAt": { + "status": { "type": "string", - "description": "Policy update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "HTTP status code when broken down by `status`.", + "x-example": "201", + "nullable": true }, - "services": { - "type": "array", - "description": "The services that are backed up by this policy.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'storage']" + "service": { + "type": "string", + "description": "API service segment when broken down by `service`.", + "x-example": "storage", + "nullable": true }, - "resources": { - "type": "array", - "description": "The resources that are backed up by this policy.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" + "country": { + "type": "string", + "description": "Country code when broken down by `country`.", + "x-example": "us", + "nullable": true }, - "resourceId": { + "continentCode": { "type": "string", - "description": "The resource ID to backup. Set only if this policy should backup a single resource.", - "x-example": "DB1", + "description": "Continent code when broken down by `continentCode`.", + "x-example": "NA", "nullable": true }, - "resourceType": { + "city": { "type": "string", - "description": "The resource type to backup. Set only if this policy should backup a single resource.", - "x-example": "database", + "description": "City name when broken down by `city`.", + "x-example": "Mountain View", "nullable": true }, - "retention": { - "type": "integer", - "description": "How many days to keep the backup before it will be automatically deleted.", - "x-example": 7, - "format": "int32" + "subdivisions": { + "type": "string", + "description": "Region\/state chain when broken down by `subdivisions`.", + "x-example": "California", + "nullable": true }, - "schedule": { + "isp": { "type": "string", - "description": "Policy backup schedule in CRON format.", - "x-example": "0 * * * *" + "description": "Internet service provider when broken down by `isp`.", + "x-example": "Google", + "nullable": true }, - "type": { + "autonomousSystemNumber": { "type": "string", - "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup).", - "x-example": "full" + "description": "Autonomous System Number (ASN) when broken down by `autonomousSystemNumber`.", + "x-example": "15169", + "nullable": true }, - "enabled": { - "type": "boolean", - "description": "Is this policy enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "services", - "resources", - "retention", - "schedule", - "type", - "enabled" - ], - "example": { - "$id": "5e5ea5c16897e", - "name": "Hourly backups", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "resourceId": "DB1", - "resourceType": "database", - "retention": 7, - "schedule": "0 * * * *", - "type": "full", - "enabled": true - } - }, - "policyDenyAliasedEmail": { - "description": "Policy Deny Aliased Email", - "type": "object", - "properties": { - "$id": { + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization owning the ASN when broken down by `autonomousSystemOrganization`.", + "x-example": "GOOGLE", + "nullable": true + }, + "connectionType": { + "type": "string", + "description": "Connection type (e.g. cable, cellular, corporate) when broken down by `connectionType`.", + "x-example": "cable", + "nullable": true + }, + "connectionUsageType": { + "type": "string", + "description": "User type (e.g. residential, business, hosting) when broken down by `connectionUsageType`.", + "x-example": "residential", + "nullable": true + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP when broken down by `connectionOrganization`.", + "x-example": "Google LLC", + "nullable": true + }, + "region": { + "type": "string", + "description": "Appwrite region when broken down by `region`.", + "x-example": "fra", + "nullable": true + }, + "hostname": { + "type": "string", + "description": "Caller origin hostname when broken down by `hostname`.", + "x-example": "app.example.com", + "nullable": true + }, + "ip": { + "type": "string", + "description": "Caller IP address when broken down by `ip`.", + "x-example": "192.0.2.44", + "nullable": true + }, + "osName": { + "type": "string", + "description": "Operating system name when broken down by `osName`.", + "x-example": "iOS", + "nullable": true + }, + "clientType": { + "type": "string", + "description": "Client type when broken down by `clientType`.", + "x-example": "browser", + "nullable": true + }, + "clientName": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Client name when broken down by `clientName`.", + "x-example": "Chrome", + "nullable": true }, - "enabled": { - "type": "boolean", - "description": "Whether the deny aliased email policy is enabled.", - "x-example": true + "sdk": { + "type": "string", + "description": "SDK name when broken down by `sdk`.", + "x-example": "web", + "nullable": true + }, + "sdkVersion": { + "type": "string", + "description": "SDK version when broken down by `sdkVersion`.", + "x-example": "14.0.0", + "nullable": true + }, + "deviceName": { + "type": "string", + "description": "Device classification when broken down by `deviceName`.", + "x-example": "smartphone", + "nullable": true + }, + "teamId": { + "type": "string", + "description": "Owning team ID when broken down by `teamId`.", + "x-example": "team_abc", + "nullable": true + }, + "resourceId": { + "type": "string", + "description": "External resource ID when broken down by `resourceId`.", + "x-example": "abc123", + "nullable": true + }, + "resourceType": { + "type": "string", + "description": "Resource type when broken down by `resourceType`.", + "x-example": "bucket", + "nullable": true + }, + "ordinal": { + "type": "string", + "description": "Replica ordinal when broken down by `ordinal`. 0 is the primary; 1+ are replicas.", + "x-example": "0", + "nullable": true } }, "required": [ - "$id", - "enabled" + "time", + "value" ], "example": { - "$id": "password-dictionary", - "enabled": true + "time": "2026-04-09T12:00:00.000+00:00", + "value": 5000, + "path": "\/v1\/storage\/files", + "method": "POST", + "status": "201", + "service": "storage", + "country": "us", + "continentCode": "NA", + "city": "Mountain View", + "subdivisions": "California", + "isp": "Google", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC", + "region": "fra", + "hostname": "app.example.com", + "ip": "192.0.2.44", + "osName": "iOS", + "clientType": "browser", + "clientName": "Chrome", + "sdk": "web", + "sdkVersion": "14.0.0", + "deviceName": "smartphone", + "teamId": "team_abc", + "resourceId": "abc123", + "resourceType": "bucket", + "ordinal": "0" } }, - "policyDenyDisposableEmail": { - "description": "Policy Deny Disposable Email", + "usageEventList": { + "description": "usageEventList", "type": "object", "properties": { - "$id": { + "interval": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", + "x-example": "1d" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny disposable email policy is enabled.", - "x-example": true + "metrics": { + "type": "array", + "description": "One entry per requested metric, each carrying its own points[] time series (sums per bucket \/ dimension over time).", + "items": { + "$ref": "#\/components\/schemas\/usageMetric" + }, + "x-example": "" } }, "required": [ - "$id", - "enabled" + "interval", + "metrics" ], "example": { - "$id": "password-dictionary", - "enabled": true + "interval": "1d", + "metrics": "" } }, - "policyDenyFreeEmail": { - "description": "Policy Deny Free Email", + "usageGaugeList": { + "description": "usageGaugeList", "type": "object", "properties": { - "$id": { + "interval": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", + "x-example": "1d" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny free email policy is enabled.", - "x-example": true + "metrics": { + "type": "array", + "description": "One entry per requested metric, each carrying its own points[] time series (latest-snapshot per bucket \/ dimension via argMax over time).", + "items": { + "$ref": "#\/components\/schemas\/usageMetric" + }, + "x-example": "" } }, "required": [ - "$id", - "enabled" + "interval", + "metrics" ], "example": { - "$id": "password-dictionary", - "enabled": true + "interval": "1d", + "metrics": "" } }, - "policyDenyCorporateEmail": { - "description": "Policy Deny Corporate Email", + "usageMetric": { + "description": "usageMetric", "type": "object", "properties": { - "$id": { + "metric": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Metric key this series describes.", + "x-example": "files.storage" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny non-corporate email policy is enabled.", - "x-example": true + "points": { + "type": "array", + "description": "Data points for this metric, ordered by time ascending. With `interval`, each entry is one bucket; without, each entry is one row of the dimensional or aggregate breakdown.", + "items": { + "$ref": "#\/components\/schemas\/usageDataPoint" + }, + "x-example": "" } }, "required": [ - "$id", - "enabled" + "metric", + "points" ], "example": { - "$id": "password-dictionary", - "enabled": true + "metric": "files.storage", + "points": "" } }, - "dedicatedDatabasePooler": { - "description": "PoolerConfig", + "usageOrganization": { + "description": "Organization", "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether connection pooling is enabled.", - "x-example": true + "bandwidth": { + "type": "array", + "description": "Aggregated stats for number of requests.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] }, - "mode": { - "type": "string", - "description": "Connection pool mode. Possible values: transaction (releases connections back to pool after each transaction), session (holds connections for the entire client session).", - "x-example": "transaction" + "users": { + "type": "array", + "description": "Aggregated stats for consumed bandwidth.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] }, - "maxConnections": { + "executions": { + "type": "array", + "description": "Aggregated stats for function executions.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesReads": { + "type": "array", + "description": "Aggregated stats for database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "Aggregated stats for database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformations": { + "type": "array", + "description": "Aggregated stats for file transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "imageTransformationsTotal": { "type": "integer", - "description": "Maximum number of pooled connections.", - "x-example": 200, + "description": "Aggregated stats for total file transformations.", + "x-example": 0, "format": "int32" }, - "defaultPoolSize": { + "screenshotsGenerated": { + "type": "array", + "description": "Aggregated stats for file transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "screenshotsGeneratedTotal": { "type": "integer", - "description": "Default pool size per user.", - "x-example": 25, + "description": "Aggregated stats for total file transformations.", + "x-example": 0, "format": "int32" }, - "port": { + "usersTotal": { "type": "integer", - "description": "Pooler listening port.", - "x-example": 6432, + "description": "Aggregated stats for total users.", + "x-example": 0, "format": "int32" }, - "readWriteSplitting": { - "type": "boolean", - "description": "Whether SELECTs are routed to HA replicas while writes and locked reads stay on the primary. Active only when HA is enabled.", - "x-example": true + "executionsTotal": { + "type": "integer", + "description": "Aggregated stats for total executions.", + "x-example": 0, + "format": "int32" }, - "poolerCpuRequest": { - "type": "string", - "description": "Effective CPU request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (5% of DB CPU, floor 100m) unless overridden.", - "x-example": "100m" + "executionsMBSecondsTotal": { + "type": "integer", + "description": "Aggregated stats for function executions in mb seconds.", + "x-example": 0, + "format": "int32" }, - "poolerCpuLimit": { - "type": "string", - "description": "Effective CPU limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (10% of DB CPU, floor 200m) unless overridden.", - "x-example": "200m" + "buildsMBSecondsTotal": { + "type": "integer", + "description": "Aggregated stats for function builds in mb seconds.", + "x-example": 0, + "format": "int32" }, - "poolerMemoryRequest": { - "type": "string", - "description": "Effective memory request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (7.5% of DB memory, floor 64Mi) unless overridden.", - "x-example": "64Mi" + "filesStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total file storage.", + "x-example": 0, + "format": "int32" }, - "poolerMemoryLimit": { - "type": "string", - "description": "Effective memory limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (15% of DB memory, floor 128Mi) unless overridden.", - "x-example": "128Mi" + "buildsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total builds storage.", + "x-example": 0, + "format": "int32" + }, + "deploymentsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total deployments storage.", + "x-example": 0, + "format": "int32" + }, + "databasesStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total databases storage.", + "x-example": 0, + "format": "int32" + }, + "databasesReadsTotal": { + "type": "integer", + "description": "Aggregated stats for total databases reads.", + "x-example": 0, + "format": "int32" + }, + "databasesWritesTotal": { + "type": "integer", + "description": "Aggregated stats for total databases writes.", + "x-example": 0, + "format": "int32" + }, + "backupsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total backups storage.", + "x-example": 0, + "format": "int32" + }, + "storageTotal": { + "type": "integer", + "description": "Aggregated stats for total storage.", + "x-example": 0, + "format": "int32" + }, + "authPhoneTotal": { + "type": "integer", + "description": "Aggregated stats for total auth phone.", + "x-example": 0, + "format": "int32" + }, + "authPhoneEstimate": { + "type": "integer", + "description": "Aggregated stats for total auth phone estimation.", + "x-example": 0, + "format": "int32" + }, + "projects": { + "type": "array", + "description": "Aggregated stats for each projects.", + "items": { + "$ref": "#\/components\/schemas\/usageOrganizationProject" + }, + "x-example": [] + }, + "realtimeConnections": { + "type": "array", + "description": "Aggregated stats for realtime connections.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "realtimeConnectionsTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime connections.", + "x-example": 0, + "format": "int32" + }, + "realtimeMessages": { + "type": "array", + "description": "Aggregated stats for realtime messages.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "realtimeMessagesTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime messages.", + "x-example": 0, + "format": "int32" + }, + "realtimeBandwidth": { + "type": "array", + "description": "Aggregated stats for realtime bandwidth.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "realtimeBandwidthTotal": { + "type": "integer", + "description": "Aggregated stats for total realtime bandwidth.", + "x-example": 0, + "format": "int32" } }, "required": [ - "enabled", - "mode", - "maxConnections", - "defaultPoolSize", - "port", - "readWriteSplitting", - "poolerCpuRequest", - "poolerCpuLimit", - "poolerMemoryRequest", - "poolerMemoryLimit" + "bandwidth", + "users", + "executions", + "databasesReads", + "databasesWrites", + "imageTransformations", + "imageTransformationsTotal", + "screenshotsGenerated", + "screenshotsGeneratedTotal", + "usersTotal", + "executionsTotal", + "executionsMBSecondsTotal", + "buildsMBSecondsTotal", + "filesStorageTotal", + "buildsStorageTotal", + "deploymentsStorageTotal", + "databasesStorageTotal", + "databasesReadsTotal", + "databasesWritesTotal", + "backupsStorageTotal", + "storageTotal", + "authPhoneTotal", + "authPhoneEstimate", + "projects", + "realtimeConnections", + "realtimeConnectionsTotal", + "realtimeMessages", + "realtimeMessagesTotal", + "realtimeBandwidth", + "realtimeBandwidthTotal" ], "example": { - "enabled": true, - "mode": "transaction", - "maxConnections": 200, - "defaultPoolSize": 25, - "port": 6432, - "readWriteSplitting": true, - "poolerCpuRequest": "100m", - "poolerCpuLimit": "200m", - "poolerMemoryRequest": "64Mi", - "poolerMemoryLimit": "128Mi" + "bandwidth": [], + "users": [], + "executions": [], + "databasesReads": [], + "databasesWrites": [], + "imageTransformations": [], + "imageTransformationsTotal": 0, + "screenshotsGenerated": [], + "screenshotsGeneratedTotal": 0, + "usersTotal": 0, + "executionsTotal": 0, + "executionsMBSecondsTotal": 0, + "buildsMBSecondsTotal": 0, + "filesStorageTotal": 0, + "buildsStorageTotal": 0, + "deploymentsStorageTotal": 0, + "databasesStorageTotal": 0, + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "backupsStorageTotal": 0, + "storageTotal": 0, + "authPhoneTotal": 0, + "authPhoneEstimate": 0, + "projects": [], + "realtimeConnections": [], + "realtimeConnectionsTotal": 0, + "realtimeMessages": [], + "realtimeMessagesTotal": 0, + "realtimeBandwidth": [], + "realtimeBandwidthTotal": 0 } }, - "program": { - "description": "Program", + "usageOrganizationProject": { + "description": "OrganizationProject", "type": "object", "properties": { - "$id": { + "projectId": { "type": "string", - "description": "Program ID", - "x-example": "" + "description": "projectId", + "x-example": "5e5ea5c16897e" + }, + "bandwidth": { + "type": "array", + "description": "Aggregated stats for number of requests.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "users": { + "type": "array", + "description": "Aggregated stats for consumed bandwidth.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executions": { + "type": "integer", + "description": "Aggregated stats for function executions.", + "x-example": [], + "format": "int32" + }, + "databasesReads": { + "type": "array", + "description": "Aggregated stats for database reads.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "databasesWrites": { + "type": "array", + "description": "Aggregated stats for database writes.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, + "executionsMBSeconds": { + "type": "integer", + "description": "Aggregated stats for function executions in mb seconds.", + "x-example": 0, + "format": "int32" + }, + "buildsMBSeconds": { + "type": "integer", + "description": "Aggregated stats for function builds in mb seconds.", + "x-example": 0, + "format": "int32" }, - "title": { - "type": "string", - "description": "Program title", - "x-example": "" + "storage": { + "type": "integer", + "description": "Aggregated stats for number of documents.", + "x-example": [], + "format": "int32" }, - "description": { - "type": "string", - "description": "Program description", - "x-example": "" + "authPhoneTotal": { + "type": "integer", + "description": "Aggregated stats for phone authentication.", + "x-example": [], + "format": "int32" }, - "tag": { - "type": "string", - "description": "Program tag for highlighting on console", - "x-example": null + "authPhoneEstimate": { + "type": "number", + "description": "Aggregated stats for phone authentication estimated cost.", + "x-example": [], + "format": "double" }, - "icon": { - "type": "string", - "description": "Program icon for highlighting on console", - "x-example": null + "databasesReadsTotal": { + "type": "integer", + "description": "Aggregated stats for total databases reads.", + "x-example": 0, + "format": "int32" }, - "url": { - "type": "string", - "description": "URL for more information on this program", - "x-example": "" + "databasesWritesTotal": { + "type": "integer", + "description": "Aggregated stats for total databases writes.", + "x-example": 0, + "format": "int32" }, - "active": { - "type": "boolean", - "description": "Whether this program is active", - "x-example": false + "imageTransformations": { + "type": "array", + "description": "Aggregated stats for file transformations.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] }, - "external": { - "type": "boolean", - "description": "Whether this program is external", - "x-example": false + "imageTransformationsTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "x-example": 0, + "format": "int32" }, - "billingPlanId": { - "type": "string", - "description": "Billing plan ID that this is program is associated with.", - "x-example": "" - } - }, - "required": [ - "$id", - "title", - "description", - "tag", - "icon", - "url", - "active", - "external", - "billingPlanId" - ], - "example": { - "$id": "", - "title": "", - "description": "", - "tag": null, - "icon": null, - "url": "", - "active": false, - "external": false, - "billingPlanId": "" - } - }, - "dedicatedDatabaseQueryExplanation": { - "description": "QueryExplanation", - "type": "object", - "properties": { - "plan": { + "screenshotsGenerated": { "type": "array", - "description": "Structured query execution plan. Contents are engine-specific.", + "description": "Aggregated stats for file transformations.", "items": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/metric" }, "x-example": [] }, - "raw": { - "type": "string", - "description": "Raw EXPLAIN output from the database engine.", - "x-example": "Seq Scan on users (cost=0.00..35.50 rows=2550 width=36)" + "screenshotsGeneratedTotal": { + "type": "integer", + "description": "Aggregated stats for total file transformations.", + "x-example": 0, + "format": "int32" + }, + "realtimeConnections": { + "type": "integer", + "description": "Aggregated stats for realtime connections.", + "x-example": 0, + "format": "int32" + }, + "realtimeMessages": { + "type": "integer", + "description": "Aggregated stats for realtime messages.", + "x-example": 0, + "format": "int32" + }, + "realtimeBandwidth": { + "type": "integer", + "description": "Aggregated stats for realtime bandwidth.", + "x-example": 0, + "format": "int32" } }, "required": [ - "plan", - "raw" + "projectId", + "bandwidth", + "users", + "executions", + "databasesReads", + "databasesWrites", + "executionsMBSeconds", + "buildsMBSeconds", + "storage", + "authPhoneTotal", + "authPhoneEstimate", + "databasesReadsTotal", + "databasesWritesTotal", + "imageTransformations", + "imageTransformationsTotal", + "screenshotsGenerated", + "screenshotsGeneratedTotal", + "realtimeConnections", + "realtimeMessages", + "realtimeBandwidth" ], "example": { - "plan": [], - "raw": "Seq Scan on users (cost=0.00..35.50 rows=2550 width=36)" + "projectId": "5e5ea5c16897e", + "bandwidth": [], + "users": [], + "executions": [], + "databasesReads": [], + "databasesWrites": [], + "executionsMBSeconds": 0, + "buildsMBSeconds": 0, + "storage": [], + "authPhoneTotal": [], + "authPhoneEstimate": [], + "databasesReadsTotal": 0, + "databasesWritesTotal": 0, + "imageTransformations": [], + "imageTransformationsTotal": 0, + "screenshotsGenerated": [], + "screenshotsGeneratedTotal": 0, + "realtimeConnections": 0, + "realtimeMessages": 0, + "realtimeBandwidth": 0 } }, - "consoleRegion": { - "description": "Region", + "usageResources": { + "description": "Resource", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Region ID", - "x-example": "eu-fr" - }, "name": { "type": "string", - "description": "Region name", - "x-example": "EU (Frankfurt)" + "description": "Invoice name", + "x-example": "" }, - "available": { - "type": "boolean", - "description": "Does the organization have access to this region.", - "x-example": false + "value": { + "type": "integer", + "description": "Invoice value", + "x-example": 0, + "format": "int32" }, - "disabled": { - "type": "boolean", - "description": "Does the backend support this region.", - "x-example": false + "amount": { + "type": "number", + "description": "Invoice amount", + "x-example": 500, + "format": "double" }, - "default": { - "type": "boolean", - "description": "Is this the region default.", - "x-example": true + "rate": { + "type": "number", + "description": "Invoice rate", + "x-example": 12.5, + "format": "double" }, - "flag": { + "desc": { "type": "string", - "description": "Region flag code.", - "x-example": "fr" + "description": "Invoice description", + "x-example": "Your monthly recurring Pro plan." + }, + "resourceId": { + "type": "string", + "description": "Resource ID", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Dedicated database engine type for per-database line items (e.g. postgresql). Empty for other resources.", + "x-example": "postgresql" + }, + "specification": { + "type": "string", + "description": "Dedicated database specification slug for per-database line items (e.g. s-2vcpu-2gb). Empty for other resources.", + "x-example": "s-2vcpu-2gb" } }, "required": [ - "$id", "name", - "available", - "disabled", - "default", - "flag" + "value", + "amount", + "rate", + "desc", + "resourceId", + "type", + "specification" ], "example": { - "$id": "eu-fr", - "name": "EU (Frankfurt)", - "available": false, - "disabled": false, - "default": true, - "flag": "fr" + "name": "", + "value": 0, + "amount": 500, + "rate": 12.5, + "desc": "Your monthly recurring Pro plan.", + "resourceId": "", + "type": "postgresql", + "specification": "s-2vcpu-2gb" } }, - "backupRestoration": { - "description": "Restoration", + "app": { + "description": "App", "type": "object", "properties": { "$id": { "type": "string", - "description": "Restoration ID.", + "description": "App ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Restoration creation time in ISO 8601 format.", + "description": "App creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Restoration update date in ISO 8601 format.", + "description": "App update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "archiveId": { + "name": { "type": "string", - "description": "Backup archive ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Application name.", + "x-example": "My Application" }, - "policyId": { + "description": { "type": "string", - "description": "Backup policy ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Application description shown to users during OAuth2 consent.", + "x-example": "Connect your workspace to My Application." }, - "status": { + "clientUri": { "type": "string", - "description": "The status of the restoration. Possible values: pending, downloading, processing, completed, failed.", - "x-example": "completed" + "description": "Application homepage URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com" }, - "startedAt": { + "logoUri": { "type": "string", - "description": "The backup start time.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Application logo URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/logo.png" }, - "migrationId": { + "privacyPolicyUrl": { "type": "string", - "description": "Migration ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/privacy" }, - "services": { - "type": "array", - "description": "The services that are backed up by this policy.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'storage']" + "termsUrl": { + "type": "string", + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/terms" }, - "resources": { + "contacts": { "type": "array", - "description": "The resources that are backed up by this policy.", + "description": "Application support or security contact emails.", "items": { "type": "string" }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" + "x-example": [ + "support@example.com" + ] }, - "options": { + "tagline": { "type": "string", - "description": "Optional data in key-value object. ", - "x-example": "{databases.database[{oldId, newId, newName}]}" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "archiveId", - "policyId", - "status", - "startedAt", - "migrationId", - "services", - "resources", - "options" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "archiveId": "did8jx6ws45jana098ab7", - "policyId": "did8jx6ws45jana098ab7", - "status": "completed", - "startedAt": "2020-10-15T06:38:00.000+00:00", - "migrationId": "did8jx6ws45jana098ab7", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "options": "{databases.database[{oldId, newId, newName}]}" - } - }, - "dedicatedDatabaseRestorationList": { - "description": "Dedicated database restorations list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of restorations that matched your query.", - "x-example": 5, - "format": "int32" + "description": "Application tagline shown to users during OAuth2 consent.", + "x-example": "Automate your workspace." }, - "restorations": { + "tags": { "type": "array", - "description": "List of restorations.", + "description": "Application tags shown to users during OAuth2 consent.", "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + "type": "string" }, - "x-example": "" - } - }, - "required": [ - "total", - "restorations" - ], - "example": { - "total": 5, - "restorations": "" - } - }, - "review": { - "description": "Review", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of user", - "x-example": "" - }, - "image": { - "type": "string", - "description": "Reviewer image", - "x-example": "" - }, - "description": { - "type": "string", - "description": "Reviewer description", - "x-example": "" + "x-example": [ + "productivity", + "automation" + ] }, - "review": { - "type": "string", - "description": "Review", - "x-example": "" - } - }, - "required": [ - "name", - "image", - "description", - "review" - ], - "example": { - "name": "", - "image": "", - "description": "", - "review": "" - } - }, - "roles": { - "description": "Roles", - "type": "object", - "properties": { - "scopes": { + "labels": { "type": "array", - "description": "Array of scopes accessible to current user.", + "description": "Application labels. Read-only for clients; only a server SDK using a project API key can update them.", "items": { "type": "string" }, - "x-example": "users.read" + "x-example": [ + "featured" + ] }, - "roles": { + "images": { "type": "array", - "description": "Array of roles assigned to current user.", + "description": "Application image URLs shown to users during OAuth2 consent.", "items": { "type": "string" }, - "x-example": "developer" - } - }, - "required": [ - "scopes", - "roles" - ], - "example": { - "scopes": "users.read", - "roles": "developer" - } - }, - "dedicatedDatabaseSlowQuery": { - "description": "SlowQuery", - "type": "object", - "properties": { - "query": { - "type": "string", - "description": "The SQL query text.", - "x-example": "SELECT * FROM users WHERE email = $1" - }, - "durationMs": { - "type": "number", - "description": "Query duration in milliseconds.", - "x-example": 523.4, - "format": "double" - }, - "calls": { - "type": "integer", - "description": "Number of times this query has been executed.", - "x-example": 42, - "format": "int32" - }, - "user": { - "type": "string", - "description": "Database user that executed the query.", - "x-example": "appwrite" + "x-example": [ + "https:\/\/example.com\/screenshot.png" + ] }, - "database": { - "type": "string", - "description": "Database name.", - "x-example": "appwrite" - } - }, - "required": [ - "query", - "durationMs", - "calls", - "user", - "database" - ], - "example": { - "query": "SELECT * FROM users WHERE email = $1", - "durationMs": 523.4, - "calls": 42, - "user": "appwrite", - "database": "appwrite" - } - }, - "dedicatedDatabaseSpecification": { - "description": "Specification", - "type": "object", - "properties": { - "slug": { + "supportUrl": { "type": "string", - "description": "Specification slug. Use this value when creating a dedicated database.", - "x-example": "s-2vcpu-2gb" + "description": "Application support URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/support" }, - "name": { + "dataDeletionUrl": { "type": "string", - "description": "Human readable specification name.", - "x-example": "Standard" - }, - "price": { - "type": "number", - "description": "Monthly price of the specification in USD.", - "x-example": 20, - "format": "double" - }, - "cpu": { - "type": "integer", - "description": "Allocated CPU in millicores.", - "x-example": 2000, - "format": "int32" - }, - "memory": { - "type": "integer", - "description": "Allocated memory in MB.", - "x-example": 2048, - "format": "int32" - }, - "maxConnections": { - "type": "integer", - "description": "Maximum number of concurrent connections.", - "x-example": 200, - "format": "int32" - }, - "includedStorage": { - "type": "integer", - "description": "Included storage in GB before overage charges apply.", - "x-example": 25, - "format": "int32" + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/data-deletion" }, - "includedBandwidth": { - "type": "integer", - "description": "Included bandwidth in GB before overage charges apply.", - "x-example": 200, - "format": "int32" + "redirectUris": { + "type": "array", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/callback" + ] + }, + "postLogoutRedirectUris": { + "type": "array", + "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/logged-out" + ] }, "enabled": { "type": "boolean", - "description": "Whether the specification is available on the current plan.", + "description": "Whether the app is enabled or not.", "x-example": true - } - }, - "required": [ - "slug", - "name", - "price", - "cpu", - "memory", - "maxConnections", - "includedStorage", - "includedBandwidth", - "enabled" - ], - "example": { - "slug": "s-2vcpu-2gb", - "name": "Standard", - "price": 20, - "cpu": 2000, - "memory": 2048, - "maxConnections": 200, - "includedStorage": 25, - "includedBandwidth": 200, - "enabled": true - } - }, - "dedicatedDatabaseSpecificationList": { - "description": "SpecificationList", - "type": "object", - "properties": { - "specifications": { + }, + "type": { + "type": "string", + "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", + "x-example": "confidential" + }, + "deviceFlow": { + "type": "boolean", + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "x-example": false + }, + "teamId": { + "type": "string", + "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", + "x-example": "5e5ea5c16897e" + }, + "installationScopes": { "type": "array", - "description": "List of dedicated database specifications.", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecification" + "type": "string" }, - "x-example": [] + "x-example": [ + "organization:organization.read" + ] }, - "total": { - "type": "integer", - "description": "Total number of specifications.", - "x-example": 9, - "format": "int32" + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" }, - "pricing": { - "type": "object", - "description": "Overage and add-on pricing shared across all specifications.", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationPricing" - } - ] + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] } }, "required": [ - "specifications", - "total", - "pricing" + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "clientUri", + "logoUri", + "privacyPolicyUrl", + "termsUrl", + "contacts", + "tagline", + "tags", + "labels", + "images", + "supportUrl", + "dataDeletionUrl", + "redirectUris", + "postLogoutRedirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", + "userId", + "installationScopes", + "installationRedirectUrl", + "secrets" ], "example": { - "specifications": [], - "total": 9, - "pricing": null + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Application", + "description": "Connect your workspace to My Application.", + "clientUri": "https:\/\/example.com", + "logoUri": "https:\/\/example.com\/logo.png", + "privacyPolicyUrl": "https:\/\/example.com\/privacy", + "termsUrl": "https:\/\/example.com\/terms", + "contacts": [ + "support@example.com" + ], + "tagline": "Automate your workspace.", + "tags": [ + "productivity", + "automation" + ], + "labels": [ + "featured" + ], + "images": [ + "https:\/\/example.com\/screenshot.png" + ], + "supportUrl": "https:\/\/example.com\/support", + "dataDeletionUrl": "https:\/\/example.com\/data-deletion", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "postLogoutRedirectUris": [ + "https:\/\/example.com\/logged-out" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", + "secrets": [] } }, - "dedicatedDatabaseSpecificationPricing": { - "description": "SpecificationPricing", + "appSecret": { + "description": "AppSecret", "type": "object", "properties": { - "storageOverageRate": { - "type": "number", - "description": "Price per GB of storage above the included amount, per month, in USD.", - "x-example": 0.125, - "format": "double" - }, - "bandwidthOverageRate": { - "type": "number", - "description": "Price per GB of bandwidth above the included amount, per month, in USD.", - "x-example": 0.08, - "format": "double" + "$id": { + "type": "string", + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, - "haReplicaRate": { - "type": "number", - "description": "High availability replica price as a fraction of the specification cost.", - "x-example": 0.5, - "format": "double" + "$createdAt": { + "type": "string", + "description": "Secret creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "crossRegionReplicaRate": { - "type": "number", - "description": "Cross-region replica price as a fraction of the specification cost.", - "x-example": 0.75, - "format": "double" + "$updatedAt": { + "type": "string", + "description": "Secret update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "crossRegionRate": { - "type": "number", - "description": "Cross-region transfer price as a fraction of the specification cost.", - "x-example": 0.5, - "format": "double" + "appId": { + "type": "string", + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" }, - "pitrRate": { - "type": "number", - "description": "Point-in-time recovery price as a fraction of the specification cost.", - "x-example": 0.2, - "format": "double" - } - }, - "required": [ - "storageOverageRate", - "bandwidthOverageRate", - "haReplicaRate", - "crossRegionReplicaRate", - "crossRegionRate", - "pitrRate" - ], - "example": { - "storageOverageRate": 0.125, - "bandwidthOverageRate": 0.08, - "haReplicaRate": 0.5, - "crossRegionReplicaRate": 0.75, - "crossRegionRate": 0.5, - "pitrRate": 0.2 - } - }, - "databaseStatusConnections": { - "description": "Connections", - "type": "object", - "properties": { - "current": { - "type": "integer", - "description": "Current number of active connections.", - "x-example": 12, - "format": "int32" + "secret": { + "type": "string", + "description": "Always empty. The application client secret is returned only once, in the response of the createSecret method.", + "x-example": "" }, - "max": { - "type": "integer", - "description": "Maximum allowed connections.", - "x-example": 100, - "format": "int32" - } - }, - "required": [ - "current", - "max" - ], - "example": { - "current": 12, - "max": 100 - } - }, - "databaseStatusReplica": { - "description": "Replica", - "type": "object", - "properties": { - "index": { - "type": "integer", - "description": "StatefulSet pod index (0 = primary, 1+ = replicas).", - "x-example": 0, - "format": "int32" + "hint": { + "type": "string", + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "role": { + "createdById": { "type": "string", - "description": "Replica role: primary or replica.", - "x-example": "primary" + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "healthy": { - "type": "boolean", - "description": "Whether the replica is healthy.", - "x-example": true + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "x-example": "Walter White" }, - "lagSeconds": { - "type": "number", - "description": "Replication lag in seconds (null for primary).", - "x-example": 0.2, - "format": "double", + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } }, "required": [ - "index", - "role", - "healthy" + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "index": 0, - "role": "primary", - "healthy": true, - "lagSeconds": 0.2 + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "databaseStatusVolume": { - "description": "Volume", + "appSecretPlaintext": { + "description": "AppSecretPlaintext", "type": "object", "properties": { - "path": { + "$id": { "type": "string", - "description": "Mount path of the volume.", - "x-example": "\/var\/lib\/postgresql\/data" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, - "usedPercent": { + "$createdAt": { "type": "string", - "description": "Percentage of storage used.", - "x-example": "45%" + "description": "Secret creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "available": { + "$updatedAt": { "type": "string", - "description": "Available storage space.", - "x-example": "55GB" + "description": "Secret update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "mounted": { - "type": "boolean", - "description": "Whether the volume is mounted.", - "x-example": true + "appId": { + "type": "string", + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "Application client secret. Returned only when the secret is created; subsequent reads always return an empty value.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the secret.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ - "path", - "usedPercent", - "available", - "mounted" + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "path": "\/var\/lib\/postgresql\/data", - "usedPercent": "45%", - "available": "55GB", - "mounted": true + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "usageBillingPlan": { - "description": "usageBillingPlan", + "appScope": { + "description": "AppScope", "type": "object", "properties": { - "bandwidth": { - "type": "object", - "description": "Bandwidth additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "executions": { - "type": "object", - "description": "Executions additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "member": { - "type": "object", - "description": "Member additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "realtime": { - "type": "object", - "description": "Realtime additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "realtimeMessages": { - "type": "object", - "description": "Realtime messages additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "realtimeBandwidth": { - "type": "object", - "description": "Realtime bandwidth additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "storage": { - "type": "object", - "description": "Storage additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "users": { - "type": "object", - "description": "User additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] - }, - "GBHours": { - "type": "object", - "description": "GBHour additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] + "value": { + "type": "string", + "description": "Scope value as requested by apps.", + "x-example": "organization:organization.read" }, - "imageTransformations": { - "type": "object", - "description": "Image transformation additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] + "description": { + "type": "string", + "description": "Human-readable description of what the scope grants.", + "x-example": "Access to read the organization" }, - "credits": { - "type": "object", - "description": "Credits additional resources", - "x-example": null, - "allOf": [ - { - "$ref": "#\/components\/schemas\/additionalResource" - } - ] + "type": { + "type": "string", + "description": "What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable.", + "x-example": "organization" + }, + "category": { + "type": "string", + "description": "Scope category, used to group scopes on consent and installation screens.", + "x-example": "Organization" + }, + "deprecated": { + "type": "boolean", + "description": "Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants.", + "x-example": false } }, "required": [ - "bandwidth", - "executions", - "member", - "realtime", - "realtimeMessages", - "realtimeBandwidth", - "storage", - "users", - "GBHours", - "imageTransformations", - "credits" + "value", + "description", + "type", + "category", + "deprecated" ], "example": { - "bandwidth": null, - "executions": null, - "member": null, - "realtime": null, - "realtimeMessages": null, - "realtimeBandwidth": null, - "storage": null, - "users": null, - "GBHours": null, - "imageTransformations": null, - "credits": null + "value": "organization:organization.read", + "description": "Access to read the organization", + "type": "organization", + "category": "Organization", + "deprecated": false } }, - "usageDataPoint": { - "description": "usageDataPoint", + "appInstallation": { + "description": "AppInstallation", "type": "object", "properties": { - "time": { + "$id": { "type": "string", - "description": "Bucket start timestamp (ISO 8601). When `interval` is omitted this is the request end time, marking the aggregate as-of moment.", - "x-example": "2026-04-09T12:00:00.000+00:00" + "description": "Installation ID.", + "x-example": "5e5ea5c16897e" }, - "value": { - "type": "integer", - "description": "Aggregated value for the bucket.", - "x-example": 5000, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Installation creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "path": { + "$updatedAt": { "type": "string", - "description": "API endpoint path when broken down by `path`.", - "x-example": "\/v1\/storage\/files", - "nullable": true + "description": "Installation update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "method": { + "appId": { "type": "string", - "description": "HTTP method when broken down by `method`.", - "x-example": "POST", - "nullable": true + "description": "ID of the installed application.", + "x-example": "5e5ea5c16897e" }, - "status": { + "teamId": { "type": "string", - "description": "HTTP status code when broken down by `status`.", - "x-example": "201", - "nullable": true + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" }, - "service": { + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] + }, + "createdById": { "type": "string", - "description": "API service segment when broken down by `service`.", - "x-example": "storage", - "nullable": true + "description": "ID of the user who created the installation.", + "x-example": "5e5ea5c16897e" }, - "country": { + "createdByName": { "type": "string", - "description": "Country code when broken down by `country`.", - "x-example": "us", - "nullable": true + "description": "Name of the user who created the installation.", + "x-example": "Walter White" }, - "region": { + "lastAccessedAt": { "type": "string", - "description": "Appwrite region when broken down by `region`.", - "x-example": "fra", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appKey": { + "description": "AppKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App key ID.", + "x-example": "5e5ea5c16897e" }, - "hostname": { + "$createdAt": { "type": "string", - "description": "Caller origin hostname when broken down by `hostname`.", - "x-example": "app.example.com", - "nullable": true + "description": "App key creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "osName": { + "$updatedAt": { "type": "string", - "description": "Operating system name when broken down by `osName`.", - "x-example": "iOS", - "nullable": true + "description": "App key update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientType": { + "appId": { "type": "string", - "description": "Client type when broken down by `clientType`.", - "x-example": "browser", - "nullable": true + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" }, - "clientName": { + "secret": { "type": "string", - "description": "Client name when broken down by `clientName`.", - "x-example": "Chrome", - "nullable": true + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "deviceName": { + "hint": { "type": "string", - "description": "Device classification when broken down by `deviceName`.", - "x-example": "smartphone", - "nullable": true + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" }, - "teamId": { + "createdById": { "type": "string", - "description": "Owning team ID when broken down by `teamId`.", - "x-example": "team_abc", - "nullable": true + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" }, - "resourceId": { + "createdByName": { "type": "string", - "description": "External resource ID when broken down by `resourceId`.", - "x-example": "abc123", - "nullable": true + "description": "Name of the user who created the app key.", + "x-example": "Walter White" }, - "resource": { + "lastAccessedAt": { "type": "string", - "description": "Resource type when broken down by `resource` (gauges only).", - "x-example": "file", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } }, "required": [ - "time", - "value" + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "time": "2026-04-09T12:00:00.000+00:00", - "value": 5000, - "path": "\/v1\/storage\/files", - "method": "POST", - "status": "201", - "service": "storage", - "country": "us", - "region": "fra", - "hostname": "app.example.com", - "osName": "iOS", - "clientType": "browser", - "clientName": "Chrome", - "deviceName": "smartphone", - "teamId": "team_abc", - "resourceId": "abc123", - "resource": "file" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "usageEventList": { - "description": "usageEventList", + "oauth2Authorize": { + "description": "OAuth2 Authorize", "type": "object", "properties": { - "interval": { + "grantId": { "type": "string", - "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", - "x-example": "1d" + "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", + "x-example": "5e5ea5c16897e" }, - "metrics": { - "type": "array", - "description": "One entry per requested metric, each carrying its own points[] time series (sums per bucket \/ dimension over time).", - "items": { - "$ref": "#\/components\/schemas\/usageMetric" - }, - "x-example": "" + "redirectUrl": { + "type": "string", + "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" } }, "required": [ - "interval", - "metrics" + "grantId", + "redirectUrl" ], "example": { - "interval": "1d", - "metrics": "" + "grantId": "5e5ea5c16897e", + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" } }, - "usageGaugeList": { - "description": "usageGaugeList", + "oauth2Approve": { + "description": "OAuth2 Approve", "type": "object", "properties": { - "interval": { + "redirectUrl": { "type": "string", - "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", - "x-example": "1d" - }, - "metrics": { - "type": "array", - "description": "One entry per requested metric, each carrying its own points[] time series (latest-snapshot per bucket \/ dimension via argMax over time).", - "items": { - "$ref": "#\/components\/schemas\/usageMetric" - }, - "x-example": "" + "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" } }, "required": [ - "interval", - "metrics" + "redirectUrl" ], "example": { - "interval": "1d", - "metrics": "" + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" } }, - "usageMetric": { - "description": "usageMetric", + "oauth2Reject": { + "description": "OAuth2 Reject", "type": "object", "properties": { - "metric": { + "redirectUrl": { "type": "string", - "description": "Metric key this series describes.", - "x-example": "files.storage" - }, - "points": { - "type": "array", - "description": "Data points for this metric, ordered by time ascending. With `interval`, each entry is one bucket; without, each entry is one row of the dimensional or aggregate breakdown.", - "items": { - "$ref": "#\/components\/schemas\/usageDataPoint" - }, - "x-example": "" + "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", + "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" } }, "required": [ - "metric", - "points" + "redirectUrl" ], "example": { - "metric": "files.storage", - "points": "" + "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" } }, - "usageOrganization": { - "description": "Organization", + "oauth2Grant": { + "description": "OAuth2 Grant", "type": "object", "properties": { - "bandwidth": { - "type": "array", - "description": "Aggregated stats for number of requests.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$id": { + "type": "string", + "description": "Grant ID.", + "x-example": "5e5ea5c16897e" }, - "users": { - "type": "array", - "description": "Aggregated stats for consumed bandwidth.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$createdAt": { + "type": "string", + "description": "Grant creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "executions": { - "type": "array", - "description": "Aggregated stats for function executions.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$updatedAt": { + "type": "string", + "description": "Grant update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "databasesReads": { - "type": "array", - "description": "Aggregated stats for database reads.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "userId": { + "type": "string", + "description": "ID of the user the grant belongs to.", + "x-example": "5e5ea5c16897e" }, - "databasesWrites": { - "type": "array", - "description": "Aggregated stats for database writes.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "appId": { + "type": "string", + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "x-example": "5e5ea5c16897e" }, - "imageTransformations": { + "scopes": { "type": "array", - "description": "Aggregated stats for file transformations.", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] - }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Aggregated stats for total file transformations.", - "x-example": 0, - "format": "int32" + "x-example": [ + "openid", + "email", + "profile" + ] }, - "screenshotsGenerated": { + "resources": { "type": "array", - "description": "Aggregated stats for file transformations.", + "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "https:\/\/api.example.com\/" + ] }, - "screenshotsGeneratedTotal": { - "type": "integer", - "description": "Aggregated stats for total file transformations.", - "x-example": 0, - "format": "int32" + "authorizationDetails": { + "type": "string", + "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "imagineCredits": { - "type": "array", - "description": "Aggregated stats for imagine credits.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "prompt": { + "type": "string", + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "x-example": "login" }, - "imagineCreditsTotal": { - "type": "integer", - "description": "Aggregated stats for total imagine credits.", - "x-example": 0, - "format": "int32" + "redirectUri": { + "type": "string", + "description": "Redirect URI the user will be sent to after the flow completes.", + "x-example": "https:\/\/example.com\/callback" }, - "usersTotal": { + "authTime": { "type": "integer", - "description": "Aggregated stats for total users.", - "x-example": 0, + "description": "Unix timestamp of when the user last authenticated.", + "x-example": 1592981250, "format": "int32" }, - "executionsTotal": { - "type": "integer", - "description": "Aggregated stats for total executions.", - "x-example": 0, - "format": "int32" + "expire": { + "type": "string", + "description": "Grant expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "appId", + "scopes", + "resources", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "prompt": "login", + "redirectUri": "https:\/\/example.com\/callback", + "authTime": 1592981250, + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2DeviceAuthorization": { + "description": "OAuth2 Device Authorization", + "type": "object", + "properties": { + "device_code": { + "type": "string", + "description": "Device verification code used by the client to poll the token endpoint.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "executionsMBSecondsTotal": { - "type": "integer", - "description": "Aggregated stats for function executions in mb seconds.", - "x-example": 0, - "format": "int32" + "user_code": { + "type": "string", + "description": "Short code the end user enters on the verification page.", + "x-example": "ABCD-EFGH" }, - "buildsMBSecondsTotal": { + "verification_uri": { + "type": "string", + "description": "URL where the end user enters the user code.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" + }, + "verification_uri_complete": { + "type": "string", + "description": "Verification URL with the user code prefilled as a query parameter.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" + }, + "expires_in": { "type": "integer", - "description": "Aggregated stats for function builds in mb seconds.", - "x-example": 0, + "description": "Lifetime of the device code and user code in seconds.", + "x-example": 900, "format": "int32" }, - "filesStorageTotal": { + "interval": { "type": "integer", - "description": "Aggregated stats for total file storage.", - "x-example": 0, + "description": "Minimum polling interval for the token endpoint in seconds.", + "x-example": 5, "format": "int32" + } + }, + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "example": { + "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "user_code": "ABCD-EFGH", + "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", + "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", + "expires_in": 900, + "interval": 5 + } + }, + "oauth2PAR": { + "description": "OAuth2 PAR", + "type": "object", + "properties": { + "request_uri": { + "type": "string", + "description": "Authorization request handle to pass to the authorize endpoint.", + "x-example": "urn:appwrite:oauth2:request:5e5ea5c16897e" }, - "buildsStorageTotal": { + "expires_in": { "type": "integer", - "description": "Aggregated stats for total builds storage.", - "x-example": 0, + "description": "Lifetime of the authorization request handle in seconds.", + "x-example": 600, "format": "int32" + } + }, + "required": [ + "request_uri", + "expires_in" + ], + "example": { + "request_uri": "urn:appwrite:oauth2:request:5e5ea5c16897e", + "expires_in": 600 + } + }, + "oauth2Token": { + "description": "OAuth2 Token", + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "OAuth2 access token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." }, - "deploymentsStorageTotal": { - "type": "integer", - "description": "Aggregated stats for total deployments storage.", - "x-example": 0, - "format": "int32" + "token_type": { + "type": "string", + "description": "OAuth2 token type.", + "x-example": "Bearer" }, - "databasesStorageTotal": { + "expires_in": { "type": "integer", - "description": "Aggregated stats for total databases storage.", - "x-example": 0, + "description": "Access token lifetime in seconds.", + "x-example": 3600, "format": "int32" }, - "databasesReadsTotal": { - "type": "integer", - "description": "Aggregated stats for total databases reads.", - "x-example": 0, - "format": "int32" + "refresh_token": { + "type": "string", + "description": "OAuth2 refresh token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, - "databasesWritesTotal": { - "type": "integer", - "description": "Aggregated stats for total databases writes.", - "x-example": 0, - "format": "int32" + "scope": { + "type": "string", + "description": "Space-separated scopes granted to the access token.", + "x-example": "openid email profile" }, - "backupsStorageTotal": { - "type": "integer", - "description": "Aggregated stats for total backups storage.", - "x-example": 0, - "format": "int32" + "authorization_details": { + "type": "string", + "description": "Granted RFC 9396 authorization details as a JSON string.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "nullable": true }, - "storageTotal": { - "type": "integer", - "description": "Aggregated stats for total storage.", - "x-example": 0, - "format": "int32" + "id_token": { + "type": "string", + "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "nullable": true + } + }, + "required": [ + "access_token", + "token_type", + "expires_in", + "refresh_token", + "scope" + ], + "example": { + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "token_type": "Bearer", + "expires_in": 3600, + "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", + "scope": "openid email profile", + "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + } + }, + "oauth2Consent": { + "description": "OAuth2 Consent", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Consent ID.", + "x-example": "5e5ea5c16897e" }, - "authPhoneTotal": { - "type": "integer", - "description": "Aggregated stats for total auth phone.", - "x-example": 0, - "format": "int32" + "$createdAt": { + "type": "string", + "description": "Consent creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "authPhoneEstimate": { - "type": "integer", - "description": "Aggregated stats for total auth phone estimation.", - "x-example": 0, - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "Consent update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "projects": { - "type": "array", - "description": "Aggregated stats for each projects.", - "items": { - "$ref": "#\/components\/schemas\/usageOrganizationProject" - }, - "x-example": [] + "userId": { + "type": "string", + "description": "ID of the user the consent belongs to.", + "x-example": "5e5ea5c16897e" }, - "realtimeConnections": { - "type": "array", - "description": "Aggregated stats for realtime connections.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "appId": { + "type": "string", + "description": "ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients.", + "x-example": "5e5ea5c16897e" }, - "realtimeConnectionsTotal": { - "type": "integer", - "description": "Aggregated stats for total realtime connections.", - "x-example": 0, - "format": "int32" + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the consent was given to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" }, - "realtimeMessages": { + "scopes": { "type": "array", - "description": "Aggregated stats for realtime messages.", + "description": "OAuth2 scopes the user consented to.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] - }, - "realtimeMessagesTotal": { - "type": "integer", - "description": "Aggregated stats for total realtime messages.", - "x-example": 0, - "format": "int32" + "x-example": [ + "openid", + "email", + "profile" + ] }, - "realtimeBandwidth": { + "resources": { "type": "array", - "description": "Aggregated stats for realtime bandwidth.", + "description": "RFC 8707 resource indicators the user consented to.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "https:\/\/api.example.com\/" + ] }, - "realtimeBandwidthTotal": { - "type": "integer", - "description": "Aggregated stats for total realtime bandwidth.", - "x-example": 0, - "format": "int32" + "authorizationDetails": { + "type": "string", + "description": "Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" + }, + "expire": { + "type": "string", + "description": "Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "bandwidth", - "users", - "executions", - "databasesReads", - "databasesWrites", - "imageTransformations", - "imageTransformationsTotal", - "screenshotsGenerated", - "screenshotsGeneratedTotal", - "imagineCredits", - "imagineCreditsTotal", - "usersTotal", - "executionsTotal", - "executionsMBSecondsTotal", - "buildsMBSecondsTotal", - "filesStorageTotal", - "buildsStorageTotal", - "deploymentsStorageTotal", - "databasesStorageTotal", - "databasesReadsTotal", - "databasesWritesTotal", - "backupsStorageTotal", - "storageTotal", - "authPhoneTotal", - "authPhoneEstimate", - "projects", - "realtimeConnections", - "realtimeConnectionsTotal", - "realtimeMessages", - "realtimeMessagesTotal", - "realtimeBandwidth", - "realtimeBandwidthTotal" + "$id", + "$createdAt", + "$updatedAt", + "userId", + "appId", + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" ], "example": { - "bandwidth": [], - "users": [], - "executions": [], - "databasesReads": [], - "databasesWrites": [], - "imageTransformations": [], - "imageTransformationsTotal": 0, - "screenshotsGenerated": [], - "screenshotsGeneratedTotal": 0, - "imagineCredits": [], - "imagineCreditsTotal": 0, - "usersTotal": 0, - "executionsTotal": 0, - "executionsMBSecondsTotal": 0, - "buildsMBSecondsTotal": 0, - "filesStorageTotal": 0, - "buildsStorageTotal": 0, - "deploymentsStorageTotal": 0, - "databasesStorageTotal": 0, - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "backupsStorageTotal": 0, - "storageTotal": 0, - "authPhoneTotal": 0, - "authPhoneEstimate": 0, - "projects": [], - "realtimeConnections": [], - "realtimeConnectionsTotal": 0, - "realtimeMessages": [], - "realtimeMessagesTotal": 0, - "realtimeBandwidth": [], - "realtimeBandwidthTotal": 0 + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" } }, - "usageOrganizationProject": { - "description": "OrganizationProject", + "oauth2ConsentToken": { + "description": "OAuth2 Consent Token", "type": "object", "properties": { - "projectId": { + "$id": { "type": "string", - "description": "projectId", + "description": "Token family ID.", "x-example": "5e5ea5c16897e" }, - "bandwidth": { - "type": "array", - "description": "Aggregated stats for number of requests.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$createdAt": { + "type": "string", + "description": "Token creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "users": { - "type": "array", - "description": "Aggregated stats for consumed bandwidth.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "$updatedAt": { + "type": "string", + "description": "Token update date in ISO 8601 format. Refreshing the token family updates this.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "executions": { - "type": "integer", - "description": "Aggregated stats for function executions.", - "x-example": [], - "format": "int32" + "consentId": { + "type": "string", + "description": "ID of the consent the token family was issued under.", + "x-example": "5e5ea5c16897e" }, - "databasesReads": { + "userId": { + "type": "string", + "description": "ID of the user the token family belongs to.", + "x-example": "5e5ea5c16897e" + }, + "appId": { + "type": "string", + "description": "ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients.", + "x-example": "5e5ea5c16897e" + }, + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the token family was issued to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" + }, + "scopes": { "type": "array", - "description": "Aggregated stats for database reads.", + "description": "OAuth2 scopes granted on the token family.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "openid", + "email", + "profile" + ] }, - "databasesWrites": { + "resources": { "type": "array", - "description": "Aggregated stats for database writes.", + "description": "RFC 8707 resource indicators granted on the token family.", "items": { - "$ref": "#\/components\/schemas\/metric" + "type": "string" }, - "x-example": [] + "x-example": [ + "https:\/\/api.example.com\/" + ] }, - "executionsMBSeconds": { - "type": "integer", - "description": "Aggregated stats for function executions in mb seconds.", - "x-example": 0, - "format": "int32" + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "buildsMBSeconds": { - "type": "integer", - "description": "Aggregated stats for function builds in mb seconds.", - "x-example": 0, - "format": "int32" + "expire": { + "type": "string", + "description": "Expiration time of the current access token of this family in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "consentId", + "userId", + "appId", + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "consentId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "wafRule": { + "description": "WafRule", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "wafRule1" }, - "storage": { - "type": "integer", - "description": "Aggregated stats for number of documents.", - "x-example": [], - "format": "int32" + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "authPhoneTotal": { - "type": "integer", - "description": "Aggregated stats for phone authentication.", - "x-example": [], - "format": "int32" + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "authPhoneEstimate": { - "type": "number", - "description": "Aggregated stats for phone authentication estimated cost.", - "x-example": [], - "format": "double" + "name": { + "type": "string", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, - "databasesReadsTotal": { - "type": "integer", - "description": "Aggregated stats for total databases reads.", - "x-example": 0, - "format": "int32" + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "databasesWritesTotal": { + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "x-example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "x-example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" + }, + "action": { + "type": "string", + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" + }, + "priority": { "type": "integer", - "description": "Aggregated stats for total databases writes.", - "x-example": 0, + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, "format": "int32" }, - "imageTransformations": { - "type": "array", - "description": "Aggregated stats for file transformations.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", "x-example": [] + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" + ], + "example": { + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] + } + }, + "wafRuleBypass": { + "description": "WafRuleBypass", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "x-example": "cloudConsole" }, - "imageTransformationsTotal": { - "type": "integer", - "description": "Aggregated stats for total file transformations.", - "x-example": 0, - "format": "int32" + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "screenshotsGenerated": { - "type": "array", - "description": "Aggregated stats for file transformations.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "screenshotsGeneratedTotal": { - "type": "integer", - "description": "Aggregated stats for total file transformations.", - "x-example": 0, - "format": "int32" + "action": { + "type": "string", + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "imagineCredits": { + "priority": { "type": "integer", - "description": "Aggregated stats for imagine credits.", - "x-example": 0, + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, "format": "int32" }, - "realtimeConnections": { - "type": "integer", - "description": "Aggregated stats for realtime connections.", - "x-example": 0, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true }, - "realtimeMessages": { - "type": "integer", - "description": "Aggregated stats for realtime messages.", - "x-example": 0, - "format": "int32" + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] }, - "realtimeBandwidth": { - "type": "integer", - "description": "Aggregated stats for realtime bandwidth.", - "x-example": 0, - "format": "int32" + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", "projectId", - "bandwidth", - "users", - "executions", - "databasesReads", - "databasesWrites", - "executionsMBSeconds", - "buildsMBSeconds", - "storage", - "authPhoneTotal", - "authPhoneEstimate", - "databasesReadsTotal", - "databasesWritesTotal", - "imageTransformations", - "imageTransformationsTotal", - "screenshotsGenerated", - "screenshotsGeneratedTotal", - "imagineCredits", - "realtimeConnections", - "realtimeMessages", - "realtimeBandwidth" + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" ], "example": { - "projectId": "5e5ea5c16897e", - "bandwidth": [], - "users": [], - "executions": [], - "databasesReads": [], - "databasesWrites": [], - "executionsMBSeconds": 0, - "buildsMBSeconds": 0, - "storage": [], - "authPhoneTotal": [], - "authPhoneEstimate": [], - "databasesReadsTotal": 0, - "databasesWritesTotal": 0, - "imageTransformations": [], - "imageTransformationsTotal": 0, - "screenshotsGenerated": [], - "screenshotsGeneratedTotal": 0, - "imagineCredits": 0, - "realtimeConnections": 0, - "realtimeMessages": 0, - "realtimeBandwidth": 0 + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] } }, - "usageResources": { - "description": "Resource", + "wafRuleDeny": { + "description": "WafRuleDeny", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Rule ID.", + "x-example": "wafRule1" + }, + "$createdAt": { + "type": "string", + "description": "WAF rule creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "WAF rule last update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "name": { "type": "string", - "description": "Invoice name", - "x-example": "" + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, - "value": { - "type": "integer", - "description": "Invoice value", - "x-example": 0, - "format": "int32" + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "amount": { - "type": "number", - "description": "Invoice amount", - "x-example": 500, - "format": "double" + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "rate": { - "type": "number", - "description": "Invoice rate", - "x-example": 12.5, - "format": "double" + "projectId": { + "type": "string", + "description": "Project ID.", + "x-example": "cloudConsole" }, - "desc": { + "resourceType": { "type": "string", - "description": "Invoice description", - "x-example": "Your monthly recurring Pro plan." + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, "resourceId": { "type": "string", - "description": "Resource ID", - "x-example": "" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" + }, + "action": { + "type": "string", + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "name", - "value", - "amount", - "rate", - "desc", - "resourceId" + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" ], "example": { - "name": "", - "value": 0, - "amount": 500, - "rate": 12.5, - "desc": "Your monthly recurring Pro plan.", - "resourceId": "" + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] } }, - "app": { - "description": "App", + "wafRuleChallenge": { + "description": "WafRuleChallenge", "type": "object", "properties": { "$id": { "type": "string", - "description": "App ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "App creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "App update date in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "name": { "type": "string", - "description": "Application name.", - "x-example": "My Application" + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, "description": { "type": "string", - "description": "Application description shown to users during OAuth2 consent.", - "x-example": "Connect your workspace to My Application." - }, - "clientUri": { - "type": "string", - "description": "Application homepage URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com" - }, - "logoUri": { - "type": "string", - "description": "Application logo URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/logo.png" + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "privacyPolicyUrl": { + "teamId": { "type": "string", - "description": "Application privacy policy URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/privacy" + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "termsUrl": { + "projectId": { "type": "string", - "description": "Application terms of service URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/terms" - }, - "contacts": { - "type": "array", - "description": "Application support or security contact emails.", - "items": { - "type": "string" - }, - "x-example": [ - "support@example.com" - ] + "description": "Project ID.", + "x-example": "cloudConsole" }, - "tagline": { + "resourceType": { "type": "string", - "description": "Application tagline shown to users during OAuth2 consent.", - "x-example": "Automate your workspace." - }, - "tags": { - "type": "array", - "description": "Application tags shown to users during OAuth2 consent.", - "items": { - "type": "string" - }, - "x-example": [ - "productivity", - "automation" - ] - }, - "images": { - "type": "array", - "description": "Application image URLs shown to users during OAuth2 consent.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/screenshot.png" - ] + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "supportUrl": { + "resourceId": { "type": "string", - "description": "Application support URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/support" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "dataDeletionUrl": { + "action": { "type": "string", - "description": "Application data deletion URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/data-deletion" - }, - "redirectUris": { - "type": "array", - "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/callback" - ] + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "postLogoutRedirectUris": { - "type": "array", - "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/logged-out" - ] + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" }, "enabled": { "type": "boolean", - "description": "Whether the app is enabled or not.", + "description": "Whether the rule is active.", "x-example": true }, - "type": { - "type": "string", - "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", - "x-example": "confidential" + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] }, - "deviceFlow": { - "type": "boolean", - "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", - "x-example": false + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] }, - "teamId": { + "challengeType": { "type": "string", - "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", - "x-example": "5e5ea5c16897e" + "description": "Challenge type enforced when the rule matches.", + "x-example": "compute" }, - "userId": { - "type": "string", - "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", - "x-example": "5e5ea5c16897e" + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest) enforced when the rule matches.", + "x-example": 3, + "format": "int32" }, - "secrets": { - "type": "array", - "description": "List of application secrets.", - "items": { - "$ref": "#\/components\/schemas\/appSecret" - }, - "x-example": [] + "ttl": { + "type": "integer", + "description": "Seconds a visitor stays cleared after passing the challenge before being challenged again.", + "x-example": 1800, + "format": "int32" } }, "required": [ @@ -111606,491 +120696,541 @@ "$updatedAt", "name", "description", - "clientUri", - "logoUri", - "privacyPolicyUrl", - "termsUrl", - "contacts", - "tagline", - "tags", - "images", - "supportUrl", - "dataDeletionUrl", - "redirectUris", - "postLogoutRedirectUris", - "enabled", - "type", - "deviceFlow", "teamId", - "userId", - "secrets" + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "challengeType", + "difficulty", + "ttl" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Application", - "description": "Connect your workspace to My Application.", - "clientUri": "https:\/\/example.com", - "logoUri": "https:\/\/example.com\/logo.png", - "privacyPolicyUrl": "https:\/\/example.com\/privacy", - "termsUrl": "https:\/\/example.com\/terms", - "contacts": [ - "support@example.com" - ], - "tagline": "Automate your workspace.", - "tags": [ - "productivity", - "automation" - ], - "images": [ - "https:\/\/example.com\/screenshot.png" - ], - "supportUrl": "https:\/\/example.com\/support", - "dataDeletionUrl": "https:\/\/example.com\/data-deletion", - "redirectUris": [ - "https:\/\/example.com\/callback" - ], - "postLogoutRedirectUris": [ - "https:\/\/example.com\/logged-out" - ], - "enabled": true, - "type": "confidential", - "deviceFlow": false, + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", "teamId": "5e5ea5c16897e", - "userId": "5e5ea5c16897e", - "secrets": [] + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "challengeType": "compute", + "difficulty": 3, + "ttl": 1800 } }, - "appSecret": { - "description": "AppSecret", + "wafRuleRateLimit": { + "description": "WafRuleRateLimit", "type": "object", "properties": { "$id": { "type": "string", - "description": "Secret ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Secret update time in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appId": { + "name": { "type": "string", - "description": "Application ID this secret belongs to.", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, - "secret": { + "projectId": { "type": "string", - "description": "Hashed application client secret.", - "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + "description": "Project ID.", + "x-example": "cloudConsole" }, - "hint": { + "resourceType": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "createdById": { + "resourceId": { "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "createdByName": { + "action": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "lastAccessedAt": { + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] + }, + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed for the given interval.", + "x-example": 1000, + "format": "int32" + }, + "interval": { + "type": "integer", + "description": "Interval in seconds for the rate limit window.", + "x-example": 60, + "format": "int32" + }, + "key": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Rate limit key: `ip` limits per client IP, `userId` limits per authenticated user.", + "x-example": "userId" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "appId", - "secret", - "hint", - "createdById", - "createdByName" + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "limit", + "interval", + "key" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "secret": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "limit": 1000, + "interval": 60, + "key": "userId" } }, - "appSecretPlaintext": { - "description": "AppSecretPlaintext", + "wafRuleRedirect": { + "description": "WafRuleRedirect", "type": "object", "properties": { "$id": { "type": "string", - "description": "Secret ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Secret update time in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appId": { + "name": { "type": "string", - "description": "Application ID this secret belongs to.", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, - "secret": { + "projectId": { "type": "string", - "description": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked value.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + "description": "Project ID.", + "x-example": "cloudConsole" }, - "hint": { + "resourceType": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "createdById": { + "resourceId": { "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "createdByName": { + "action": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "lastAccessedAt": { + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] + }, + "location": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Target location for the redirect.", + "x-example": "\/maintenance" + }, + "statusCode": { + "type": "integer", + "description": "HTTP status code used for the redirect.", + "x-example": 301, + "format": "int32" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "appId", - "secret", - "hint", - "createdById", - "createdByName" + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "location", + "statusCode" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "location": "\/maintenance", + "statusCode": 301 } }, - "oauth2Authorize": { - "description": "OAuth2 Authorize", + "wafRuleList": { + "description": "WAF rule list", "type": "object", "properties": { - "grantId": { - "type": "string", - "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", - "x-example": "5e5ea5c16897e" + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "x-example": 5, + "format": "int32" }, - "redirectUrl": { - "type": "string", - "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/wafRule" + }, + "x-example": "" } }, "required": [ - "grantId", - "redirectUrl" + "total", + "rules" ], "example": { - "grantId": "5e5ea5c16897e", - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "total": 5, + "rules": "" } }, - "oauth2Approve": { - "description": "OAuth2 Approve", + "oauth2Project": { + "description": "OAuth2 Project", "type": "object", "properties": { - "redirectUrl": { + "$id": { "type": "string", - "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "region": { + "type": "string", + "description": "Region ID the project is deployed in.", + "x-example": "fra" + }, + "endpoint": { + "type": "string", + "description": "API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured.", + "x-example": "https:\/\/fra.cloud.appwrite.io\/v1" } }, "required": [ - "redirectUrl" + "$id", + "region", + "endpoint" ], "example": { - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "$id": "5e5ea5c16897e", + "region": "fra", + "endpoint": "https:\/\/fra.cloud.appwrite.io\/v1" } }, - "oauth2Reject": { - "description": "OAuth2 Reject", + "oauth2Organization": { + "description": "OAuth2 Organization", "type": "object", "properties": { - "redirectUrl": { + "$id": { "type": "string", - "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", - "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + "description": "Organization ID.", + "x-example": "5e5ea5c16897e" } }, "required": [ - "redirectUrl" + "$id" ], "example": { - "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + "$id": "5e5ea5c16897e" } }, - "oauth2Grant": { - "description": "OAuth2 Grant", + "oauth2ProjectList": { + "description": "OAuth2 accessible projects list", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Grant ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Grant creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Grant update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "ID of the user the grant belongs to.", - "x-example": "5e5ea5c16897e" - }, - "appId": { - "type": "string", - "description": "ID of the OAuth2 client (app) the grant was requested for.", - "x-example": "5e5ea5c16897e" + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "x-example": 5, + "format": "int32" }, - "scopes": { + "projects": { "type": "array", - "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "description": "List of projects.", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/oauth2Project" }, - "x-example": [ - "openid", - "email", - "profile" - ] + "x-example": "" + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "oauth2OrganizationList": { + "description": "OAuth2 accessible organizations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of organizations that matched your query.", + "x-example": 5, + "format": "int32" }, - "resources": { + "organizations": { "type": "array", - "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", + "description": "List of organizations.", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/oauth2Organization" }, - "x-example": [ - "https:\/\/api.example.com\/" - ] - }, - "authorizationDetails": { - "type": "string", - "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", - "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" - }, - "prompt": { - "type": "string", - "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", - "x-example": "login" - }, - "redirectUri": { - "type": "string", - "description": "Redirect URI the user will be sent to after the flow completes.", - "x-example": "https:\/\/example.com\/callback" - }, - "authTime": { - "type": "integer", - "description": "Unix timestamp of when the user last authenticated.", - "x-example": 1592981250, - "format": "int32" - }, - "expire": { - "type": "string", - "description": "Grant expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "x-example": "" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "appId", - "scopes", - "resources", - "authorizationDetails", - "prompt", - "redirectUri", - "authTime", - "expire" + "total", + "organizations" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "appId": "5e5ea5c16897e", - "scopes": [ - "openid", - "email", - "profile" - ], - "resources": [ - "https:\/\/api.example.com\/" - ], - "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", - "prompt": "login", - "redirectUri": "https:\/\/example.com\/callback", - "authTime": 1592981250, - "expire": "2020-10-15T06:38:00.000+00:00" + "total": 5, + "organizations": "" } }, - "oauth2DeviceAuthorization": { - "description": "OAuth2 Device Authorization", + "oauth2ConsentList": { + "description": "OAuth2 consents list", "type": "object", "properties": { - "device_code": { - "type": "string", - "description": "Device verification code used by the client to poll the token endpoint.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" - }, - "user_code": { - "type": "string", - "description": "Short code the end user enters on the verification page.", - "x-example": "ABCD-EFGH" - }, - "verification_uri": { - "type": "string", - "description": "URL where the end user enters the user code.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" - }, - "verification_uri_complete": { - "type": "string", - "description": "Verification URL with the user code prefilled as a query parameter.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" - }, - "expires_in": { - "type": "integer", - "description": "Lifetime of the device code and user code in seconds.", - "x-example": 900, - "format": "int32" - }, - "interval": { + "total": { "type": "integer", - "description": "Minimum polling interval for the token endpoint in seconds.", + "description": "Total number of consents that matched your query.", "x-example": 5, "format": "int32" + }, + "consents": { + "type": "array", + "description": "List of consents.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Consent" + }, + "x-example": "" } }, "required": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" + "total", + "consents" ], "example": { - "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "user_code": "ABCD-EFGH", - "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", - "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", - "expires_in": 900, - "interval": 5 + "total": 5, + "consents": "" } }, - "oauth2Token": { - "description": "OAuth2 Token", + "oauth2ConsentTokenList": { + "description": "OAuth2 consent tokens list", "type": "object", "properties": { - "access_token": { - "type": "string", - "description": "OAuth2 access token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." - }, - "token_type": { - "type": "string", - "description": "OAuth2 token type.", - "x-example": "Bearer" - }, - "expires_in": { + "total": { "type": "integer", - "description": "Access token lifetime in seconds.", - "x-example": 3600, + "description": "Total number of tokens that matched your query.", + "x-example": 5, "format": "int32" }, - "refresh_token": { - "type": "string", - "description": "OAuth2 refresh token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." - }, - "scope": { - "type": "string", - "description": "Space-separated scopes granted to the access token.", - "x-example": "openid email profile" - }, - "authorization_details": { - "type": "string", - "description": "Granted RFC 9396 authorization details as a JSON string.", - "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "nullable": true - }, - "id_token": { - "type": "string", - "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "nullable": true + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + }, + "x-example": "" } }, "required": [ - "access_token", - "token_type", - "expires_in", - "refresh_token", - "scope" + "total", + "tokens" ], "example": { - "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "token_type": "Bearer", - "expires_in": 3600, - "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", - "scope": "openid email profile", - "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + "total": 5, + "tokens": "" } }, "activityEventList": { @@ -112373,60 +121513,32 @@ "blocks": "" } }, - "dedicatedDatabaseConnectionList": { - "description": "Dedicated database connections list", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of connections that matched your query.", - "x-example": 5, - "format": "int32" - }, - "connections": { - "type": "array", - "description": "List of connections.", - "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseConnection" - }, - "x-example": "" - } - }, - "required": [ - "total", - "connections" - ], - "example": { - "total": 5, - "connections": "" - } - }, - "dedicatedDatabaseSlowQueryList": { - "description": "Dedicated database slow queries list", + "databaseMigrationList": { + "description": "Database Migrations List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of slowQueries that matched your query.", + "description": "Total number of migrations that matched your query.", "x-example": 5, "format": "int32" }, - "slowQueries": { + "migrations": { "type": "array", - "description": "List of slowQueries.", + "description": "List of migrations.", "items": { - "$ref": "#\/components\/schemas\/dedicatedDatabaseSlowQuery" + "$ref": "#\/components\/schemas\/databaseMigration" }, "x-example": "" } }, "required": [ "total", - "slowQueries" + "migrations" ], "example": { "total": 5, - "slowQueries": "" + "migrations": "" } }, "dedicatedDatabaseList": { @@ -112597,6 +121709,34 @@ "paymentMethods": "" } }, + "postgresExtensionList": { + "description": "Postgres extensions list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of extensions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "extensions": { + "type": "array", + "description": "List of extensions.", + "items": { + "$ref": "#\/components\/schemas\/postgresExtension" + }, + "x-example": "" + } + }, + "required": [ + "total", + "extensions" + ], + "example": { + "total": 5, + "extensions": "" + } + }, "consoleRegionList": { "description": "Regions list", "type": "object", @@ -112680,6 +121820,90 @@ "total": 5, "secrets": "" } + }, + "appScopeList": { + "description": "App scopes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of scopes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "scopes": { + "type": "array", + "description": "List of scopes.", + "items": { + "$ref": "#\/components\/schemas\/appScope" + }, + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": { @@ -112712,6 +121936,15 @@ "demo": "<YOUR_API_KEY>" } }, + "Organization": { + "type": "apiKey", + "name": "X-Appwrite-Organization", + "description": "Your organization ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_ORGANIZATION_ID>" + } + }, "JWT": { "type": "apiKey", "name": "X-Appwrite-JWT", @@ -112721,6 +121954,12 @@ "demo": "<YOUR_JWT>" } }, + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "The OAuth access token to authenticate with" + }, "Locale": { "type": "apiKey", "name": "X-Appwrite-Locale", diff --git a/specs/latest/open-api3-latest-server.json b/specs/latest/open-api3-latest-server.json index afa3fdde..795bdd1b 100644 --- a/specs/latest/open-api3-latest-server.json +++ b/specs/latest/open-api3-latest-server.json @@ -178,6 +178,436 @@ } } }, + "\/account\/consents": { + "get": { + "summary": "List consents", + "operationId": "accountListConsents", + "tags": [ + "account" + ], + "description": "Get a list of the OAuth2 consents the current user has given to third-party apps.", + "responses": { + "200": { + "description": "OAuth2 consents list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listConsents", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/list-consents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}": { + "get": { + "summary": "Get consent", + "operationId": "accountGetConsent", + "tags": [ + "account" + ], + "description": "Get an OAuth2 consent the current user has given to a third-party app by its unique ID.", + "responses": { + "200": { + "description": "OAuth2 Consent", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Consent" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getConsent", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/get-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<CONSENT_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent", + "operationId": "accountDeleteConsent", + "tags": [ + "account" + ], + "description": "Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteConsent", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/delete-consent.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<CONSENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens": { + "get": { + "summary": "List consent tokens", + "operationId": "accountListConsentTokens", + "tags": [ + "account" + ], + "description": "Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 consent tokens list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentTokenList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listConsentTokens", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/list-consent-tokens.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/account\/consents\/{consentId}\/tokens\/{tokenId}": { + "get": { + "summary": "Get consent token", + "operationId": "accountGetConsentToken", + "tags": [ + "account" + ], + "description": "Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.", + "responses": { + "200": { + "description": "OAuth2 Consent Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getConsentToken", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/get-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete consent token", + "operationId": "accountDeleteConsentToken", + "tags": [ + "account" + ], + "description": "Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteConsentToken", + "group": "consents", + "cookies": false, + "type": "", + "demo": "account\/delete-consent-token.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "consentId", + "description": "Consent unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<CONSENT_ID>" + }, + "in": "path" + }, + { + "name": "tokenId", + "description": "Token unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TOKEN_ID>" + }, + "in": "path" + } + ] + } + }, "\/account\/email": { "patch": { "summary": "Update email", @@ -3190,7 +3620,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -3198,6 +3628,7 @@ "enum": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -3244,6 +3675,7 @@ "x-enum-keys": [ "amazon", "apple", + "appwrite", "auth0", "authentik", "autodesk", @@ -3862,7 +4294,10 @@ "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 attributes such as userId, teamId, etc.", "required": false, "schema": { - "type": "string", + "type": "array", + "items": { + "type": "string" + }, "default": [] }, "in": "query" @@ -3956,13 +4391,13 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -4033,13 +4468,13 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4163,7 +4598,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "x-example": null, "items": { "type": "string" @@ -4171,7 +4606,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -4214,6 +4649,112 @@ } } }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallationScopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, + "\/apps\/scopes\/oauth2": { + "get": { + "summary": "List OAuth2 Scopes", + "operationId": "appsListOAuth2Scopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request during the OAuth2 flow.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOAuth2Scopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-o-auth-2-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, "\/apps\/{appId}": { "get": { "summary": "Get Application", @@ -4237,13 +4778,13 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.read", "platforms": [ "console", @@ -4268,7 +4809,7 @@ "parameters": [ { "name": "appId", - "description": "Application unique ID.", + "description": "Application unique ID or HTTPS client ID metadata document URL.", "required": true, "schema": { "type": "string", @@ -4300,13 +4841,13 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4440,7 +4981,7 @@ }, "redirectUris": { "type": "array", - "description": "Redirect URIs (array of valid URLs).", + "description": "Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:\/oauth), and must not contain a fragment.", "default": [], "x-example": null, "items": { @@ -4449,7 +4990,7 @@ }, "postLogoutRedirectUris": { "type": "array", - "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.", + "description": "Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.", "default": [], "x-example": null, "items": { @@ -4467,6 +5008,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -4492,13 +5049,13 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": null, + "group": "apps", "cookies": false, "type": "", "demo": "apps\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4537,21 +5094,21 @@ ] } }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/installations": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "List Installations", + "operationId": "appsListInstallations", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { "200": { - "description": "App secrets list", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -4559,15 +5116,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": null, + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -4624,21 +5184,23 @@ "in": "query" } ] - }, - "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", + } + }, + "\/apps\/{appId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "appsGetInstallation", "tags": [ "apps" ], - "description": "Create a new client secret for an application.", + "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.", "responses": { - "201": { - "description": "AppSecretPlaintext", + "200": { + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -4646,15 +5208,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSecret", - "group": null, + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/create-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.read", + "apps.installations.read" + ], "platforms": [ "console", "client", @@ -4685,41 +5250,42 @@ "x-example": "<APP_ID>" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" } ] - } - }, - "\/apps\/{appId}\/secrets\/{secretId}": { - "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + }, + "delete": { + "summary": "Delete Installation", + "operationId": "appsDeleteInstallation", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.", "responses": { - "200": { - "description": "AppSecret", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/appSecret" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": null, + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.read", + "demo": "apps\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -4727,6 +5293,9 @@ ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Session": [] @@ -4752,40 +5321,52 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<SECRET_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + } + }, + "\/apps\/{appId}\/installations\/{installationId}\/tokens": { + "post": { + "summary": "Create Installation Token", + "operationId": "appsCreateInstallationToken", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "OAuth2 Token", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Token" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": null, + "method": "createInstallationToken", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/create-installation-token.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip}", + "scope": [ + "apps.write", + "apps.tokens.write" + ], "platforms": [ "console", "client", @@ -4793,9 +5374,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [], "Session": [] @@ -4821,33 +5399,33 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<SECRET_ID>" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } ] } }, - "\/apps\/{appId}\/team": { - "patch": { - "summary": "Update Team", - "operationId": "appsUpdateTeam", + "\/apps\/{appId}\/keys": { + "get": { + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "Transfer an application to another team by its unique ID.", + "description": "List app keys for an application.", "responses": { "200": { - "description": "App", + "description": "App keys list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/appKeyList" } } } @@ -4855,15 +5433,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", - "group": null, + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "apps.write", + "demo": "apps\/list-keys.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -4894,52 +5472,62 @@ "x-example": "<APP_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer application to.", - "x-example": "<TEAM_ID>" - } - }, - "required": [ - "teamId" - ] - } - } - } - } - } - }, - "\/apps\/{appId}\/tokens": { - "delete": { - "summary": "Delete Tokens", - "operationId": "appsDeleteTokens", + ] + }, + "post": { + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ "apps" ], - "description": "Revoke all tokens for an application by its unique ID.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTokens", - "group": null, + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-tokens.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "apps\/create-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", @@ -4948,9 +5536,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [], "Session": [] @@ -4978,22 +5563,21 @@ ] } }, - "\/avatars\/browsers\/{code}": { + "\/apps\/{appId}\/keys\/{keyId}": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "Get App Key", + "operationId": "appsGetKey", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "Get an app key by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppKey", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -5001,15 +5585,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", - "group": null, + "method": "getKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-key.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5017,11 +5601,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Session": [] } }, "security": [ @@ -5029,125 +5611,55 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Browser Code.", + "name": "appId", + "description": "Application unique ID.", "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)" - ] + "x-example": "<APP_ID>" }, "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 keep existing image quality.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "<KEY_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/avatars\/credit-cards\/{code}": { - "get": { - "summary": "Get credit card icon", - "operationId": "avatarsGetCreditCard", + }, + "delete": { + "summary": "Delete App Key", + "operationId": "appsDeleteKey", "tags": [ - "avatars" + "apps" ], - "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", + "description": "Delete an app key by its unique ID.", "responses": { - "200": { - "description": "Image", - "content": { - "image\/png": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getCreditCard", - "group": null, + "method": "deleteKey", + "group": "keys", "cookies": false, - "type": "location", - "demo": "avatars\/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/delete-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -5155,11 +5667,12 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Session": [] } }, "security": [ @@ -5167,115 +5680,48 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "amex", - "enum": [ - "amex", - "argencard", - "cabal", - "cencosud", - "diners", - "discover", - "elo", - "hipercard", - "jcb", - "mastercard", - "naranja", - "targeta-shopping", - "unionpay", - "visa", - "mir", - "maestro", - "rupay" - ], - "x-enum-name": "CreditCard", - "x-enum-keys": [ - "American Express", - "Argencard", - "Cabal", - "Cencosud", - "Diners Club", - "Discover", - "Elo", - "Hipercard", - "JCB", - "Mastercard", - "Naranja", - "Tarjeta Shopping", - "Union Pay", - "Visa", - "MIR", - "Maestro", - "Rupay" - ] + "x-example": "<APP_ID>" }, "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 keep existing image quality.", - "required": false, + "name": "keyId", + "description": "App key unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "string", + "x-example": "<KEY_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/favicon": { - "get": { - "summary": "Get favicon", - "operationId": "avatarsGetFavicon", + "\/apps\/{appId}\/labels": { + "put": { + "summary": "Update Application Labels", + "operationId": "appsUpdateLabels", "tags": [ - "avatars" + "apps" ], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", "responses": { "200": { - "description": "Image", + "description": "App", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/app" } } } @@ -5283,69 +5729,83 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFavicon", - "group": null, + "method": "updateLabels", + "group": "apps", "cookies": false, - "type": "location", - "demo": "avatars\/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/update-labels.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" + "x-example": "<APP_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } } }, - "\/avatars\/flags\/{code}": { + "\/apps\/{appId}\/secrets": { "get": { - "summary": "Get country flag", - "operationId": "avatarsGetFlag", + "summary": "List Secrets", + "operationId": "appsListSecrets", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "description": "List client secrets for an application.", "responses": { "200": { - "description": "Image", + "description": "App secrets list", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecretList" } } } @@ -5353,15 +5813,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFlag", - "group": null, + "method": "listSecrets", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5369,11 +5829,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Session": [] } }, "security": [ @@ -5381,471 +5839,60 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "af", - "enum": [ - "af", - "ao", - "al", - "ad", - "ae", - "ar", - "am", - "ag", - "au", - "at", - "az", - "bi", - "be", - "bj", - "bf", - "bd", - "bg", - "bh", - "bs", - "ba", - "by", - "bz", - "bo", - "br", - "bb", - "bn", - "bt", - "bw", - "cf", - "ca", - "ch", - "cl", - "cn", - "ci", - "cm", - "cd", - "cg", - "co", - "km", - "cv", - "cr", - "cu", - "cy", - "cz", - "de", - "dj", - "dm", - "dk", - "do", - "dz", - "ec", - "eg", - "er", - "es", - "ee", - "et", - "fi", - "fj", - "fr", - "fm", - "ga", - "gb", - "ge", - "gh", - "gn", - "gm", - "gw", - "gq", - "gr", - "gd", - "gt", - "gy", - "hn", - "hr", - "ht", - "hu", - "id", - "in", - "ie", - "ir", - "iq", - "is", - "il", - "it", - "jm", - "jo", - "jp", - "kz", - "ke", - "kg", - "kh", - "ki", - "kn", - "kr", - "kw", - "la", - "lb", - "lr", - "ly", - "lc", - "li", - "lk", - "ls", - "lt", - "lu", - "lv", - "ma", - "mc", - "md", - "mg", - "mv", - "mx", - "mh", - "mk", - "ml", - "mt", - "mm", - "me", - "mn", - "mz", - "mr", - "mu", - "mw", - "my", - "na", - "ne", - "ng", - "ni", - "nl", - "no", - "np", - "nr", - "nz", - "om", - "pk", - "pa", - "pe", - "ph", - "pw", - "pg", - "pl", - "pf", - "kp", - "pt", - "py", - "qa", - "ro", - "ru", - "rw", - "sa", - "sd", - "sn", - "sg", - "sb", - "sl", - "sv", - "sm", - "so", - "rs", - "ss", - "st", - "sr", - "sk", - "si", - "se", - "sz", - "sc", - "sy", - "td", - "tg", - "th", - "tj", - "tm", - "tl", - "to", - "tt", - "tn", - "tr", - "tv", - "tz", - "ug", - "ua", - "uy", - "us", - "uz", - "va", - "vc", - "ve", - "vn", - "vu", - "ws", - "ye", - "za", - "zm", - "zw" - ], - "x-enum-name": "Flag", - "x-enum-keys": [ - "Afghanistan", - "Angola", - "Albania", - "Andorra", - "United Arab Emirates", - "Argentina", - "Armenia", - "Antigua and Barbuda", - "Australia", - "Austria", - "Azerbaijan", - "Burundi", - "Belgium", - "Benin", - "Burkina Faso", - "Bangladesh", - "Bulgaria", - "Bahrain", - "Bahamas", - "Bosnia and Herzegovina", - "Belarus", - "Belize", - "Bolivia", - "Brazil", - "Barbados", - "Brunei Darussalam", - "Bhutan", - "Botswana", - "Central African Republic", - "Canada", - "Switzerland", - "Chile", - "China", - "C\u00f4te d'Ivoire", - "Cameroon", - "Democratic Republic of the Congo", - "Republic of the Congo", - "Colombia", - "Comoros", - "Cape Verde", - "Costa Rica", - "Cuba", - "Cyprus", - "Czech Republic", - "Germany", - "Djibouti", - "Dominica", - "Denmark", - "Dominican Republic", - "Algeria", - "Ecuador", - "Egypt", - "Eritrea", - "Spain", - "Estonia", - "Ethiopia", - "Finland", - "Fiji", - "France", - "Micronesia (Federated States of)", - "Gabon", - "United Kingdom", - "Georgia", - "Ghana", - "Guinea", - "Gambia", - "Guinea-Bissau", - "Equatorial Guinea", - "Greece", - "Grenada", - "Guatemala", - "Guyana", - "Honduras", - "Croatia", - "Haiti", - "Hungary", - "Indonesia", - "India", - "Ireland", - "Iran (Islamic Republic of)", - "Iraq", - "Iceland", - "Israel", - "Italy", - "Jamaica", - "Jordan", - "Japan", - "Kazakhstan", - "Kenya", - "Kyrgyzstan", - "Cambodia", - "Kiribati", - "Saint Kitts and Nevis", - "South Korea", - "Kuwait", - "Lao People's Democratic Republic", - "Lebanon", - "Liberia", - "Libya", - "Saint Lucia", - "Liechtenstein", - "Sri Lanka", - "Lesotho", - "Lithuania", - "Luxembourg", - "Latvia", - "Morocco", - "Monaco", - "Moldova", - "Madagascar", - "Maldives", - "Mexico", - "Marshall Islands", - "North Macedonia", - "Mali", - "Malta", - "Myanmar", - "Montenegro", - "Mongolia", - "Mozambique", - "Mauritania", - "Mauritius", - "Malawi", - "Malaysia", - "Namibia", - "Niger", - "Nigeria", - "Nicaragua", - "Netherlands", - "Norway", - "Nepal", - "Nauru", - "New Zealand", - "Oman", - "Pakistan", - "Panama", - "Peru", - "Philippines", - "Palau", - "Papua New Guinea", - "Poland", - "French Polynesia", - "North Korea", - "Portugal", - "Paraguay", - "Qatar", - "Romania", - "Russia", - "Rwanda", - "Saudi Arabia", - "Sudan", - "Senegal", - "Singapore", - "Solomon Islands", - "Sierra Leone", - "El Salvador", - "San Marino", - "Somalia", - "Serbia", - "South Sudan", - "Sao Tome and Principe", - "Suriname", - "Slovakia", - "Slovenia", - "Sweden", - "Eswatini", - "Seychelles", - "Syria", - "Chad", - "Togo", - "Thailand", - "Tajikistan", - "Turkmenistan", - "Timor-Leste", - "Tonga", - "Trinidad and Tobago", - "Tunisia", - "Turkey", - "Tuvalu", - "Tanzania", - "Uganda", - "Ukraine", - "Uruguay", - "United States", - "Uzbekistan", - "Vatican City", - "Saint Vincent and the Grenadines", - "Venezuela", - "Vietnam", - "Vanuatu", - "Samoa", - "Yemen", - "South Africa", - "Zambia", - "Zimbabwe" - ] + "x-example": "<APP_ID>" }, "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.", + "name": "queries", + "description": "Array of query strings generated using the Query 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": "integer", - "format": "int32", - "x-example": 0, - "default": 100 + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" }, { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] - } - }, - "\/avatars\/image": { - "get": { - "summary": "Get image from URL", - "operationId": "avatarsGetImage", + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "tags": [ - "avatars" + "apps" ], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "description": "Create a new client secret for an application.", "responses": { - "200": { - "description": "Image", + "201": { + "description": "AppSecretPlaintext", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecretPlaintext" } } } @@ -5853,15 +5900,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getImage", - "group": null, + "method": "createSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", "platforms": [ "console", "client", @@ -5869,11 +5916,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Session": [] } }, "security": [ @@ -5881,65 +5926,38 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "url", - "description": "Image URL which you want to crop.", + "name": "appId", + "description": "Application unique ID.", "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 + "x-example": "<APP_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/initials": { + "\/apps\/{appId}\/secrets\/{secretId}": { "get": { - "summary": "Get user initials", - "operationId": "avatarsGetInitials", + "summary": "Get Secret", + "operationId": "appsGetSecret", "tags": [ - "avatars" + "apps" ], - "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", + "description": "Get an application client secret by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppSecret", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecret" } } } @@ -5947,15 +5965,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInitials", - "group": null, + "method": "getSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5963,11 +5981,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Session": [] } }, "security": [ @@ -5975,67 +5991,255 @@ "Project": [], "Session": [], "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, + "name": "appId", + "description": "Application unique ID.", + "required": true, "schema": { "type": "string", - "x-example": "<NAME>", - "default": "" + "x-example": "<APP_ID>" }, - "in": "query" + "in": "path" }, { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "name": "secretId", + "description": "Secret unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 + "type": "string", + "x-example": "<SECRET_ID>" }, - "in": "query" - }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500 + "type": "string", + "x-example": "<APP_ID>" }, - "in": "query" + "in": "path" }, { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, + "name": "secretId", + "description": "Secret unique ID.", + "required": true, "schema": { "type": "string", - "default": "" + "x-example": "<SECRET_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/avatars\/qr": { + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<APP_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer application to.", + "x-example": "<TEAM_ID>" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTokens", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<APP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { "get": { - "summary": "Get QR code", - "operationId": "avatarsGetQR", + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", "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", + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", "responses": { "200": { "description": "Image", @@ -6051,11 +6255,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQR", + "method": "getBrowser", "group": null, "cookies": false, "type": "location", - "demo": "avatars\/get-qr.md", + "demo": "avatars\/get-browser.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6067,7 +6271,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { "Project": [], "Session": [], @@ -6085,61 +6289,95 @@ ], "parameters": [ { - "name": "text", - "description": "Plain text to be converted to QR code image.", + "name": "code", + "description": "Browser Code.", "required": true, "schema": { "type": "string", - "x-example": "<TEXT>" + "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": "query" + "in": "path" }, { - "name": "size", - "description": "QR code size. Pass an integer between 1 to 1000. Defaults to 400.", + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": 1, - "default": 400 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "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": 1 + "default": 100 }, "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.", + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": false + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 }, "in": "query" } ] } }, - "\/avatars\/screenshots": { + "\/avatars\/credit-cards\/{code}": { "get": { - "summary": "Get webpage screenshot", - "operationId": "avatarsGetScreenshot", + "summary": "Get credit card icon", + "operationId": "avatarsGetCreditCard", "tags": [ "avatars" ], - "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "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", @@ -6155,12 +6393,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getScreenshot", + "method": "getCreditCard", "group": null, "cookies": false, "type": "location", - "demo": "avatars\/get-screenshot.md", - "rate-limit": 60, + "demo": "avatars\/get-credit-card.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "avatars.read", @@ -6171,7 +6409,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "auth": { "Project": [], "Session": [], @@ -6189,153 +6427,1591 @@ ], "parameters": [ { - "name": "url", - "description": "Website URL which you want to capture.", + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", - "required": false, - "schema": { - "type": "object", - "default": [], - "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}" + "x-example": "amex", + "enum": [ + "amex", + "argencard", + "cabal", + "cencosud", + "diners", + "discover", + "elo", + "hipercard", + "jcb", + "mastercard", + "naranja", + "targeta-shopping", + "unionpay", + "visa", + "mir", + "maestro", + "rupay" + ], + "x-enum-name": "CreditCard", + "x-enum-keys": [ + "American Express", + "Argencard", + "Cabal", + "Cencosud", + "Diners Club", + "Discover", + "Elo", + "Hipercard", + "JCB", + "Mastercard", + "Naranja", + "Tarjeta Shopping", + "Union Pay", + "Visa", + "MIR", + "Maestro", + "Rupay" + ] }, - "in": "query" + "in": "path" }, { - "name": "viewportWidth", - "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": "1920", - "default": 1280 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "viewportHeight", - "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { "type": "integer", "format": "int32", - "x-example": "1080", - "default": 720 + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "scale", - "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", "required": false, "schema": { - "type": "number", - "format": "float", - "x-example": "2", - "default": 1 + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 }, "in": "query" - }, + } + ] + } + }, + "\/avatars\/favicon": { + "get": { + "summary": "Get favicon", + "operationId": "avatarsGetFavicon", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFavicon", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ { - "name": "theme", - "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", - "required": false, - "schema": { - "type": "string", - "x-example": "dark", - "enum": [ - "light", - "dark" - ], - "x-enum-name": "BrowserTheme", - "x-enum-keys": [ - "light", - "dark" - ], - "default": "light" - }, - "in": "query" - }, + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ { - "name": "userAgent", - "description": "Custom user agent string. Defaults to browser default.", - "required": false, + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, "schema": { "type": "string", - "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", - "default": "" - }, - "in": "query" - }, - { - "name": "fullpage", - "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", - "required": false, - "schema": { - "type": "boolean", - "x-example": "true", - "default": false + "format": "url", + "x-example": "https:\/\/example.com" }, "in": "query" - }, - { - "name": "locale", - "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", - "required": false, - "schema": { - "type": "string", - "x-example": "en-US", - "default": "" + } + ] + } + }, + "\/avatars\/flags\/{code}": { + "get": { + "summary": "Get country flag", + "operationId": "avatarsGetFlag", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) standard.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getFlag", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "schema": { + "type": "string", + "x-example": "af", + "enum": [ + "af", + "ao", + "al", + "ad", + "ae", + "ar", + "am", + "ag", + "au", + "at", + "az", + "bi", + "be", + "bj", + "bf", + "bd", + "bg", + "bh", + "bs", + "ba", + "by", + "bz", + "bo", + "br", + "bb", + "bn", + "bt", + "bw", + "cf", + "ca", + "ch", + "cl", + "cn", + "ci", + "cm", + "cd", + "cg", + "co", + "km", + "cv", + "cr", + "cu", + "cy", + "cz", + "de", + "dj", + "dm", + "dk", + "do", + "dz", + "ec", + "eg", + "er", + "es", + "ee", + "et", + "fi", + "fj", + "fr", + "fm", + "ga", + "gb", + "ge", + "gh", + "gn", + "gm", + "gw", + "gq", + "gr", + "gd", + "gt", + "gy", + "hn", + "hr", + "ht", + "hu", + "id", + "in", + "ie", + "ir", + "iq", + "is", + "il", + "it", + "jm", + "jo", + "jp", + "kz", + "ke", + "kg", + "kh", + "ki", + "kn", + "kr", + "kw", + "la", + "lb", + "lr", + "ly", + "lc", + "li", + "lk", + "ls", + "lt", + "lu", + "lv", + "ma", + "mc", + "md", + "mg", + "mv", + "mx", + "mh", + "mk", + "ml", + "mt", + "mm", + "me", + "mn", + "mz", + "mr", + "mu", + "mw", + "my", + "na", + "ne", + "ng", + "ni", + "nl", + "no", + "np", + "nr", + "nz", + "om", + "pk", + "pa", + "pe", + "ph", + "pw", + "pg", + "pl", + "pf", + "kp", + "pt", + "py", + "qa", + "ro", + "ru", + "rw", + "sa", + "sd", + "sn", + "sg", + "sb", + "sl", + "sv", + "sm", + "so", + "rs", + "ss", + "st", + "sr", + "sk", + "si", + "se", + "sz", + "sc", + "sy", + "td", + "tg", + "th", + "tj", + "tm", + "tl", + "to", + "tt", + "tn", + "tr", + "tv", + "tz", + "ug", + "ua", + "uy", + "us", + "uz", + "va", + "vc", + "ve", + "vn", + "vu", + "ws", + "ye", + "za", + "zm", + "zw" + ], + "x-enum-name": "Flag", + "x-enum-keys": [ + "Afghanistan", + "Angola", + "Albania", + "Andorra", + "United Arab Emirates", + "Argentina", + "Armenia", + "Antigua and Barbuda", + "Australia", + "Austria", + "Azerbaijan", + "Burundi", + "Belgium", + "Benin", + "Burkina Faso", + "Bangladesh", + "Bulgaria", + "Bahrain", + "Bahamas", + "Bosnia and Herzegovina", + "Belarus", + "Belize", + "Bolivia", + "Brazil", + "Barbados", + "Brunei Darussalam", + "Bhutan", + "Botswana", + "Central African Republic", + "Canada", + "Switzerland", + "Chile", + "China", + "C\u00f4te d'Ivoire", + "Cameroon", + "Democratic Republic of the Congo", + "Republic of the Congo", + "Colombia", + "Comoros", + "Cape Verde", + "Costa Rica", + "Cuba", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Dominica", + "Denmark", + "Dominican Republic", + "Algeria", + "Ecuador", + "Egypt", + "Eritrea", + "Spain", + "Estonia", + "Ethiopia", + "Finland", + "Fiji", + "France", + "Micronesia (Federated States of)", + "Gabon", + "United Kingdom", + "Georgia", + "Ghana", + "Guinea", + "Gambia", + "Guinea-Bissau", + "Equatorial Guinea", + "Greece", + "Grenada", + "Guatemala", + "Guyana", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "India", + "Ireland", + "Iran (Islamic Republic of)", + "Iraq", + "Iceland", + "Israel", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kazakhstan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Saint Kitts and Nevis", + "South Korea", + "Kuwait", + "Lao People's Democratic Republic", + "Lebanon", + "Liberia", + "Libya", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Morocco", + "Monaco", + "Moldova", + "Madagascar", + "Maldives", + "Mexico", + "Marshall Islands", + "North Macedonia", + "Mali", + "Malta", + "Myanmar", + "Montenegro", + "Mongolia", + "Mozambique", + "Mauritania", + "Mauritius", + "Malawi", + "Malaysia", + "Namibia", + "Niger", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "New Zealand", + "Oman", + "Pakistan", + "Panama", + "Peru", + "Philippines", + "Palau", + "Papua New Guinea", + "Poland", + "French Polynesia", + "North Korea", + "Portugal", + "Paraguay", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saudi Arabia", + "Sudan", + "Senegal", + "Singapore", + "Solomon Islands", + "Sierra Leone", + "El Salvador", + "San Marino", + "Somalia", + "Serbia", + "South Sudan", + "Sao Tome and Principe", + "Suriname", + "Slovakia", + "Slovenia", + "Sweden", + "Eswatini", + "Seychelles", + "Syria", + "Chad", + "Togo", + "Thailand", + "Tajikistan", + "Turkmenistan", + "Timor-Leste", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Tuvalu", + "Tanzania", + "Uganda", + "Ukraine", + "Uruguay", + "United States", + "Uzbekistan", + "Vatican City", + "Saint Vincent and the Grenadines", + "Venezuela", + "Vietnam", + "Vanuatu", + "Samoa", + "Yemen", + "South Africa", + "Zambia", + "Zimbabwe" + ] + }, + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100 }, "in": "query" }, { - "name": "timezone", - "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", "required": false, "schema": { - "type": "string", - "x-example": "America\/New_York", - "enum": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", + "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 keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "in": "query" + } + ] + } + }, + "\/avatars\/image": { + "get": { + "summary": "Get image from URL", + "operationId": "avatarsGetImage", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n\nThis endpoint does not follow HTTP redirects.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getImage", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "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", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInitials", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "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", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getQR", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "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" + } + ] + } + }, + "\/avatars\/screenshots": { + "get": { + "summary": "Get webpage screenshot", + "operationId": "avatarsGetScreenshot", + "tags": [ + "avatars" + ], + "description": "Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n\nYou can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n\nWhen width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getScreenshot", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-screenshot.md", + "rate-limit": 60, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-screenshot.md", + "auth": { + "Project": [], + "Session": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to capture.", + "required": true, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com" + }, + "in": "query" + }, + { + "name": "headers", + "description": "HTTP headers to send with the browser request. Defaults to empty.", + "required": false, + "schema": { + "type": "object", + "default": [], + "x-example": "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}" + }, + "in": "query" + }, + { + "name": "viewportWidth", + "description": "Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1920", + "default": 1280 + }, + "in": "query" + }, + { + "name": "viewportHeight", + "description": "Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "1080", + "default": 720 + }, + "in": "query" + }, + { + "name": "scale", + "description": "Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "2", + "default": 1 + }, + "in": "query" + }, + { + "name": "theme", + "description": "Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".", + "required": false, + "schema": { + "type": "string", + "x-example": "dark", + "enum": [ + "light", + "dark" + ], + "x-enum-name": "BrowserTheme", + "x-enum-keys": [ + "light", + "dark" + ], + "default": "light" + }, + "in": "query" + }, + { + "name": "userAgent", + "description": "Custom user agent string. Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "Mozilla\/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit\/605.1.15", + "default": "" + }, + "in": "query" + }, + { + "name": "fullpage", + "description": "Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "locale", + "description": "Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "en-US", + "default": "" + }, + "in": "query" + }, + { + "name": "timezone", + "description": "IANA timezone identifier (e.g., \"America\/New_York\", \"Europe\/London\"). Defaults to browser default.", + "required": false, + "schema": { + "type": "string", + "x-example": "America\/New_York", + "enum": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", + "africa\/kinshasa", + "africa\/lagos", + "africa\/libreville", + "africa\/lome", + "africa\/luanda", + "africa\/lubumbashi", + "africa\/lusaka", + "africa\/malabo", + "africa\/maputo", + "africa\/maseru", + "africa\/mbabane", + "africa\/mogadishu", + "africa\/monrovia", + "africa\/nairobi", + "africa\/ndjamena", + "africa\/niamey", + "africa\/nouakchott", + "africa\/ouagadougou", + "africa\/porto-novo", + "africa\/sao_tome", + "africa\/tripoli", + "africa\/tunis", + "africa\/windhoek", + "america\/adak", + "america\/anchorage", + "america\/anguilla", + "america\/antigua", + "america\/araguaina", + "america\/argentina\/buenos_aires", + "america\/argentina\/catamarca", + "america\/argentina\/cordoba", + "america\/argentina\/jujuy", + "america\/argentina\/la_rioja", + "america\/argentina\/mendoza", + "america\/argentina\/rio_gallegos", + "america\/argentina\/salta", + "america\/argentina\/san_juan", + "america\/argentina\/san_luis", + "america\/argentina\/tucuman", + "america\/argentina\/ushuaia", + "america\/aruba", + "america\/asuncion", + "america\/atikokan", + "america\/bahia", + "america\/bahia_banderas", + "america\/barbados", + "america\/belem", + "america\/belize", + "america\/blanc-sablon", + "america\/boa_vista", + "america\/bogota", + "america\/boise", + "america\/cambridge_bay", + "america\/campo_grande", + "america\/cancun", + "america\/caracas", + "america\/cayenne", + "america\/cayman", + "america\/chicago", + "america\/chihuahua", + "america\/ciudad_juarez", + "america\/costa_rica", + "america\/coyhaique", + "america\/creston", + "america\/cuiaba", + "america\/curacao", + "america\/danmarkshavn", + "america\/dawson", + "america\/dawson_creek", + "america\/denver", + "america\/detroit", + "america\/dominica", + "america\/edmonton", + "america\/eirunepe", + "america\/el_salvador", + "america\/fort_nelson", + "america\/fortaleza", + "america\/glace_bay", + "america\/goose_bay", + "america\/grand_turk", + "america\/grenada", + "america\/guadeloupe", + "america\/guatemala", + "america\/guayaquil", + "america\/guyana", + "america\/halifax", + "america\/havana", + "america\/hermosillo", + "america\/indiana\/indianapolis", + "america\/indiana\/knox", + "america\/indiana\/marengo", + "america\/indiana\/petersburg", + "america\/indiana\/tell_city", + "america\/indiana\/vevay", + "america\/indiana\/vincennes", + "america\/indiana\/winamac", + "america\/inuvik", + "america\/iqaluit", + "america\/jamaica", + "america\/juneau", + "america\/kentucky\/louisville", + "america\/kentucky\/monticello", + "america\/kralendijk", + "america\/la_paz", + "america\/lima", + "america\/los_angeles", + "america\/lower_princes", + "america\/maceio", + "america\/managua", + "america\/manaus", + "america\/marigot", + "america\/martinique", + "america\/matamoros", + "america\/mazatlan", + "america\/menominee", + "america\/merida", + "america\/metlakatla", + "america\/mexico_city", + "america\/miquelon", + "america\/moncton", + "america\/monterrey", + "america\/montevideo", + "america\/montserrat", + "america\/nassau", + "america\/new_york", + "america\/nome", + "america\/noronha", + "america\/north_dakota\/beulah", + "america\/north_dakota\/center", + "america\/north_dakota\/new_salem", + "america\/nuuk", + "america\/ojinaga", + "america\/panama", + "america\/paramaribo", + "america\/phoenix", + "america\/port-au-prince", + "america\/port_of_spain", + "america\/porto_velho", + "america\/puerto_rico", + "america\/punta_arenas", + "america\/rankin_inlet", + "america\/recife", + "america\/regina", + "america\/resolute", + "america\/rio_branco", + "america\/santarem", + "america\/santiago", + "america\/santo_domingo", + "america\/sao_paulo", + "america\/scoresbysund", + "america\/sitka", + "america\/st_barthelemy", + "america\/st_johns", + "america\/st_kitts", + "america\/st_lucia", + "america\/st_thomas", + "america\/st_vincent", + "america\/swift_current", + "america\/tegucigalpa", + "america\/thule", + "america\/tijuana", + "america\/toronto", + "america\/tortola", + "america\/vancouver", + "america\/whitehorse", + "america\/winnipeg", + "america\/yakutat", + "antarctica\/casey", + "antarctica\/davis", + "antarctica\/dumontdurville", + "antarctica\/macquarie", + "antarctica\/mawson", + "antarctica\/mcmurdo", + "antarctica\/palmer", + "antarctica\/rothera", + "antarctica\/syowa", + "antarctica\/troll", + "antarctica\/vostok", + "arctic\/longyearbyen", + "asia\/aden", + "asia\/almaty", + "asia\/amman", + "asia\/anadyr", + "asia\/aqtau", + "asia\/aqtobe", + "asia\/ashgabat", + "asia\/atyrau", + "asia\/baghdad", + "asia\/bahrain", + "asia\/baku", + "asia\/bangkok", + "asia\/barnaul", + "asia\/beirut", + "asia\/bishkek", + "asia\/brunei", + "asia\/chita", + "asia\/colombo", + "asia\/damascus", + "asia\/dhaka", + "asia\/dili", + "asia\/dubai", + "asia\/dushanbe", + "asia\/famagusta", + "asia\/gaza", + "asia\/hebron", + "asia\/ho_chi_minh", + "asia\/hong_kong", + "asia\/hovd", + "asia\/irkutsk", + "asia\/jakarta", + "asia\/jayapura", + "asia\/jerusalem", + "asia\/kabul", + "asia\/kamchatka", + "asia\/karachi", + "asia\/kathmandu", + "asia\/khandyga", + "asia\/kolkata", + "asia\/krasnoyarsk", + "asia\/kuala_lumpur", + "asia\/kuching", + "asia\/kuwait", + "asia\/macau", + "asia\/magadan", + "asia\/makassar", + "asia\/manila", + "asia\/muscat", + "asia\/nicosia", + "asia\/novokuznetsk", + "asia\/novosibirsk", + "asia\/omsk", + "asia\/oral", + "asia\/phnom_penh", + "asia\/pontianak", + "asia\/pyongyang", + "asia\/qatar", + "asia\/qostanay", + "asia\/qyzylorda", + "asia\/riyadh", + "asia\/sakhalin", + "asia\/samarkand", + "asia\/seoul", + "asia\/shanghai", + "asia\/singapore", + "asia\/srednekolymsk", + "asia\/taipei", + "asia\/tashkent", + "asia\/tbilisi", + "asia\/tehran", + "asia\/thimphu", + "asia\/tokyo", + "asia\/tomsk", + "asia\/ulaanbaatar", + "asia\/urumqi", + "asia\/ust-nera", + "asia\/vientiane", + "asia\/vladivostok", + "asia\/yakutsk", + "asia\/yangon", + "asia\/yekaterinburg", + "asia\/yerevan", + "atlantic\/azores", + "atlantic\/bermuda", + "atlantic\/canary", + "atlantic\/cape_verde", + "atlantic\/faroe", + "atlantic\/madeira", + "atlantic\/reykjavik", + "atlantic\/south_georgia", + "atlantic\/st_helena", + "atlantic\/stanley", + "australia\/adelaide", + "australia\/brisbane", + "australia\/broken_hill", + "australia\/darwin", + "australia\/eucla", + "australia\/hobart", + "australia\/lindeman", + "australia\/lord_howe", + "australia\/melbourne", + "australia\/perth", + "australia\/sydney", + "europe\/amsterdam", + "europe\/andorra", + "europe\/astrakhan", + "europe\/athens", + "europe\/belgrade", + "europe\/berlin", + "europe\/bratislava", + "europe\/brussels", + "europe\/bucharest", + "europe\/budapest", + "europe\/busingen", + "europe\/chisinau", + "europe\/copenhagen", + "europe\/dublin", + "europe\/gibraltar", + "europe\/guernsey", + "europe\/helsinki", + "europe\/isle_of_man", + "europe\/istanbul", + "europe\/jersey", + "europe\/kaliningrad", + "europe\/kirov", + "europe\/kyiv", + "europe\/lisbon", + "europe\/ljubljana", + "europe\/london", + "europe\/luxembourg", + "europe\/madrid", + "europe\/malta", + "europe\/mariehamn", + "europe\/minsk", + "europe\/monaco", + "europe\/moscow", + "europe\/oslo", + "europe\/paris", + "europe\/podgorica", + "europe\/prague", + "europe\/riga", + "europe\/rome", + "europe\/samara", + "europe\/san_marino", + "europe\/sarajevo", + "europe\/saratov", + "europe\/simferopol", + "europe\/skopje", + "europe\/sofia", + "europe\/stockholm", + "europe\/tallinn", + "europe\/tirane", + "europe\/ulyanovsk", + "europe\/vaduz", + "europe\/vatican", + "europe\/vienna", + "europe\/vilnius", + "europe\/volgograd", + "europe\/warsaw", + "europe\/zagreb", + "europe\/zurich", + "indian\/antananarivo", + "indian\/chagos", + "indian\/christmas", + "indian\/cocos", + "indian\/comoro", + "indian\/kerguelen", + "indian\/mahe", + "indian\/maldives", + "indian\/mauritius", + "indian\/mayotte", + "indian\/reunion", + "pacific\/apia", + "pacific\/auckland", + "pacific\/bougainville", + "pacific\/chatham", + "pacific\/chuuk", + "pacific\/easter", + "pacific\/efate", + "pacific\/fakaofo", + "pacific\/fiji", + "pacific\/funafuti", + "pacific\/galapagos", + "pacific\/gambier", + "pacific\/guadalcanal", + "pacific\/guam", + "pacific\/honolulu", + "pacific\/kanton", + "pacific\/kiritimati", + "pacific\/kosrae", + "pacific\/kwajalein", + "pacific\/majuro", + "pacific\/marquesas", + "pacific\/midway", + "pacific\/nauru", + "pacific\/niue", + "pacific\/norfolk", + "pacific\/noumea", + "pacific\/pago_pago", + "pacific\/palau", + "pacific\/pitcairn", + "pacific\/pohnpei", + "pacific\/port_moresby", + "pacific\/rarotonga", + "pacific\/saipan", + "pacific\/tahiti", + "pacific\/tarawa", + "pacific\/tongatapu", + "pacific\/wake", + "pacific\/wallis", + "utc" + ], + "x-enum-name": "Timezone", + "x-enum-keys": [ + "africa\/abidjan", + "africa\/accra", + "africa\/addis_ababa", + "africa\/algiers", + "africa\/asmara", + "africa\/bamako", + "africa\/bangui", + "africa\/banjul", + "africa\/bissau", + "africa\/blantyre", + "africa\/brazzaville", + "africa\/bujumbura", + "africa\/cairo", + "africa\/casablanca", + "africa\/ceuta", + "africa\/conakry", + "africa\/dakar", + "africa\/dar_es_salaam", + "africa\/djibouti", + "africa\/douala", + "africa\/el_aaiun", + "africa\/freetown", + "africa\/gaborone", + "africa\/harare", + "africa\/johannesburg", + "africa\/juba", + "africa\/kampala", + "africa\/khartoum", + "africa\/kigali", "africa\/kinshasa", "africa\/lagos", "africa\/libreville", @@ -6726,633 +8402,10360 @@ "pacific\/wake", "pacific\/wallis", "utc" + ] + }, + "in": "query" + }, + { + "name": "latitude", + "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "37.7749", + "default": 0 + }, + "in": "query" + }, + { + "name": "longitude", + "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "-122.4194", + "default": 0 + }, + "in": "query" + }, + { + "name": "accuracy", + "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", + "required": false, + "schema": { + "type": "number", + "format": "float", + "x-example": "100", + "default": 0 + }, + "in": "query" + }, + { + "name": "touch", + "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", + "required": false, + "schema": { + "type": "boolean", + "x-example": "true", + "default": false + }, + "in": "query" + }, + { + "name": "permissions", + "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ], + "x-enum-name": "BrowserPermission", + "x-enum-keys": [ + "geolocation", + "camera", + "microphone", + "notifications", + "midi", + "push", + "clipboard-read", + "clipboard-write", + "payment-handler", + "usb", + "bluetooth", + "accelerometer", + "gyroscope", + "magnetometer", + "ambient-light-sensor", + "background-sync", + "persistent-storage", + "screen-wake-lock", + "web-share", + "xr-spatial-tracking" + ] + }, + "x-example": "[\"geolocation\",\"notifications\"]", + "default": [] + }, + "in": "query" + }, + { + "name": "sleep", + "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "3", + "default": 0 + }, + "in": "query" + }, + { + "name": "width", + "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "800", + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "600", + "default": 0 + }, + "in": "query" + }, + { + "name": "quality", + "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": "85", + "default": -1 + }, + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "schema": { + "type": "string", + "x-example": "jpeg", + "enum": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ] + }, + "in": "query" + } + ] + } + }, + "\/backups\/archives": { + "get": { + "summary": "List archives", + "operationId": "backupsListArchives", + "tags": [ + "backups" + ], + "description": "List all archives for a project.", + "responses": { + "200": { + "description": "Backup archive list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchiveList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listArchives", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/list-archives.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-archives.md", + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create archive", + "operationId": "backupsCreateArchive", + "tags": [ + "backups" + ], + "description": "Create a new archive asynchronously for a project.", + "responses": { + "201": { + "description": "Archive", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchive" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArchive", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/create-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-archive.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "services": { + "type": "array", + "description": "Array of services to backup", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ], + "x-enum-name": "BackupServices", + "x-enum-keys": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ] + } + }, + "resourceId": { + "type": "string", + "description": "Resource ID. When set, only this single resource will be backed up.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + } + }, + "required": [ + "services" + ] + } + } + } + } + } + }, + "\/backups\/archives\/{archiveId}": { + "get": { + "summary": "Get backup archive", + "operationId": "backupsGetArchive", + "tags": [ + "backups" + ], + "description": "Get a backup archive using it's ID.", + "responses": { + "200": { + "description": "Archive", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupArchive" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getArchive", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/get-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-archive.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "archiveId", + "description": "Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ARCHIVE_ID>" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete archive", + "operationId": "backupsDeleteArchive", + "tags": [ + "backups" + ], + "description": "Delete an existing archive for a project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteArchive", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/delete-archive.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "archives.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/delete-archive.md", + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "archiveId", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<ARCHIVE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "backupsListPolicies", + "tags": [ + "backups" + ], + "description": "List all policies for a project.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listPolicies", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/list-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "backups.policies.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-policies.md", + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "backupsCreatePolicy", + "tags": [ + "backups" + ], + "description": "Create a new backup policy.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createPolicy", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/create-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-policy.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + }, + "services": { + "type": "array", + "description": "Array of services to backup", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ], + "x-enum-name": "BackupServices", + "x-enum-keys": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ] + } + }, + "resourceId": { + "type": "string", + "description": "Resource ID. When set, only this single resource will be backed up.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When set to 'disabled', no backups will be taken", + "default": true, + "x-example": false + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion", + "x-example": 1, + "format": "int32" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + } + }, + "required": [ + "policyId", + "services", + "retention", + "schedule" + ] + } + } + } + } + } + }, + "\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "backupsGetPolicy", + "tags": [ + "backups" + ], + "description": "Get a backup policy using it's ID.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPolicy", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/get-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.read", + "backups.policies.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-policy.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "backupsUpdatePolicy", + "tags": [ + "backups" + ], + "description": "Update an existing policy using it's ID.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePolicy", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/update-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/update-policy.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", + "x-nullable": true + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "schedule": { + "type": "string", + "description": "Cron expression", + "x-example": null + }, + "enabled": { + "type": "boolean", + "description": "Is Backup enabled? When set to 'disabled', No backup will be taken", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "backupsDeletePolicy", + "tags": [ + "backups" + ], + "description": "Delete a policy using it's ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePolicy", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/delete-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "policies.write", + "backups.policies.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/delete-policy.md", + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "policyId", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/backups\/restoration": { + "post": { + "summary": "Create restoration", + "operationId": "backupsCreateRestoration", + "tags": [ + "backups" + ], + "description": "Create and trigger a new restoration for a backup on a project.\n\nFor a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.\n\nThe restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.\n\nTo list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.\n\nWhen restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.\n", + "responses": { + "201": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRestoration", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/create-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-restoration.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "archiveId": { + "type": "string", + "description": "Backup archive ID to restore", + "x-example": "<ARCHIVE_ID>" + }, + "services": { + "type": "array", + "description": "Array of services to restore", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ], + "x-enum-name": "BackupServices", + "x-enum-keys": [ + "databases", + "tablesdb", + "documentsdb", + "vectorsdb", + "dedicatedDatabases", + "functions", + "storage" + ] + } + }, + "newResourceId": { + "type": "string", + "description": "Destination resource ID. Omit to restore the archived resource in place, or pass a different ID to restore alongside it as a new resource. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<NEW_RESOURCE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "newResourceName": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "default": "", + "x-example": "<NEW_RESOURCE_NAME>" + } + }, + "required": [ + "archiveId", + "services" + ] + } + } + } + } + } + }, + "\/backups\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "backupsListRestorations", + "tags": [ + "backups" + ], + "description": "List all backup restorations for a project.", + "responses": { + "200": { + "description": "Backup restoration list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestorationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRestorations", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/list-restorations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-restorations.md", + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/backups\/restorations\/{restorationId}": { + "get": { + "summary": "Get backup restoration", + "operationId": "backupsGetRestoration", + "tags": [ + "backups" + ], + "description": "Get the current status of a backup restoration.", + "responses": { + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupRestoration" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getRestoration", + "group": null, + "cookies": false, + "type": "", + "demo": "backups\/get-restoration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "restorations.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-restoration.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "restorationId", + "description": "Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RESTORATION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "list", + "group": "databases", + "cookies": false, + "type": "", + "demo": "databases\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + }, + "methods": [ + { + "name": "list", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "queries", + "search", + "total" + ], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "demo": "databases\/list.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.list" + } + } + ], + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "create", + "group": "databases", + "cookies": false, + "type": "", + "demo": "databases\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + }, + "methods": [ + { + "name": "create", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n", + "demo": "databases\/create.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.create" + } + } + ], + "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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "databasesListTransactions", + "tags": [ + "databases" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTransactions" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "databasesCreateTransaction", + "tags": [ + "databases" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTransaction" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/databases\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "databasesGetTransaction", + "tags": [ + "databases" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "rows.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTransaction" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "databasesUpdateTransaction", + "tags": [ + "databases" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTransaction" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "databasesDeleteTransaction", + "tags": [ + "databases" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTransaction" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "databasesCreateOperations", + "tags": [ + "databases" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "databases\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createOperations" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "get", + "group": "databases", + "cookies": false, + "type": "", + "demo": "databases\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + }, + "methods": [ + { + "name": "get", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "demo": "databases\/get.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.get" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "databasesUpdate", + "tags": [ + "databases" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "update", + "group": "databases", + "cookies": false, + "type": "", + "demo": "databases\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + }, + "methods": [ + { + "name": "update", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID.", + "demo": "databases\/update.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.update" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.", + "default": true, + "x-example": false + } + } + } + } + } + } + }, + "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" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "delete", + "group": "databases", + "cookies": false, + "type": "", + "demo": "databases\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + }, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "demo": "databases\/delete.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.delete" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "databasesListCollections", + "tags": [ + "databases" + ], + "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Collections List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collectionList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "cookies": false, + "type": "", + "demo": "databases\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listTables" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create collections", + "operationId": "databasesCreateCollection", + "tags": [ + "databases" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "databases\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<COLLECTION_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "databases\/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update collection", + "operationId": "databasesUpdateCollection", + "tags": [ + "databases" + ], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "databases\/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "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" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "databases\/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteTable" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "get": { + "summary": "List attributes", + "operationId": "databasesListAttributes", + "tags": [ + "databases" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Attributes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listAttributes", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listColumns" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint": { + "post": { + "summary": "Create bigint attribute", + "operationId": "databasesCreateBigIntAttribute", + "tags": [ + "databases" + ], + "description": "Create a bigint attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "AttributeBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBigint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBigIntAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-big-int-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-bigint-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBigIntColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint\/{key}": { + "patch": { + "summary": "Update bigint attribute", + "operationId": "databasesUpdateBigIntAttribute", + "tags": [ + "databases" + ], + "description": "Update a bigint attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBigint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBigIntAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-big-int-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-bigint-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBigIntColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createBooleanAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeBoolean" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateBooleanAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateBooleanColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { + "post": { + "summary": "Create datetime attribute", + "operationId": "databasesCreateDatetimeAttribute", + "tags": [ + "databases" + ], + "description": "Create a date time attribute according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDatetimeAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeDatetime" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDatetimeAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-datetime-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateDatetimeColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEmailAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "format": "email", + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEmail" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEmailAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEmailColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { + "post": { + "summary": "Create enum attribute", + "operationId": "databasesCreateEnumAttribute", + "tags": [ + "databases" + ], + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "responses": { + "202": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createEnumAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "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 + }, + "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", + "tags": [ + "databases" + ], + "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeEnum" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateEnumAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-enum-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateEnumColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createFloatAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeFloat" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateFloatAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateFloatColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIntegerAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeInteger" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIntegerAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIntegerColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when attribute is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIpAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeIp" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateIpAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateIpColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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. Cannot be set when attribute is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { + "post": { + "summary": "Create line attribute", + "operationId": "databasesCreateLineAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric line attribute.", + "responses": { + "202": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLineAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { + "patch": { + "summary": "Update line attribute", + "operationId": "databasesUpdateLineAttribute", + "tags": [ + "databases" + ], + "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributeLine", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLine" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLineAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-line-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLineColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "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": "array", + "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + "post": { + "summary": "Create longtext attribute", + "operationId": "databasesCreateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a longtext attribute.\n", + "responses": { + "202": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createLongtextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createLongtextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "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", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { + "patch": { + "summary": "Update longtext attribute", + "operationId": "databasesUpdateLongtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeLongtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateLongtextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-longtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateLongtextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { + "post": { + "summary": "Create mediumtext attribute", + "operationId": "databasesCreateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Create a mediumtext attribute.\n", + "responses": { + "202": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createMediumtextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createMediumtextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "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", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { + "patch": { + "summary": "Update mediumtext attribute", + "operationId": "databasesUpdateMediumtextAttribute", + "tags": [ + "databases" + ], + "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeMediumtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeMediumtext" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMediumtextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-mediumtext-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateMediumtextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + "post": { + "summary": "Create point attribute", + "operationId": "databasesCreatePointAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric point attribute.", + "responses": { + "202": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPointAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "type": "number", + "format": "double" + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { + "patch": { + "summary": "Update point attribute", + "operationId": "databasesUpdatePointAttribute", + "tags": [ + "databases" + ], + "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePoint", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePoint" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePointAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-point-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePointColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "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": "array", + "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", + "x-example": "[1, 2]", + "items": { + "type": "number", + "format": "double" + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { + "post": { + "summary": "Create polygon attribute", + "operationId": "databasesCreatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Create a geometric polygon attribute.", + "responses": { + "202": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createPolygonAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createPolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { + "patch": { + "summary": "Update polygon attribute", + "operationId": "databasesUpdatePolygonAttribute", + "tags": [ + "databases" + ], + "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "responses": { + "200": { + "description": "AttributePolygon", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributePolygon" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updatePolygonAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-polygon-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updatePolygonColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "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": "array", + "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New attribute key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "post": { + "summary": "Create relationship attribute", + "operationId": "databasesCreateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "202": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createRelationshipAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedCollectionId": { + "type": "string", + "description": "Related Collection ID.", + "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": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Attribute Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [ + "cascade", + "restrict", + "setNull" + ] + } + }, + "required": [ + "relatedCollectionId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { + "patch": { + "summary": "Update relationship attribute", + "operationId": "databasesUpdateRelationshipAttribute", + "tags": [ + "databases" + ], + "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "responses": { + "200": { + "description": "AttributeRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeRelationship" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateRelationshipAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-relationship-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRelationshipColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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": [ + "cascade", + "restrict", + "setNull" + ] + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table 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, + "format": "int32" + }, + "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 + }, + "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", + "tags": [ + "databases" + ], + "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateStringAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateStringColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { + "post": { + "summary": "Create text attribute", + "operationId": "databasesCreateTextAttribute", + "tags": [ + "databases" + ], + "description": "Create a text attribute.\n", + "responses": { + "202": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createTextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "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", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { + "patch": { + "summary": "Update text attribute", + "operationId": "databasesUpdateTextAttribute", + "tags": [ + "databases" + ], + "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeText", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeText" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateTextAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-text-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createUrlAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "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", + "format": "url", + "x-nullable": true + }, + "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", + "tags": [ + "databases" + ], + "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeUrl" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateUrlAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateUrlColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "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", + "format": "url", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "post": { + "summary": "Create varchar attribute", + "operationId": "databasesCreateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Create a varchar attribute.\n", + "responses": { + "202": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createVarcharAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/create-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createVarcharColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, + "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 + }, + "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\/varchar\/{key}": { + "patch": { + "summary": "Update varchar attribute", + "operationId": "databasesUpdateVarcharAttribute", + "tags": [ + "databases" + ], + "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "responses": { + "200": { + "description": "AttributeVarchar", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/attributeVarchar" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateVarcharAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/update-varchar-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateVarcharColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the varchar attribute.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Attribute Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { + "get": { + "summary": "Get attribute", + "operationId": "databasesGetAttribute", + "tags": [ + "databases" + ], + "description": "Get attribute by ID.", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeInteger" + }, + { + "$ref": "#\/components\/schemas\/attributeFloat" + }, + { + "$ref": "#\/components\/schemas\/attributeEmail" + }, + { + "$ref": "#\/components\/schemas\/attributeEnum" + }, + { + "$ref": "#\/components\/schemas\/attributeUrl" + }, + { + "$ref": "#\/components\/schemas\/attributeIp" + }, + { + "$ref": "#\/components\/schemas\/attributeDatetime" + }, + { + "$ref": "#\/components\/schemas\/attributeRelationship" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete attribute", + "operationId": "databasesDeleteAttribute", + "tags": [ + "databases" + ], + "description": "Deletes an attribute.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteAttribute", + "group": "attributes", + "cookies": false, + "type": "", + "demo": "databases\/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "databasesListDocuments", + "tags": [ + "databases" + ], + "description": "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listDocuments", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listRows" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create document", + "operationId": "databasesCreateDocument", + "tags": [ + "databases" + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + }, + "methods": [ + { + "name": "createDocument", + "namespace": "databases", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRow" + } + }, + { + "name": "createDocuments", + "namespace": "databases", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/create-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createRows" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<DOCUMENT_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } + }, + "put": { + "summary": "Upsert documents", + "operationId": "databasesUpsertDocuments", + "tags": [ + "databases" + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocuments", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + }, + "methods": [ + { + "name": "upsertDocuments", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" ], - "x-enum-name": "Timezone", - "x-enum-keys": [ - "africa\/abidjan", - "africa\/accra", - "africa\/addis_ababa", - "africa\/algiers", - "africa\/asmara", - "africa\/bamako", - "africa\/bangui", - "africa\/banjul", - "africa\/bissau", - "africa\/blantyre", - "africa\/brazzaville", - "africa\/bujumbura", - "africa\/cairo", - "africa\/casablanca", - "africa\/ceuta", - "africa\/conakry", - "africa\/dakar", - "africa\/dar_es_salaam", - "africa\/djibouti", - "africa\/douala", - "africa\/el_aaiun", - "africa\/freetown", - "africa\/gaborone", - "africa\/harare", - "africa\/johannesburg", - "africa\/juba", - "africa\/kampala", - "africa\/khartoum", - "africa\/kigali", - "africa\/kinshasa", - "africa\/lagos", - "africa\/libreville", - "africa\/lome", - "africa\/luanda", - "africa\/lubumbashi", - "africa\/lusaka", - "africa\/malabo", - "africa\/maputo", - "africa\/maseru", - "africa\/mbabane", - "africa\/mogadishu", - "africa\/monrovia", - "africa\/nairobi", - "africa\/ndjamena", - "africa\/niamey", - "africa\/nouakchott", - "africa\/ouagadougou", - "africa\/porto-novo", - "africa\/sao_tome", - "africa\/tripoli", - "africa\/tunis", - "africa\/windhoek", - "america\/adak", - "america\/anchorage", - "america\/anguilla", - "america\/antigua", - "america\/araguaina", - "america\/argentina\/buenos_aires", - "america\/argentina\/catamarca", - "america\/argentina\/cordoba", - "america\/argentina\/jujuy", - "america\/argentina\/la_rioja", - "america\/argentina\/mendoza", - "america\/argentina\/rio_gallegos", - "america\/argentina\/salta", - "america\/argentina\/san_juan", - "america\/argentina\/san_luis", - "america\/argentina\/tucuman", - "america\/argentina\/ushuaia", - "america\/aruba", - "america\/asuncion", - "america\/atikokan", - "america\/bahia", - "america\/bahia_banderas", - "america\/barbados", - "america\/belem", - "america\/belize", - "america\/blanc-sablon", - "america\/boa_vista", - "america\/bogota", - "america\/boise", - "america\/cambridge_bay", - "america\/campo_grande", - "america\/cancun", - "america\/caracas", - "america\/cayenne", - "america\/cayman", - "america\/chicago", - "america\/chihuahua", - "america\/ciudad_juarez", - "america\/costa_rica", - "america\/coyhaique", - "america\/creston", - "america\/cuiaba", - "america\/curacao", - "america\/danmarkshavn", - "america\/dawson", - "america\/dawson_creek", - "america\/denver", - "america\/detroit", - "america\/dominica", - "america\/edmonton", - "america\/eirunepe", - "america\/el_salvador", - "america\/fort_nelson", - "america\/fortaleza", - "america\/glace_bay", - "america\/goose_bay", - "america\/grand_turk", - "america\/grenada", - "america\/guadeloupe", - "america\/guatemala", - "america\/guayaquil", - "america\/guyana", - "america\/halifax", - "america\/havana", - "america\/hermosillo", - "america\/indiana\/indianapolis", - "america\/indiana\/knox", - "america\/indiana\/marengo", - "america\/indiana\/petersburg", - "america\/indiana\/tell_city", - "america\/indiana\/vevay", - "america\/indiana\/vincennes", - "america\/indiana\/winamac", - "america\/inuvik", - "america\/iqaluit", - "america\/jamaica", - "america\/juneau", - "america\/kentucky\/louisville", - "america\/kentucky\/monticello", - "america\/kralendijk", - "america\/la_paz", - "america\/lima", - "america\/los_angeles", - "america\/lower_princes", - "america\/maceio", - "america\/managua", - "america\/manaus", - "america\/marigot", - "america\/martinique", - "america\/matamoros", - "america\/mazatlan", - "america\/menominee", - "america\/merida", - "america\/metlakatla", - "america\/mexico_city", - "america\/miquelon", - "america\/moncton", - "america\/monterrey", - "america\/montevideo", - "america\/montserrat", - "america\/nassau", - "america\/new_york", - "america\/nome", - "america\/noronha", - "america\/north_dakota\/beulah", - "america\/north_dakota\/center", - "america\/north_dakota\/new_salem", - "america\/nuuk", - "america\/ojinaga", - "america\/panama", - "america\/paramaribo", - "america\/phoenix", - "america\/port-au-prince", - "america\/port_of_spain", - "america\/porto_velho", - "america\/puerto_rico", - "america\/punta_arenas", - "america\/rankin_inlet", - "america\/recife", - "america\/regina", - "america\/resolute", - "america\/rio_branco", - "america\/santarem", - "america\/santiago", - "america\/santo_domingo", - "america\/sao_paulo", - "america\/scoresbysund", - "america\/sitka", - "america\/st_barthelemy", - "america\/st_johns", - "america\/st_kitts", - "america\/st_lucia", - "america\/st_thomas", - "america\/st_vincent", - "america\/swift_current", - "america\/tegucigalpa", - "america\/thule", - "america\/tijuana", - "america\/toronto", - "america\/tortola", - "america\/vancouver", - "america\/whitehorse", - "america\/winnipeg", - "america\/yakutat", - "antarctica\/casey", - "antarctica\/davis", - "antarctica\/dumontdurville", - "antarctica\/macquarie", - "antarctica\/mawson", - "antarctica\/mcmurdo", - "antarctica\/palmer", - "antarctica\/rothera", - "antarctica\/syowa", - "antarctica\/troll", - "antarctica\/vostok", - "arctic\/longyearbyen", - "asia\/aden", - "asia\/almaty", - "asia\/amman", - "asia\/anadyr", - "asia\/aqtau", - "asia\/aqtobe", - "asia\/ashgabat", - "asia\/atyrau", - "asia\/baghdad", - "asia\/bahrain", - "asia\/baku", - "asia\/bangkok", - "asia\/barnaul", - "asia\/beirut", - "asia\/bishkek", - "asia\/brunei", - "asia\/chita", - "asia\/colombo", - "asia\/damascus", - "asia\/dhaka", - "asia\/dili", - "asia\/dubai", - "asia\/dushanbe", - "asia\/famagusta", - "asia\/gaza", - "asia\/hebron", - "asia\/ho_chi_minh", - "asia\/hong_kong", - "asia\/hovd", - "asia\/irkutsk", - "asia\/jakarta", - "asia\/jayapura", - "asia\/jerusalem", - "asia\/kabul", - "asia\/kamchatka", - "asia\/karachi", - "asia\/kathmandu", - "asia\/khandyga", - "asia\/kolkata", - "asia\/krasnoyarsk", - "asia\/kuala_lumpur", - "asia\/kuching", - "asia\/kuwait", - "asia\/macau", - "asia\/magadan", - "asia\/makassar", - "asia\/manila", - "asia\/muscat", - "asia\/nicosia", - "asia\/novokuznetsk", - "asia\/novosibirsk", - "asia\/omsk", - "asia\/oral", - "asia\/phnom_penh", - "asia\/pontianak", - "asia\/pyongyang", - "asia\/qatar", - "asia\/qostanay", - "asia\/qyzylorda", - "asia\/riyadh", - "asia\/sakhalin", - "asia\/samarkand", - "asia\/seoul", - "asia\/shanghai", - "asia\/singapore", - "asia\/srednekolymsk", - "asia\/taipei", - "asia\/tashkent", - "asia\/tbilisi", - "asia\/tehran", - "asia\/thimphu", - "asia\/tokyo", - "asia\/tomsk", - "asia\/ulaanbaatar", - "asia\/urumqi", - "asia\/ust-nera", - "asia\/vientiane", - "asia\/vladivostok", - "asia\/yakutsk", - "asia\/yangon", - "asia\/yekaterinburg", - "asia\/yerevan", - "atlantic\/azores", - "atlantic\/bermuda", - "atlantic\/canary", - "atlantic\/cape_verde", - "atlantic\/faroe", - "atlantic\/madeira", - "atlantic\/reykjavik", - "atlantic\/south_georgia", - "atlantic\/st_helena", - "atlantic\/stanley", - "australia\/adelaide", - "australia\/brisbane", - "australia\/broken_hill", - "australia\/darwin", - "australia\/eucla", - "australia\/hobart", - "australia\/lindeman", - "australia\/lord_howe", - "australia\/melbourne", - "australia\/perth", - "australia\/sydney", - "europe\/amsterdam", - "europe\/andorra", - "europe\/astrakhan", - "europe\/athens", - "europe\/belgrade", - "europe\/berlin", - "europe\/bratislava", - "europe\/brussels", - "europe\/bucharest", - "europe\/budapest", - "europe\/busingen", - "europe\/chisinau", - "europe\/copenhagen", - "europe\/dublin", - "europe\/gibraltar", - "europe\/guernsey", - "europe\/helsinki", - "europe\/isle_of_man", - "europe\/istanbul", - "europe\/jersey", - "europe\/kaliningrad", - "europe\/kirov", - "europe\/kyiv", - "europe\/lisbon", - "europe\/ljubljana", - "europe\/london", - "europe\/luxembourg", - "europe\/madrid", - "europe\/malta", - "europe\/mariehamn", - "europe\/minsk", - "europe\/monaco", - "europe\/moscow", - "europe\/oslo", - "europe\/paris", - "europe\/podgorica", - "europe\/prague", - "europe\/riga", - "europe\/rome", - "europe\/samara", - "europe\/san_marino", - "europe\/sarajevo", - "europe\/saratov", - "europe\/simferopol", - "europe\/skopje", - "europe\/sofia", - "europe\/stockholm", - "europe\/tallinn", - "europe\/tirane", - "europe\/ulyanovsk", - "europe\/vaduz", - "europe\/vatican", - "europe\/vienna", - "europe\/vilnius", - "europe\/volgograd", - "europe\/warsaw", - "europe\/zagreb", - "europe\/zurich", - "indian\/antananarivo", - "indian\/chagos", - "indian\/christmas", - "indian\/cocos", - "indian\/comoro", - "indian\/kerguelen", - "indian\/mahe", - "indian\/maldives", - "indian\/mauritius", - "indian\/mayotte", - "indian\/reunion", - "pacific\/apia", - "pacific\/auckland", - "pacific\/bougainville", - "pacific\/chatham", - "pacific\/chuuk", - "pacific\/easter", - "pacific\/efate", - "pacific\/fakaofo", - "pacific\/fiji", - "pacific\/funafuti", - "pacific\/galapagos", - "pacific\/gambier", - "pacific\/guadalcanal", - "pacific\/guam", - "pacific\/honolulu", - "pacific\/kanton", - "pacific\/kiritimati", - "pacific\/kosrae", - "pacific\/kwajalein", - "pacific\/majuro", - "pacific\/marquesas", - "pacific\/midway", - "pacific\/nauru", - "pacific\/niue", - "pacific\/norfolk", - "pacific\/noumea", - "pacific\/pago_pago", - "pacific\/palau", - "pacific\/pitcairn", - "pacific\/pohnpei", - "pacific\/port_moresby", - "pacific\/rarotonga", - "pacific\/saipan", - "pacific\/tahiti", - "pacific\/tarawa", - "pacific\/tongatapu", - "pacific\/wake", - "pacific\/wallis", - "utc" - ] + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "demo": "databases\/upsert-documents.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRows" + } + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + }, + "required": [ + "documents" + ] + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocuments", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocuments", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRows" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + }, + "methods": [ + { + "name": "upsertDocument", + "namespace": "databases", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "demo": "databases\/upsert-document.md", + "public": true, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.upsertRow" + } + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "databasesDeleteDocument", + "tags": [ + "databases" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteDocument", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteRow" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "databasesDecrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Decrement a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "decrementDocumentAttribute", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.decrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "databasesIncrementDocumentAttribute", + "tags": [ + "databases" + ], + "description": "Increment a specific attribute of a document by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "cookies": false, + "type": "", + "demo": "databases\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.incrementRowColumn" + }, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "databasesListIndexes", + "tags": [ + "databases" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/indexList" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "cookies": false, + "type": "", + "demo": "databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.listIndexes" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "databasesCreateIndex", + "tags": [ + "databases" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "cookies": false, + "type": "", + "demo": "databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.createIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "DatabasesIndexType", + "x-enum-keys": [ + "key", + "fulltext", + "unique", + "spatial" + ] + }, + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "attributes" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "databasesGetIndex", + "tags": [ + "databases" + ], + "description": "Get an index by its unique ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/index" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "cookies": false, + "type": "", + "demo": "databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.getIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "databasesDeleteIndex", + "tags": [ + "databases" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "cookies": false, + "type": "", + "demo": "databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.deleteIndex" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb": { + "get": { + "summary": "List databases", + "operationId": "documentsDBList", + "tags": [ + "documentsDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "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 columns: name", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "documentsDBCreate", + "tags": [ + "documentsDB" + ], + "description": "Create a new Database.\n", + "responses": { + "201": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "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.", + "default": true, + "x-example": false + }, + "specification": { + "type": "string", + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/documentsdb\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "documentsDBListSpecifications", + "tags": [ + "documentsDB" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/documentsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "documentsDBListTransactions", + "tags": [ + "documentsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" - }, + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "documentsDBCreateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/documentsdb\/transactions\/{transactionId}": { + "get": { + "summary": "Get transaction", + "operationId": "documentsDBGetTransaction", + "tags": [ + "documentsDB" + ], + "description": "Get a transaction by its unique ID.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/get-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update transaction", + "operationId": "documentsDBUpdateTransaction", + "tags": [ + "documentsDB" + ], + "description": "Update a transaction, to either commit or roll back its operations.", + "responses": { + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/update-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "documentsDBDeleteTransaction", + "tags": [ + "documentsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/delete-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "documentsDBCreateOperations", + "tags": [ + "documentsDB" + ], + "description": "Create multiple operations in a single transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createOperations", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "documentsdb\/create-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/documentsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "documentsDBGet", + "tags": [ + "documentsDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "latitude", - "description": "Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "37.7749", - "default": 0 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" - }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "documentsDBUpdate", + "tags": [ + "documentsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "longitude", - "description": "Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "-122.4194", - "default": 0 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" - }, + "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.", + "default": true, + "x-example": false + }, + "specification": { + "type": "string", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "documentsDBDelete", + "tags": [ + "documentsDB" + ], + "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "documentsdb", + "cookies": false, + "type": "", + "demo": "documentsdb\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "accuracy", - "description": "Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "number", - "format": "float", - "x-example": "100", - "default": 0 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" - }, + "in": "path" + } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections": { + "get": { + "summary": "List collections", + "operationId": "documentsDBListCollections", + "tags": [ + "documentsDB" + ], + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCollections", + "group": "collections", + "cookies": false, + "type": "", + "demo": "documentsdb\/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "touch", - "description": "Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": "true", - "default": false + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "permissions", - "description": "Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", - "enum": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ], - "x-enum-name": "BrowserPermission", - "x-enum-keys": [ - "geolocation", - "camera", - "microphone", - "notifications", - "midi", - "push", - "clipboard-read", - "clipboard-write", - "payment-handler", - "usb", - "bluetooth", - "accelerometer", - "gyroscope", - "magnetometer", - "ambient-light-sensor", - "background-sync", - "persistent-storage", - "screen-wake-lock", - "web-share", - "xr-spatial-tracking" - ] + "type": "string" }, - "x-example": "[\"geolocation\",\"notifications\"]", "default": [] }, "in": "query" }, { - "name": "sleep", - "description": "Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "3", - "default": 0 - }, - "in": "query" - }, - { - "name": "width", - "description": "Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).", + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": "800", - "default": 0 + "type": "string", + "x-example": "<SEARCH>", + "default": "" }, "in": "query" }, { - "name": "height", - "description": "Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "x-example": "600", - "default": 0 + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" - }, + } + ] + }, + "post": { + "summary": "Create collection", + "operationId": "documentsDBCreateCollection", + "tags": [ + "documentsDB" + ], + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Collection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/collection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createCollection", + "group": "collections", + "cookies": false, + "type": "", + "demo": "documentsdb\/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "quality", - "description": "Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": "85", - "default": -1 - }, - "in": "query" - }, + "Project": [], + "Key": [] + } + ], + "parameters": [ { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "jpeg", - "enum": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ] + "x-example": "<DATABASE_ID>" }, - "in": "query" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "attributes": { + "type": "array", + "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "collectionId", + "name" + ] + } + } } - ] + } } }, - "\/backups\/archives": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { "get": { - "summary": "List archives", - "operationId": "backupsListArchives", + "summary": "Get collection", + "operationId": "documentsDBGetCollection", "tags": [ - "backups" + "documentsDB" ], - "description": "List all archives for a project.", + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", "responses": { "200": { - "description": "Backup archive list", + "description": "Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupArchiveList" + "$ref": "#\/components\/schemas\/collection" } } } @@ -7360,22 +18763,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listArchives", - "group": null, + "method": "getCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "backups\/list-archives.md", + "demo": "documentsdb\/get-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "archives.read", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-archives.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", "auth": { "Project": [], "Key": [] @@ -7389,34 +18792,41 @@ ], "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.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" } ] }, - "post": { - "summary": "Create archive", - "operationId": "backupsCreateArchive", + "put": { + "summary": "Update collection", + "operationId": "documentsDBUpdateCollection", "tags": [ - "backups" + "documentsDB" ], - "description": "Create a new archive asynchronously for a project.", + "description": "Update a collection by its unique ID.", "responses": { - "201": { - "description": "Archive", + "200": { + "description": "Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupArchive" + "$ref": "#\/components\/schemas\/collection" } } } @@ -7424,22 +18834,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createArchive", - "group": null, + "method": "updateCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "backups\/create-archive.md", + "demo": "documentsdb\/update-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "archives.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-archive.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", "auth": { "Project": [], "Key": [] @@ -7451,93 +18861,104 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "services": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "permissions": { "type": "array", - "description": "Array of services to backup", - "x-example": null, + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "string", - "enum": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ], - "x-enum-name": "BackupServices", - "x-enum-keys": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ] + "type": "string" } }, - "resourceId": { - "type": "string", - "description": "Resource ID. When set, only this single resource will be backed up.", - "x-example": "<RESOURCE_ID>", - "x-nullable": true + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false } }, "required": [ - "services" + "name" ] } } } } - } - }, - "\/backups\/archives\/{archiveId}": { - "get": { - "summary": "Get backup archive", - "operationId": "backupsGetArchive", + }, + "delete": { + "summary": "Delete collection", + "operationId": "documentsDBDeleteCollection", "tags": [ - "backups" + "documentsDB" ], - "description": "Get a backup archive using it's ID.", + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { - "200": { - "description": "Archive", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/backupArchive" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getArchive", - "group": null, + "method": "deleteCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "backups\/get-archive.md", + "demo": "documentsdb\/delete-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "archives.read", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-archive.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", "auth": { "Project": [], "Key": [] @@ -7551,93 +18972,163 @@ ], "parameters": [ { - "name": "archiveId", - "description": "Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<ARCHIVE_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete archive", - "operationId": "backupsDeleteArchive", + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "documentsDBListDocuments", "tags": [ - "backups" + "documentsDB" ], - "description": "Delete an existing archive for a project.", + "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": { - "204": { - "description": "No content" + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteArchive", - "group": null, + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/delete-archive.md", + "demo": "documentsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "archives.write", + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/delete-archive.md", - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "archiveId", - "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<ARCHIVE_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - } - }, - "\/backups\/policies": { - "get": { - "summary": "List backup policies", - "operationId": "backupsListPolicies", + }, + "post": { + "summary": "Create document", + "operationId": "documentsDBCreateDocument", "tags": [ - "backups" + "documentsDB" ], - "description": "List all policies for a project.", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "Backup policy list", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupPolicyList" + "$ref": "#\/components\/schemas\/document" } } } @@ -7645,66 +19136,185 @@ }, "deprecated": false, "x-appwrite": { - "method": "listPolicies", - "group": null, + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/list-policies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.read", - "backups.policies.read" - ], + "demo": "documentsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-policies.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "documentsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "documentsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/create-documents.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documentId", + "data" + ] + } + } + } + } }, - "post": { - "summary": "Create backup policy", - "operationId": "backupsCreatePolicy", + "put": { + "summary": "Upsert documents", + "operationId": "documentsDBUpsertDocuments", "tags": [ - "backups" + "documentsDB" ], - "description": "Create a new backup policy.", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", "responses": { "201": { - "description": "backup", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupPolicy" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -7712,25 +19322,53 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPolicy", - "group": null, + "method": "upsertDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/create-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "backups.policies.write" - ], + "demo": "documentsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-policy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "documentsdb\/upsert-documents.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -7742,104 +19380,70 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "policyId": { - "type": "string", - "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<POLICY_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Policy name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - }, - "services": { + "documents": { "type": "array", - "description": "Array of services to backup", + "description": "Array of document data as JSON objects. May contain partial documents.", "x-example": null, "items": { - "type": "string", - "enum": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ], - "x-enum-name": "BackupServices", - "x-enum-keys": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ] + "type": "object" } }, - "resourceId": { - "type": "string", - "description": "Resource ID. When set, only this single resource will be backed up.", - "x-example": "<RESOURCE_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Is policy enabled? When set to 'disabled', no backups will be taken", - "default": true, - "x-example": false - }, - "retention": { - "type": "integer", - "description": "Days to keep backups before deletion", - "x-example": 1, - "format": "int32" - }, - "schedule": { + "transactionId": { "type": "string", - "description": "Schedule CRON syntax.", - "x-example": null + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } }, "required": [ - "policyId", - "services", - "retention", - "schedule" + "documents" ] } } } } - } - }, - "\/backups\/policies\/{policyId}": { - "get": { - "summary": "Get backup policy", - "operationId": "backupsGetPolicy", + }, + "patch": { + "summary": "Update documents", + "operationId": "documentsDBUpdateDocuments", "tags": [ - "backups" + "documentsDB" ], - "description": "Get a backup policy using it's ID.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { - "description": "backup", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupPolicy" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -7847,25 +19451,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPolicy", - "group": null, + "method": "updateDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/get-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.read", - "backups.policies.read" - ], + "demo": "documentsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-policy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", "auth": { "Project": [], "Key": [] @@ -7879,31 +19480,72 @@ ], "parameters": [ { - "name": "policyId", - "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<POLICY_ID>" + "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": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + } + } + } + } + } }, - "patch": { - "summary": "Update backup policy", - "operationId": "backupsUpdatePolicy", + "delete": { + "summary": "Delete documents", + "operationId": "documentsDBDeleteDocuments", "tags": [ - "backups" + "documentsDB" ], - "description": "Update an existing policy using it's ID.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { - "description": "backup", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupPolicy" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -7911,25 +19553,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePolicy", - "group": null, + "method": "deleteDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/update-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "backups.policies.write" - ], + "demo": "documentsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/update-policy.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", "auth": { "Project": [], "Key": [] @@ -7943,131 +19582,173 @@ ], "parameters": [ { - "name": "policyId", - "description": "Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<POLICY_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } + ] + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "documentsDBGetDocument", + "tags": [ + "documentsDB" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Policy name. Max length: 128 chars.", - "x-example": "<NAME>", - "x-nullable": true - }, - "retention": { - "type": "integer", - "description": "Days to keep backups before deletion", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "schedule": { - "type": "string", - "description": "Cron expression", - "x-example": null - }, - "enabled": { - "type": "boolean", - "description": "Is Backup enabled? When set to 'disabled', No backup will be taken", - "x-example": false, - "x-nullable": true - } + "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" } } } } - } - }, - "delete": { - "summary": "Delete backup policy", - "operationId": "backupsDeletePolicy", - "tags": [ - "backups" - ], - "description": "Delete a policy using it's ID.", - "responses": { - "204": { - "description": "No content" - } }, "deprecated": false, "x-appwrite": { - "method": "deletePolicy", - "group": null, + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/delete-policy.md", + "demo": "documentsdb\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "backups.policies.write" - ], + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/delete-policy.md", - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "policyId", - "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<POLICY_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" }, "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] - } - }, - "\/backups\/restoration": { - "post": { - "summary": "Create restoration", - "operationId": "backupsCreateRestoration", + }, + "put": { + "summary": "Upsert a document", + "operationId": "documentsDBUpsertDocument", "tags": [ - "backups" + "documentsDB" ], - "description": "Create and trigger a new restoration for a backup on a project.", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { "201": { - "description": "Restoration", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupRestoration" + "$ref": "#\/components\/schemas\/document" } } } @@ -8075,31 +19756,99 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRestoration", - "group": null, + "method": "upsertDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/create-restoration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "restorations.write", + "demo": "documentsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/create-restoration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "documentsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "documentsdb\/upsert-document.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } - }, - "security": [ + ], + "parameters": [ { - "Project": [], - "Key": [] + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" } ], "requestBody": { @@ -8108,79 +19857,45 @@ "schema": { "type": "object", "properties": { - "archiveId": { - "type": "string", - "description": "Backup archive ID to restore", - "x-example": "<ARCHIVE_ID>" + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" }, - "services": { + "permissions": { "type": "array", - "description": "Array of services to restore", - "x-example": null, + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "string", - "enum": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ], - "x-enum-name": "BackupServices", - "x-enum-keys": [ - "databases", - "tablesdb", - "documentsdb", - "vectorsdb", - "dedicatedDatabases", - "functions", - "storage" - ] - } - }, - "newResourceId": { - "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": "", - "x-example": "<NEW_RESOURCE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "type": "string" } }, - "newResourceName": { + "transactionId": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "default": "", - "x-example": "<NEW_RESOURCE_NAME>" + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } - }, - "required": [ - "archiveId", - "services" - ] + } } } } } - } - }, - "\/backups\/restorations": { - "get": { - "summary": "List restorations", - "operationId": "backupsListRestorations", + }, + "patch": { + "summary": "Update document", + "operationId": "documentsDBUpdateDocument", "tags": [ - "backups" + "documentsDB" ], - "description": "List all backup restorations for a project.", + "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": "Backup restoration list", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/backupRestorationList" + "$ref": "#\/components\/schemas\/document" } } } @@ -8188,398 +19903,473 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRestorations", - "group": null, + "method": "updateDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/list-restorations.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "restorations.read", + "demo": "documentsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/list-restorations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "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" } - ] - } - }, - "\/backups\/restorations\/{restorationId}": { - "get": { - "summary": "Get backup restoration", - "operationId": "backupsGetRestoration", - "tags": [ - "backups" ], - "description": "Get the current status of a backup restoration.", - "responses": { - "200": { - "description": "Restoration", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/backupRestoration" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } } } } } + } + }, + "delete": { + "summary": "Delete document", + "operationId": "documentsDBDeleteDocument", + "tags": [ + "documentsDB" + ], + "description": "Delete a document by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "getRestoration", - "group": null, + "method": "deleteDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "backups\/get-restoration.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "restorations.read", + "demo": "documentsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/backups\/get-restoration.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "restorationId", - "description": "Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<RESTORATION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] } }, - "\/databases": { - "get": { - "summary": "List databases", - "operationId": "databasesList", + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "patch": { + "summary": "Decrement document attribute", + "operationId": "documentsDBDecrementDocumentAttribute", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "Decrement a specific column of a row by a given value.", "responses": { "200": { - "description": "Databases List", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/document" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "list", - "group": "databases", + "method": "decrementDocumentAttribute", + "group": "documents", "cookies": false, "type": "", - "demo": "databases\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "demo": "documentsdb\/decrement-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - }, - "methods": [ - { - "name": "list", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "queries", - "search", - "total" - ], - "required": [], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/databaseList" - } - ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", - "demo": "databases\/list.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.list" - } - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "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, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<COLLECTION_ID>" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "documentId", + "description": "Document ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<DOCUMENT_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] - }, - "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" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to decrement the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" + }, + "min": { + "type": "number", + "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } } } } } - }, - "deprecated": true, - "x-appwrite": { - "method": "create", - "group": "databases", - "cookies": false, - "type": "", - "demo": "databases\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" - }, - "methods": [ - { - "name": "create", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Create a new Database.\n", - "demo": "databases\/create.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.create" + } + } + }, + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { + "patch": { + "summary": "Increment document attribute", + "operationId": "documentsDBIncrementDocumentAttribute", + "tags": [ + "documentsDB" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "incrementDocumentAttribute", + "group": "documents", + "cookies": false, + "type": "", + "demo": "documentsdb\/increment-document-attribute.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "console" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "attribute", + "description": "Attribute key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], "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-appwrite": { - "idGenerator": "ID.unique" - } + "value": { + "type": "number", + "description": "Value to increment the attribute by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "name": { - "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "max": { + "type": "number", + "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float" }, - "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 + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } - }, - "required": [ - "databaseId", - "name" - ] + } } } } } } }, - "\/databases\/transactions": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { "get": { - "summary": "List transactions", - "operationId": "databasesListTransactions", + "summary": "List indexes", + "operationId": "documentsDBListIndexes", "tags": [ - "databases" + "documentsDB" ], - "description": "List transactions across all databases.", + "description": "List indexes in the collection.", "responses": { "200": { - "description": "Transaction List", + "description": "Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/indexList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "listIndexes", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/list-transactions.md", + "demo": "documentsdb\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": "collections.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-transactions.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTransactions" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", "auth": { "Project": [], "Key": [] @@ -8588,15 +20378,33 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", @@ -8606,51 +20414,57 @@ "default": [] }, "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, "post": { - "summary": "Create transaction", - "operationId": "databasesCreateTransaction", + "summary": "Create index", + "operationId": "documentsDBCreateIndex", "tags": [ - "databases" + "documentsDB" ], - "description": "Create a new transaction.", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { - "201": { - "description": "Transaction", + "202": { + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/index" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/create-transaction.md", + "demo": "documentsdb\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", "auth": { "Project": [], "Key": [] @@ -8659,9 +20473,29 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" } ], "requestBody": { @@ -8670,63 +20504,112 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": "DocumentsDBIndexType", + "x-enum-keys": [ + "key", + "fulltext", + "unique" + ] + }, + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } } - } + }, + "required": [ + "key", + "type", + "attributes" + ] } } } } } }, - "\/databases\/transactions\/{transactionId}": { + "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { "get": { - "summary": "Get transaction", - "operationId": "databasesGetTransaction", + "summary": "Get index", + "operationId": "documentsDBGetIndex", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a transaction by its unique ID.", + "description": "Get index by ID.", "responses": { "200": { - "description": "Transaction", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/index" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "getIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/get-transaction.md", + "demo": "documentsdb\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": "collections.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", "auth": { "Project": [], "Key": [] @@ -8735,150 +20618,71 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" - } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "databasesUpdateTransaction", - "tags": [ - "databases" - ], - "description": "Update a transaction, to either commit or roll back its operations.", - "responses": { - "200": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "databases\/update-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTransaction" }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - } - } + ] }, "delete": { - "summary": "Delete transaction", - "operationId": "databasesDeleteTransaction", + "summary": "Delete index", + "operationId": "documentsDBDeleteIndex", "tags": [ - "databases" + "documentsDB" ], - "description": "Delete a transaction by its unique ID.", + "description": "Delete an index.", "responses": { "204": { "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "deleteIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "databases\/delete-transaction.md", + "demo": "documentsdb\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-transaction.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTransaction" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", "auth": { "Project": [], "Key": [] @@ -8887,68 +20691,79 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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\/transactions\/{transactionId}\/operations": { + "\/documentsdb\/{databaseId}\/failovers": { "post": { - "summary": "Create operations", - "operationId": "databasesCreateOperations", + "summary": "Create failover", + "operationId": "documentsDBCreateFailover", "tags": [ - "databases" + "documentsDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "201": { - "description": "Transaction", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "databases\/create-operations.md", + "demo": "documentsdb\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "databases.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-operations.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createOperations" - }, "auth": { "Project": [], "Key": [] @@ -8957,19 +20772,17 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -8980,14 +20793,11 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true } } } @@ -8996,33 +20806,33 @@ } } }, - "\/databases\/{databaseId}": { + "\/documentsdb\/{databaseId}\/operations": { "get": { - "summary": "Get database", - "operationId": "databasesGet", + "summary": "List operations", + "operationId": "documentsDBListOperations", "tags": [ - "databases" + "documentsDB" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Database", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "get", - "group": "databases", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "databases\/get.md", + "demo": "documentsdb\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9033,41 +20843,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - }, - "methods": [ - { - "name": "get", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", - "demo": "databases\/get.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.get" - } - } - ], "auth": { "Project": [], "Key": [] @@ -9089,82 +20864,81 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - }, - "put": { - "summary": "Update database", - "operationId": "databasesUpdate", + } + }, + "\/documentsdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "documentsDBGetReplicas", "tags": [ - "databases" + "documentsDB" ], - "description": "Update a database by its unique ID.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Database", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "update", - "group": "databases", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "databases\/update.md", + "demo": "documentsdb\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - }, - "methods": [ - { - "name": "update", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "name", - "enabled" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/database" - } - ], - "description": "Update a database by its unique ID.", - "demo": "databases\/update.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.update" - } - } - ], "auth": { "Project": [], "Key": [] @@ -9187,93 +20961,46 @@ }, "in": "path" } + ] + } + }, + "\/documentsdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "documentsDBGetStatus", + "tags": [ + "documentsDB" ], - "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.", - "default": true, - "x-example": false - } + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" } } } } - } - }, - "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" - } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "databases", + "method": "getStatus", + "group": "documentsdb", "cookies": false, "type": "", - "demo": "databases\/delete.md", + "demo": "documentsdb\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - }, - "methods": [ - { - "name": "delete", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId" - ], - "required": [ - "databaseId" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", - "demo": "databases\/delete.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.delete" - } - } - ], "auth": { "Project": [], "Key": [] @@ -9299,48 +21026,43 @@ ] } }, - "\/databases\/{databaseId}\/collections": { + "\/functions": { "get": { - "summary": "List collections", - "operationId": "databasesListCollections", + "summary": "List functions", + "operationId": "functionsList", "tags": [ - "databases" + "functions" ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", "responses": { "200": { - "description": "Collections List", + "description": "Functions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collectionList" + "$ref": "#\/components\/schemas\/functionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "list", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/list-collections.md", + "demo": "functions\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listTables" - }, "auth": { "Project": [], "Key": [] @@ -9353,19 +21075,9 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", "required": false, "schema": { "type": "array", @@ -9401,46 +21113,41 @@ ] }, "post": { - "summary": "Create collections", - "operationId": "databasesCreateCollection", + "summary": "Create function", + "operationId": "functionsCreate", "tags": [ - "databases" + "functions" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "responses": { "201": { - "description": "Collection", + "description": "Function", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/function" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "create", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/create-collection.md", + "demo": "functions\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTable" - }, "auth": { "Project": [], "Key": [] @@ -9452,392 +21159,618 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "collectionId": { + "functionId": { "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>", + "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>", "x-appwrite": { "idGenerator": "ID.unique" } }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "Runtime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "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" + } }, - "permissions": { + "events": { "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Events list. Maximum of 100 events are allowed.", + "default": [], + "x-example": null, "items": { "type": "string" - }, - "x-nullable": true + } }, - "documentSecurity": { + "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, + "format": "int32" + }, + "enabled": { "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, + "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 }, - "enabled": { + "logging": { "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.", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", "default": true, "x-example": false }, - "attributes": { + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed.", "default": [], "x-example": null, "items": { - "type": "object" + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] } }, - "indexes": { + "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>" + }, + "providerBranches": { "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", "default": [], "x-example": null, "items": { - "type": "object" + "type": "string" } - } - }, - "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" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "getCollection", - "group": "collections", - "cookies": false, - "type": "", - "demo": "databases\/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "databasesUpdateCollection", - "tags": [ - "databases" - ], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/collection" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateCollection", - "group": "collections", - "cookies": false, - "type": "", - "demo": "databases\/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "x-example": "<NAME>" }, - "permissions": { + "providerPaths": { "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "default": [], + "x-example": null, "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false + "type": "string" + } }, - "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 + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "default": {}, + "x-example": null }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the function executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" } - } + }, + "required": [ + "functionId", + "name", + "runtime" + ] } } } } - }, - "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" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteCollection", - "group": "collections", - "cookies": false, - "type": "", - "demo": "databases\/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteTable" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes": { + "\/functions\/runtimes": { "get": { - "summary": "List attributes", - "operationId": "databasesListAttributes", + "summary": "List runtimes", + "operationId": "functionsListRuntimes", "tags": [ - "databases" + "functions" ], - "description": "List attributes in the collection.", + "description": "Get a list of all runtimes that are currently active on your instance.", "responses": { "200": { - "description": "Attributes List", + "description": "Runtimes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeList" + "$ref": "#\/components\/schemas\/runtimeList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listAttributes", - "group": "attributes", + "method": "listRuntimes", + "group": "runtimes", "cookies": false, "type": "", - "demo": "databases\/list-attributes.md", + "demo": "functions\/list-runtimes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "public", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listColumns" - }, "auth": { "Project": [], "Key": [] @@ -9848,226 +21781,46 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint": { - "post": { - "summary": "Create bigint attribute", - "operationId": "databasesCreateBigIntAttribute", - "tags": [ - "databases" - ], - "description": "Create a bigint attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "202": { - "description": "AttributeBigInt", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeBigint" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createBigIntAttribute", - "group": "attributes", - "cookies": false, - "type": "", - "demo": "databases\/create-big-int-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-bigint-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBigIntColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "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", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/bigint\/{key}": { - "patch": { - "summary": "Update bigint attribute", - "operationId": "databasesUpdateBigIntAttribute", + "\/functions\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "functionsListSpecifications", "tags": [ - "databases" + "functions" ], - "description": "Update a bigint attribute. Changing the `default` value will not update already existing documents.\n", + "description": "List allowed function specifications for this instance.", "responses": { "200": { - "description": "AttributeBigInt", + "description": "Specifications List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBigint" + "$ref": "#\/components\/schemas\/specificationList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateBigIntAttribute", - "group": "attributes", + "method": "listSpecifications", + "group": "runtimes", "cookies": false, "type": "", - "demo": "databases\/update-big-int-attribute.md", + "demo": "functions\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-bigint-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBigIntColumn" - }, "auth": { "Project": [], "Key": [] @@ -10081,126 +21834,56 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "type", + "description": "Specification type to list. Can be one of: runtimes, builds.", + "required": false, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "runtimes", + "default": "runtimes" }, - "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", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean": { - "post": { - "summary": "Create boolean attribute", - "operationId": "databasesCreateBooleanAttribute", + "\/functions\/{functionId}": { + "get": { + "summary": "Get function", + "operationId": "functionsGet", "tags": [ - "databases" + "functions" ], - "description": "Create a boolean attribute.\n", + "description": "Get a function by its unique ID.", "responses": { - "202": { - "description": "AttributeBoolean", + "200": { + "description": "Function", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" + "$ref": "#\/components\/schemas\/function" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createBooleanAttribute", - "group": "attributes", + "method": "get", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/create-boolean-attribute.md", + "demo": "functions\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createBooleanColumn" - }, "auth": { "Project": [], "Key": [] @@ -10214,107 +21897,53 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } + "name": "functionId", + "description": "Function ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FUNCTION_ID>" + }, + "in": "path" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean\/{key}": { - "patch": { - "summary": "Update boolean attribute", - "operationId": "databasesUpdateBooleanAttribute", + ] + }, + "put": { + "summary": "Update function", + "operationId": "functionsUpdate", "tags": [ - "databases" + "functions" ], - "description": "Update a boolean attribute. Changing the `default` value will not update already existing documents.", + "description": "Update function by its unique ID.", "responses": { "200": { - "description": "AttributeBoolean", + "description": "Function", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeBoolean" + "$ref": "#\/components\/schemas\/function" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateBooleanAttribute", - "group": "attributes", + "method": "update", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/update-boolean-attribute.md", + "demo": "functions\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateBooleanColumn" - }, "auth": { "Project": [], "Key": [] @@ -10328,31 +21957,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -10363,425 +21973,593 @@ "schema": { "type": "object", "properties": { - "required": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "Runtime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "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, + "format": "int32" + }, + "enabled": { "type": "boolean", - "description": "Is attribute required?", + "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "default": true, "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 + "entrypoint": { + "type": "string", + "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", + "default": "", + "x-example": "<ENTRYPOINT>" + }, + "commands": { + "type": "string", + "description": "Build Commands.", + "default": "", + "x-example": "<COMMANDS>" + }, + "scopes": { + "type": "array", + "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Controle System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" }, - "newKey": { + "providerRepositoryId": { "type": "string", - "description": "New attribute key.", - "x-example": null, + "description": "Repository ID of the repo linked to the function", + "x-example": "<PROVIDER_REPOSITORY_ID>", "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime": { - "post": { - "summary": "Create datetime attribute", - "operationId": "databasesCreateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Create a date time attribute according to the ISO 8601 standard.", - "responses": { - "202": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createDatetimeAttribute", - "group": "attributes", - "cookies": false, - "type": "", - "demo": "databases\/create-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false }, - "default": { + "providerBranch": { "type": "string", - "description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "description": "Production branch for the repo linked to the function", + "default": "", + "x-example": "<PROVIDER_BRANCH>" }, - "array": { + "providerSilentMode": { "type": "boolean", - "description": "Is attribute an array?", + "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 - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { - "patch": { - "summary": "Update datetime attribute", - "operationId": "databasesUpdateDatetimeAttribute", - "tags": [ - "databases" - ], - "description": "Update a date time attribute. Changing the `default` value will not update already existing documents.", - "responses": { - "200": { - "description": "AttributeDatetime", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeDatetime" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "updateDatetimeAttribute", - "group": "attributes", - "cookies": false, - "type": "", - "demo": "databases\/update-datetime-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateDatetimeColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "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": { + "providerRootDirectory": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "description": "Path to function code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "x-example": null, + "items": { + "type": "string" + }, "x-nullable": true }, - "newKey": { - "type": "string", - "description": "New attribute key.", + "providerPaths": { + "type": "array", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", "x-example": null, + "items": { + "type": "string" + }, "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" - } - } - } - } - }, - "deprecated": true, - "x-appwrite": { - "method": "createEmailAttribute", - "group": "attributes", - "cookies": false, - "type": "", - "demo": "databases\/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEmailColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "buildSpecification": { + "type": "string", + "description": "Build specification for the function deployments.", + "x-example": null, + "x-nullable": true }, - "default": { + "runtimeSpecification": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "email@example.com", - "format": "email", + "description": "Runtime specification for the function executions.", + "x-example": null, "x-nullable": true }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" } }, "required": [ - "key", - "required" + "name" ] } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email\/{key}": { - "patch": { - "summary": "Update email attribute", - "operationId": "databasesUpdateEmailAttribute", + }, + "delete": { + "summary": "Delete function", + "operationId": "functionsDelete", "tags": [ - "databases" + "functions" ], - "description": "Update an email attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Delete a function by its unique ID.", "responses": { - "200": { - "description": "AttributeEmail", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeEmail" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateEmailAttribute", - "group": "attributes", + "method": "delete", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/update-email-attribute.md", + "demo": "functions\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEmailColumn" - }, "auth": { "Project": [], "Key": [] @@ -10795,112 +22573,55 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<FUNCTION_ID>" }, "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", - "format": "email", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum": { - "post": { - "summary": "Create enum attribute", - "operationId": "databasesCreateEnumAttribute", + ] + } + }, + "\/functions\/{functionId}\/deployment": { + "patch": { + "summary": "Update function's deployment", + "operationId": "functionsUpdateFunctionDeployment", "tags": [ - "databases" + "functions" ], - "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "responses": { - "202": { - "description": "AttributeEnum", + "200": { + "description": "Function", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" + "$ref": "#\/components\/schemas\/function" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createEnumAttribute", - "group": "attributes", + "method": "updateFunctionDeployment", + "group": "functions", "cookies": false, "type": "", - "demo": "databases\/create-enum-attribute.md", + "demo": "functions\/update-function-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createEnumColumn" - }, "auth": { "Project": [], "Key": [] @@ -10914,22 +22635,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -10940,41 +22651,14 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { + "deploymentId": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" } }, "required": [ - "key", - "elements", - "required" + "deploymentId" ] } } @@ -10982,48 +22666,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum\/{key}": { - "patch": { - "summary": "Update enum attribute", - "operationId": "databasesUpdateEnumAttribute", + "\/functions\/{functionId}\/deployments": { + "get": { + "summary": "List deployments", + "operationId": "functionsListDeployments", "tags": [ - "databases" + "functions" ], - "description": "Update an enum attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", "responses": { "200": { - "description": "AttributeEnum", + "description": "Deployments List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeEnum" + "$ref": "#\/components\/schemas\/deploymentList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateEnumAttribute", - "group": "attributes", + "method": "listDeployments", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/update-enum-attribute.md", + "demo": "functions\/list-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateEnumColumn" - }, "auth": { "Project": [], "Key": [] @@ -11037,71 +22716,144 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "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": "<COLLECTION_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Attribute Key.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "functionsCreateDeployment", + "tags": [ + "functions" + ], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "cookies": false, + "type": "upload", + "demo": "functions\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "<FUNCTION_ID>" }, "in": "path" } ], "requestBody": { "content": { - "application\/json": { + "multipart\/form-data": { "schema": { "type": "object", "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "entrypoint": { + "type": "string", + "description": "Entrypoint File.", + "x-example": "<ENTRYPOINT>", + "x-nullable": true }, - "default": { + "commands": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", + "description": "Build Commands.", + "x-example": "<COMMANDS>", "x-nullable": true }, - "newKey": { + "code": { "type": "string", - "description": "New Attribute Key.", + "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, - "x-nullable": true + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "x-example": false } }, "required": [ - "elements", - "required", - "default" + "code", + "activate" ] } } @@ -11109,48 +22861,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float": { + "\/functions\/{functionId}\/deployments\/duplicate": { "post": { - "summary": "Create float attribute", - "operationId": "databasesCreateFloatAttribute", + "summary": "Create duplicate deployment", + "operationId": "functionsCreateDuplicateDeployment", "tags": [ - "databases" + "functions" ], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { "202": { - "description": "AttributeFloat", + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" + "$ref": "#\/components\/schemas\/deployment" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createFloatAttribute", - "group": "attributes", + "method": "createDuplicateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/create-float-attribute.md", + "demo": "functions\/create-duplicate-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createFloatColumn" - }, "auth": { "Project": [], "Key": [] @@ -11164,22 +22911,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -11190,47 +22927,20 @@ "schema": { "type": "object", "properties": { - "key": { + "deploymentId": { "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false + "buildId": { + "type": "string", + "description": "Build unique ID.", + "default": "", + "x-example": "<BUILD_ID>" } }, "required": [ - "key", - "required" + "deploymentId" ] } } @@ -11238,48 +22948,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float\/{key}": { - "patch": { - "summary": "Update float attribute", - "operationId": "databasesUpdateFloatAttribute", + "\/functions\/{functionId}\/deployments\/template": { + "post": { + "summary": "Create template deployment", + "operationId": "functionsCreateTemplateDeployment", "tags": [ - "databases" + "functions" ], - "description": "Update a float attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", "responses": { - "200": { - "description": "AttributeFloat", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeFloat" + "$ref": "#\/components\/schemas\/deployment" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateFloatAttribute", - "group": "attributes", + "method": "createTemplateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/update-float-attribute.md", + "demo": "functions\/create-template-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateFloatColumn" - }, "auth": { "Project": [], "Key": [] @@ -11293,31 +22998,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -11328,42 +23014,55 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "repository": { + "type": "string", + "description": "Repository name of the template.", + "x-example": "<REPOSITORY>" }, - "min": { - "type": "number", - "description": "Minimum value.", - "x-example": null, - "format": "float", - "x-nullable": true + "owner": { + "type": "string", + "description": "The name of the owner of the template.", + "x-example": "<OWNER>" }, - "max": { - "type": "number", - "description": "Maximum value.", - "x-example": null, - "format": "float", - "x-nullable": true + "rootDirectory": { + "type": "string", + "description": "Path to function code in the template repo.", + "x-example": "<ROOT_DIRECTORY>" }, - "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", - "x-nullable": true + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "commit", + "enum": [ + "commit", + "branch", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [ + "commit", + "branch", + "tag" + ] }, - "newKey": { + "reference": { "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false } }, "required": [ - "required", - "default" + "repository", + "owner", + "rootDirectory", + "type", + "reference" ] } } @@ -11371,48 +23070,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer": { + "\/functions\/{functionId}\/deployments\/vcs": { "post": { - "summary": "Create integer attribute", - "operationId": "databasesCreateIntegerAttribute", + "summary": "Create VCS deployment", + "operationId": "functionsCreateVcsDeployment", "tags": [ - "databases" + "functions" ], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "responses": { "202": { - "description": "AttributeInteger", + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" + "$ref": "#\/components\/schemas\/deployment" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createIntegerAttribute", - "group": "attributes", + "method": "createVcsDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/create-integer-attribute.md", + "demo": "functions\/create-vcs-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIntegerColumn" - }, "auth": { "Project": [], "Key": [] @@ -11425,23 +23119,13 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + { + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -11452,47 +23136,35 @@ "schema": { "type": "object", "properties": { - "key": { + "type": { "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [ + "branch", + "commit" + ] }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "<REFERENCE>" }, - "array": { + "activate": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Automatically activate the deployment when it is finished building.", "default": false, "x-example": false } }, "required": [ - "key", - "required" + "type", + "reference" ] } } @@ -11500,48 +23172,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer\/{key}": { - "patch": { - "summary": "Update integer attribute", - "operationId": "databasesUpdateIntegerAttribute", + "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "functionsGetDeployment", "tags": [ - "databases" + "functions" ], - "description": "Update an integer attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a function deployment by its unique ID.", "responses": { "200": { - "description": "AttributeInteger", + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeInteger" + "$ref": "#\/components\/schemas\/deployment" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateIntegerAttribute", - "group": "attributes", + "method": "getDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/update-integer-attribute.md", + "demo": "functions\/get-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIntegerColumn" - }, "auth": { "Project": [], "Key": [] @@ -11555,126 +23222,56 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "deploymentId", + "description": "Deployment ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<DEPLOYMENT_ID>" }, "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", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value. Cannot be set when attribute is required.", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip": { - "post": { - "summary": "Create IP address attribute", - "operationId": "databasesCreateIpAttribute", + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "functionsDeleteDeployment", "tags": [ - "databases" + "functions" ], - "description": "Create IP address attribute.\n", + "description": "Delete a code deployment by its unique ID.", "responses": { - "202": { - "description": "AttributeIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeIp" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createIpAttribute", - "group": "attributes", + "method": "deleteDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/create-ip-attribute.md", + "demo": "functions\/delete-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIpColumn" - }, "auth": { "Project": [], "Key": [] @@ -11688,225 +23285,175 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "deploymentId", + "description": "Deployment ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<DEPLOYMENT_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. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "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", + "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "functionsGetDeploymentDownload", "tags": [ - "databases" + "functions" ], - "description": "Update an ip attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a function deployment 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": "AttributeIP", + "description": "File", "content": { - "application\/json": { + "*\/*": { "schema": { - "$ref": "#\/components\/schemas\/attributeIp" + "type": "string", + "format": "binary" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateIpAttribute", - "group": "attributes", + "method": "getDeploymentDownload", + "group": "deployments", "cookies": false, - "type": "", - "demo": "databases\/update-ip-attribute.md", + "type": "location", + "demo": "functions\/get-deployment-download.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": [ + "public", + "functions.read" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateIpColumn" - }, "auth": { "Project": [], - "Key": [] + "Key": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "Key": [], + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "deploymentId", + "description": "Deployment ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<DEPLOYMENT_ID>" }, "in": "path" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, "schema": { - "type": "string" + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [ + "source", + "output" + ], + "default": "source" }, - "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. Cannot be set when attribute is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" + }, + { + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line": { - "post": { - "summary": "Create line attribute", - "operationId": "databasesCreateLineAttribute", + "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "functionsUpdateDeploymentStatus", "tags": [ - "databases" + "functions" ], - "description": "Create a geometric line attribute.", + "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { - "202": { - "description": "AttributeLine", + "200": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLine" + "$ref": "#\/components\/schemas\/deployment" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createLineAttribute", - "group": "attributes", + "method": "updateDeploymentStatus", + "group": "deployments", "cookies": false, "type": "", - "demo": "databases\/create-line-attribute.md", + "demo": "functions\/update-deployment-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLineColumn" - }, "auth": { "Project": [], "Key": [] @@ -11920,261 +23467,180 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "deploymentId", + "description": "Deployment ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<DEPLOYMENT_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": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "x-nullable": true - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/line\/{key}": { - "patch": { - "summary": "Update line attribute", - "operationId": "databasesUpdateLineAttribute", + "\/functions\/{functionId}\/executions": { + "get": { + "summary": "List executions", + "operationId": "functionsListExecutions", "tags": [ - "databases" + "functions" ], - "description": "Update a line attribute. Changing the `default` value will not update already existing documents.", + "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": "AttributeLine", + "description": "Executions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLine" + "$ref": "#\/components\/schemas\/executionList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateLineAttribute", - "group": "attributes", + "method": "listExecutions", + "group": "executions", "cookies": false, "type": "", - "demo": "databases\/update-line-attribute.md", + "demo": "functions\/list-executions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-line-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLineColumn" - }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext": { + ] + }, "post": { - "summary": "Create longtext attribute", - "operationId": "databasesCreateLongtextAttribute", + "summary": "Create execution", + "operationId": "functionsCreateExecution", "tags": [ - "databases" + "functions" ], - "description": "Create a longtext attribute.\n", + "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": { - "202": { - "description": "AttributeLongtext", + "201": { + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" + "$ref": "#\/components\/schemas\/execution" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createLongtextAttribute", - "group": "attributes", + "method": "createExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "databases\/create-longtext-attribute.md", + "demo": "functions\/create-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-longtext-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createLongtextColumn" - }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -12185,205 +23651,177 @@ "schema": { "type": "object", "properties": { - "key": { + "body": { "type": "string", - "description": "Attribute Key.", - "x-example": null + "description": "HTTP body of execution. Default value is empty string.", + "default": "", + "x-example": "<BODY>" }, - "required": { + "async": { "type": "boolean", - "description": "Is attribute required?", + "description": "Execute code in the background. Default value is false.", + "default": false, "x-example": false }, - "default": { + "path": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true + "description": "HTTP path of execution. Path can include query params. Default value is \/", + "default": "\/", + "x-example": "<PATH>" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false + "method": { + "type": "string", + "description": "HTTP method of execution. Default value is POST.", + "default": "POST", + "x-example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "x-enum-name": "ExecutionMethod", + "x-enum-keys": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ] }, - "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 + "headers": { + "type": "object", + "description": "HTTP headers of execution. Defaults to empty.", + "default": [], + "x-example": "{}" + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", + "x-example": "<SCHEDULED_AT>", + "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/longtext\/{key}": { - "patch": { - "summary": "Update longtext attribute", - "operationId": "databasesUpdateLongtextAttribute", + "\/functions\/{functionId}\/executions\/{executionId}": { + "get": { + "summary": "Get execution", + "operationId": "functionsGetExecution", "tags": [ - "databases" + "functions" ], - "description": "Update a longtext attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a function execution log by its unique ID.", "responses": { "200": { - "description": "AttributeLongtext", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeLongtext" + "$ref": "#\/components\/schemas\/execution" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateLongtextAttribute", - "group": "attributes", + "method": "getExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "databases\/update-longtext-attribute.md", + "demo": "functions\/get-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": [ + "executions.read", + "execution.read" + ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-longtext-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateLongtextColumn" - }, "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "executionId", + "description": "Execution ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<EXECUTION_ID>" }, "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 - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext": { - "post": { - "summary": "Create mediumtext attribute", - "operationId": "databasesCreateMediumtextAttribute", + ] + }, + "delete": { + "summary": "Delete execution", + "operationId": "functionsDeleteExecution", "tags": [ - "databases" + "functions" ], - "description": "Create a mediumtext attribute.\n", + "description": "Delete a function execution by its unique ID.", "responses": { - "202": { - "description": "AttributeMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createMediumtextAttribute", - "group": "attributes", + "method": "deleteExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "databases\/create-mediumtext-attribute.md", + "demo": "functions\/delete-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": [ + "executions.write", + "execution.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-mediumtext-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createMediumtextColumn" - }, "auth": { "Project": [], "Key": [] @@ -12397,113 +23835,65 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "executionId", + "description": "Execution ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<EXECUTION_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": "<DEFAULT>", - "x-nullable": true - }, - "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", - "required" - ] - } - } - } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext attribute", - "operationId": "databasesUpdateMediumtextAttribute", + "\/functions\/{functionId}\/variables": { + "get": { + "summary": "List variables", + "operationId": "functionsListVariables", "tags": [ - "databases" + "functions" ], - "description": "Update a mediumtext attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a list of all variables of a specific function.", "responses": { "200": { - "description": "AttributeMediumtext", + "description": "Variables List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeMediumtext" + "$ref": "#\/components\/schemas\/variableList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMediumtextAttribute", - "group": "attributes", + "method": "listVariables", + "group": "variables", "cookies": false, "type": "", - "demo": "databases\/update-mediumtext-attribute.md", + "demo": "functions\/list-variables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-mediumtext-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateMediumtextColumn" - }, "auth": { "Project": [], "Key": [] @@ -12517,111 +23907,77 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, resourceType, resourceId, secret", + "required": false, "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "x-example": false, + "default": true }, - "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 - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point": { + ] + }, "post": { - "summary": "Create point attribute", - "operationId": "databasesCreatePointAttribute", + "summary": "Create variable", + "operationId": "functionsCreateVariable", "tags": [ - "databases" + "functions" ], - "description": "Create a geometric point attribute.", + "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "responses": { - "202": { - "description": "AttributePoint", + "201": { + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePoint" + "$ref": "#\/components\/schemas\/variable" } } } } }, - "deprecated": true, - "x-appwrite": { - "method": "createPointAttribute", - "group": "attributes", + "deprecated": false, + "x-appwrite": { + "method": "createVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "databases\/create-point-attribute.md", + "demo": "functions\/create-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPointColumn" - }, "auth": { "Project": [], "Key": [] @@ -12635,22 +23991,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" } @@ -12661,30 +24007,35 @@ "schema": { "type": "object", "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<VARIABLE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "key": { "type": "string", - "description": "Attribute Key.", - "x-example": null + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" }, - "required": { + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { "type": "boolean", - "description": "Is attribute required?", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "default": true, "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "type": "number", - "format": "double" - }, - "x-nullable": true } }, "required": [ + "variableId", "key", - "required" + "value" ] } } @@ -12692,48 +24043,43 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/point\/{key}": { - "patch": { - "summary": "Update point attribute", - "operationId": "databasesUpdatePointAttribute", + "\/functions\/{functionId}\/variables\/{variableId}": { + "get": { + "summary": "Get variable", + "operationId": "functionsGetVariable", "tags": [ - "databases" + "functions" ], - "description": "Update a point attribute. Changing the `default` value will not update already existing documents.", + "description": "Get a variable by its unique ID.", "responses": { "200": { - "description": "AttributePoint", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePoint" + "$ref": "#\/components\/schemas\/variable" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updatePointAttribute", - "group": "attributes", + "method": "getVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "databases\/update-point-attribute.md", + "demo": "functions\/get-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-point-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePointColumn" - }, "auth": { "Project": [], "Key": [] @@ -12747,114 +24093,63 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<VARIABLE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[1, 2]", - "items": { - "type": "number", - "format": "double" - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } - } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon": { - "post": { - "summary": "Create polygon attribute", - "operationId": "databasesCreatePolygonAttribute", + ] + }, + "put": { + "summary": "Update variable", + "operationId": "functionsUpdateVariable", "tags": [ - "databases" + "functions" ], - "description": "Create a geometric polygon attribute.", + "description": "Update variable by its unique ID.", "responses": { - "202": { - "description": "AttributePolygon", + "200": { + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" + "$ref": "#\/components\/schemas\/variable" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createPolygonAttribute", - "group": "attributes", + "method": "updateVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "databases\/create-polygon-attribute.md", + "demo": "functions\/update-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createPolygonColumn" - }, "auth": { "Project": [], "Key": [] @@ -12868,22 +24163,22 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<VARIABLE_ID>" }, "in": "path" } @@ -12896,83 +24191,57 @@ "properties": { "key": { "type": "string", - "description": "Attribute Key.", - "x-example": null + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>", + "x-nullable": true }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", + "x-example": false, "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/polygon\/{key}": { - "patch": { - "summary": "Update polygon attribute", - "operationId": "databasesUpdatePolygonAttribute", + }, + "delete": { + "summary": "Delete variable", + "operationId": "functionsDeleteVariable", "tags": [ - "databases" + "functions" ], - "description": "Update a polygon attribute. Changing the `default` value will not update already existing documents.", + "description": "Delete a variable by its unique ID.", "responses": { - "200": { - "description": "AttributePolygon", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/attributePolygon" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updatePolygonAttribute", - "group": "attributes", + "method": "deleteVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "databases\/update-polygon-attribute.md", + "demo": "functions\/delete-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "functions.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-polygon-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updatePolygonColumn" - }, "auth": { "Project": [], "Key": [] @@ -12986,33 +24255,78 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "functionId", + "description": "Function unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<FUNCTION_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "query", + "group": "graphql", + "cookies": false, + "type": "graphql", + "demo": "graphql\/query.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "graphql", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "Project": [], + "Key": [], + "Session": [], + "JWT": [] } ], "requestBody": { @@ -13021,36 +24335,15 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New attribute key.", - "x-example": null, - "x-nullable": true + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" } }, "required": [ - "required" + "query" ] } } @@ -13058,48 +24351,45 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship": { + "\/graphql\/mutation": { "post": { - "summary": "Create relationship attribute", - "operationId": "databasesCreateRelationshipAttribute", + "summary": "GraphQL endpoint", + "operationId": "graphqlMutation", "tags": [ - "databases" + "graphql" ], - "description": "Create relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "description": "Execute a GraphQL mutation.", "responses": { - "202": { - "description": "AttributeRelationship", + "200": { + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" + "$ref": "#\/components\/schemas\/any" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createRelationshipAttribute", - "group": "attributes", + "method": "mutation", + "group": "graphql", "cookies": false, - "type": "", - "demo": "databases\/create-relationship-attribute.md", - "rate-limit": 0, - "rate-time": 3600, + "type": "graphql", + "demo": "graphql\/mutation.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "graphql", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRelationshipColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [], "Key": [] @@ -13108,99 +24398,26 @@ "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" + "Key": [], + "Session": [], + "JWT": [] } ], "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedCollectionId": { - "type": "string", - "description": "Related Collection ID.", - "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": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Attribute Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [ - "cascade", - "restrict", - "setNull" - ] + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "description": "The query or queries to execute.", + "default": {}, + "x-example": "{}" } }, "required": [ - "relatedCollectionId", - "type" + "query" ] } } @@ -13208,772 +24425,476 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/relationship\/{key}": { - "patch": { - "summary": "Update relationship attribute", - "operationId": "databasesUpdateRelationshipAttribute", + "\/locale": { + "get": { + "summary": "Get user locale", + "operationId": "localeGet", "tags": [ - "databases" + "locale" ], - "description": "Update relationship attribute. [Learn more about relationship attributes](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-attributes).\n", + "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": "AttributeRelationship", + "description": "Locale", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeRelationship" + "$ref": "#\/components\/schemas\/locale" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateRelationshipAttribute", - "group": "attributes", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "databases\/update-relationship-attribute.md", + "demo": "locale\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRelationshipColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "Session": [], + "Key": [], + "JWT": [] } + ] + } + }, + "\/locale\/codes": { + "get": { + "summary": "List locale codes", + "operationId": "localeListCodes", + "tags": [ + "locale" ], - "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": [ - "cascade", - "restrict", - "setNull" - ] - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } + "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" } } } } - } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCodes", + "group": null, + "cookies": false, + "type": "", + "demo": "locale\/list-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string": { - "post": { - "summary": "Create string attribute", - "operationId": "databasesCreateStringAttribute", + "\/locale\/continents": { + "get": { + "summary": "List continents", + "operationId": "localeListContinents", "tags": [ - "databases" + "locale" ], - "description": "Create a string attribute.\n", + "description": "List of all continents. You can use the locale header to get the data in a supported language.", "responses": { - "202": { - "description": "AttributeString", + "200": { + "description": "Continents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeString" + "$ref": "#\/components\/schemas\/continentList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createStringAttribute", - "group": "attributes", + "method": "listContinents", + "group": null, "cookies": false, "type": "", - "demo": "databases\/create-string-attribute.md", + "demo": "locale\/list-continents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createStringColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table 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, - "format": "int32" - }, - "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 - }, - "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" - ] - } - } + "Session": [], + "Key": [], + "JWT": [] } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string\/{key}": { - "patch": { - "summary": "Update string attribute", - "operationId": "databasesUpdateStringAttribute", + "\/locale\/countries": { + "get": { + "summary": "List countries", + "operationId": "localeListCountries", "tags": [ - "databases" + "locale" ], - "description": "Update a string attribute. Changing the `default` value will not update already existing documents.\n", + "description": "List of all countries. You can use the locale header to get the data in a supported language.", "responses": { "200": { - "description": "AttributeString", + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeString" + "$ref": "#\/components\/schemas\/countryList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateStringAttribute", - "group": "attributes", + "method": "listCountries", + "group": null, "cookies": false, "type": "", - "demo": "databases\/update-string-attribute.md", + "demo": "locale\/list-countries.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateStringColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the string attribute.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "Session": [], + "Key": [], + "JWT": [] } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text": { - "post": { - "summary": "Create text attribute", - "operationId": "databasesCreateTextAttribute", + "\/locale\/countries\/eu": { + "get": { + "summary": "List EU countries", + "operationId": "localeListCountriesEU", "tags": [ - "databases" + "locale" ], - "description": "Create a text attribute.\n", + "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": { - "202": { - "description": "AttributeText", + "200": { + "description": "Countries List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeText" + "$ref": "#\/components\/schemas\/countryList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createTextAttribute", - "group": "attributes", + "method": "listCountriesEU", + "group": null, "cookies": false, "type": "", - "demo": "databases\/create-text-attribute.md", + "demo": "locale\/list-countries-eu.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-text-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" + "Session": [], + "Key": [], + "JWT": [] } + ] + } + }, + "\/locale\/countries\/phones": { + "get": { + "summary": "List countries phone codes", + "operationId": "localeListCountriesPhones", + "tags": [ + "locale" ], - "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": "<DEFAULT>", - "x-nullable": true - }, - "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", - "required" - ] + "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" + } } } } - } + }, + "deprecated": false, + "x-appwrite": { + "method": "listCountriesPhones", + "group": null, + "cookies": false, + "type": "", + "demo": "locale\/list-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/text\/{key}": { - "patch": { - "summary": "Update text attribute", - "operationId": "databasesUpdateTextAttribute", + "\/locale\/currencies": { + "get": { + "summary": "List currencies", + "operationId": "localeListCurrencies", "tags": [ - "databases" + "locale" ], - "description": "Update a text attribute. Changing the `default` value will not update already existing documents.\n", + "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": "AttributeText", + "description": "Currencies List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeText" + "$ref": "#\/components\/schemas\/currencyList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateTextAttribute", - "group": "attributes", + "method": "listCurrencies", + "group": null, "cookies": false, "type": "", - "demo": "databases\/update-text-attribute.md", + "demo": "locale\/list-currencies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-text-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "Session": [], + "Key": [], + "JWT": [] } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url": { - "post": { - "summary": "Create URL attribute", - "operationId": "databasesCreateUrlAttribute", + "\/locale\/languages": { + "get": { + "summary": "List languages", + "operationId": "localeListLanguages", "tags": [ - "databases" + "locale" ], - "description": "Create a URL attribute.\n", + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", "responses": { - "202": { - "description": "AttributeURL", + "200": { + "description": "Languages List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" + "$ref": "#\/components\/schemas\/languageList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createUrlAttribute", - "group": "attributes", + "method": "listLanguages", + "group": null, "cookies": false, "type": "", - "demo": "databases\/create-url-attribute.md", + "demo": "locale\/list-languages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "locale.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createUrlColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "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", - "format": "url", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } + "Session": [], + "Key": [], + "JWT": [] } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url\/{key}": { - "patch": { - "summary": "Update URL attribute", - "operationId": "databasesUpdateUrlAttribute", + "\/messaging\/messages": { + "get": { + "summary": "List messages", + "operationId": "messagingListMessages", "tags": [ - "databases" + "messaging" ], - "description": "Update an url attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Get a list of all messages from the current Appwrite project.", "responses": { "200": { - "description": "AttributeURL", + "description": "Message list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeUrl" + "$ref": "#\/components\/schemas\/messageList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateUrlAttribute", - "group": "attributes", + "method": "listMessages", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/update-url-attribute.md", + "demo": "messaging\/list-messages.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "messages.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateUrlColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "auth": { "Project": [], "Key": [] @@ -13987,112 +24908,81 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "required": false, "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Attribute Key.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "x-example": false, + "default": true }, - "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", - "format": "url", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Attribute Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" } - } + ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar": { + "\/messaging\/messages\/email": { "post": { - "summary": "Create varchar attribute", - "operationId": "databasesCreateVarcharAttribute", + "summary": "Create email", + "operationId": "messagingCreateEmail", "tags": [ - "databases" + "messaging" ], - "description": "Create a varchar attribute.\n", + "description": "Create a new email message.", "responses": { - "202": { - "description": "AttributeVarchar", + "201": { + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createVarcharAttribute", - "group": "attributes", + "method": "createEmail", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/create-varchar-attribute.md", + "demo": "messaging\/create-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "messages.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-varchar-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createVarcharColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "auth": { "Project": [], "Key": [] @@ -14104,73 +24994,108 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "key": { + "messageId": { "type": "string", - "description": "Attribute Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for varchar attributes, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "subject": { + "type": "string", + "description": "Email Subject.", + "x-example": "<SUBJECT>" }, - "default": { + "content": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", - "x-nullable": true + "description": "Email Content.", + "x-example": "<CONTENT>" }, - "array": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "draft": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Is message a draft", "default": false, "x-example": false }, - "encrypt": { + "html": { "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.", + "description": "Is content of type HTML", "default": false, "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } }, "required": [ - "key", - "size", - "required" + "messageId", + "subject", + "content" ] } } @@ -14178,48 +25103,44 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/varchar\/{key}": { + "\/messaging\/messages\/email\/{messageId}": { "patch": { - "summary": "Update varchar attribute", - "operationId": "databasesUpdateVarcharAttribute", + "summary": "Update email", + "operationId": "messagingUpdateEmail", "tags": [ - "databases" + "messaging" ], - "description": "Update a varchar attribute. Changing the `default` value will not update already existing documents.\n", + "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { - "description": "AttributeVarchar", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/attributeVarchar" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateVarcharAttribute", - "group": "attributes", + "method": "updateEmail", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/update-varchar-attribute.md", + "demo": "messaging\/update-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "messages.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-varchar-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateVarcharColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "auth": { "Project": [], "Key": [] @@ -14233,31 +25154,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<MESSAGE_ID>" }, "in": "path" } @@ -14268,242 +25170,136 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": false + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true }, - "default": { + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "subject": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "<DEFAULT>", + "description": "Email Subject.", + "x-example": "<SUBJECT>", "x-nullable": true }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar attribute.", - "x-example": 1, - "format": "int32", + "content": { + "type": "string", + "description": "Email Content.", + "x-example": "<CONTENT>", "x-nullable": true }, - "newKey": { + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "html": { + "type": "boolean", + "description": "Is content of type HTML", + "x-example": false, + "x-nullable": true + }, + "cc": { + "type": "array", + "description": "Array of target IDs to be added as CC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "bcc": { + "type": "array", + "description": "Array of target IDs to be added as BCC.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "scheduledAt": { "type": "string", - "description": "New Attribute Key.", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "attachments": { + "type": "array", + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", "x-example": null, + "items": { + "type": "string" + }, "x-nullable": true } - }, - "required": [ - "required", - "default" - ] + } } } } } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}": { - "get": { - "summary": "Get attribute", - "operationId": "databasesGetAttribute", + "\/messaging\/messages\/push": { + "post": { + "summary": "Create push notification", + "operationId": "messagingCreatePush", "tags": [ - "databases" + "messaging" ], - "description": "Get attribute by ID.", + "description": "Create a new push notification.", "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeDatetime, or AttributeRelationship, or AttributeString", + "201": { + "description": "Message", "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" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": true, - "x-appwrite": { - "method": "getAttribute", - "group": "attributes", - "cookies": false, - "type": "", - "demo": "databases\/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getColumn" - }, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete attribute", - "operationId": "databasesDeleteAttribute", - "tags": [ - "databases" - ], - "description": "Deletes an attribute.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteAttribute", - "group": "attributes", + "method": "createPush", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/delete-attribute.md", + "demo": "messaging\/create-push.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "messages.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "auth": { "Project": [], "Key": [] @@ -14515,178 +25311,377 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "default": "", + "x-example": "<TITLE>" + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "default": "", + "x-example": "<BODY>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "description": "Additional key-value pair data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "default": "", + "x-example": "<ACTION>" + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "default": "", + "x-example": "<ID1:ID2>" + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web Platform.", + "default": "", + "x-example": "<ICON>" + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS Platform.", + "default": "", + "x-example": "<SOUND>" + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<COLOR>" + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android Platform.", + "default": "", + "x-example": "<TAG>" + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null, + "format": "int32" + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [ + "normal", + "high" + ] + } + }, + "required": [ + "messageId" + ] + } + } } - ] + } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "databasesListDocuments", + "\/messaging\/messages\/push\/{messageId}": { + "patch": { + "summary": "Update push notification", + "operationId": "messagingUpdatePush", "tags": [ - "databases" + "messaging" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { "200": { - "description": "Documents List", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "updatePush", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/list-documents.md", + "demo": "messaging\/update-push.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "messages.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.listRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "topics": { + "type": "array", + "description": "List of Topic IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "title": { + "type": "string", + "description": "Title for push notification.", + "x-example": "<TITLE>", + "x-nullable": true + }, + "body": { + "type": "string", + "description": "Body for push notification.", + "x-example": "<BODY>", + "x-nullable": true + }, + "data": { + "type": "object", + "description": "Additional Data for push notification.", + "default": {}, + "x-example": "{}", + "x-nullable": true + }, + "action": { + "type": "string", + "description": "Action for push notification.", + "x-example": "<ACTION>", + "x-nullable": true + }, + "image": { + "type": "string", + "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", + "x-example": "<ID1:ID2>", + "x-nullable": true + }, + "icon": { + "type": "string", + "description": "Icon for push notification. Available only for Android and Web platforms.", + "x-example": "<ICON>", + "x-nullable": true + }, + "sound": { + "type": "string", + "description": "Sound for push notification. Available only for Android and iOS platforms.", + "x-example": "<SOUND>", + "x-nullable": true + }, + "color": { + "type": "string", + "description": "Color for push notification. Available only for Android platforms.", + "x-example": "<COLOR>", + "x-nullable": true + }, + "tag": { + "type": "string", + "description": "Tag for push notification. Available only for Android platforms.", + "x-example": "<TAG>", + "x-nullable": true + }, + "badge": { + "type": "integer", + "description": "Badge for push notification. Available only for iOS platforms.", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false, + "x-nullable": true + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [ + "normal", + "high" + ], + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/messages\/sms": { "post": { - "summary": "Create document", - "operationId": "databasesCreateDocument", + "summary": "Create SMS", + "operationId": "messagingCreateSms", "tags": [ - "databases" + "messaging" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Create a new SMS message.", "responses": { "201": { - "description": "Document", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/message" } } } @@ -14694,131 +25689,103 @@ }, "deprecated": true, "x-appwrite": { - "method": "createDocument", - "group": "documents", + "method": "createSms", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/create-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", "platforms": [ "console", - "client", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createRow" + "replaceWith": "messaging.createSMS" }, "methods": [ { - "name": "createDocument", - "namespace": "databases", - "desc": "Create document", + "name": "createSms", + "namespace": "messaging", + "desc": "", "auth": { "Project": [], - "Session": [] + "Key": [] }, "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" ], "required": [ - "databaseId", - "collectionId", - "documentId", - "data" + "messageId", + "content" ], "responses": [ { "code": 201, - "model": "#\/components\/schemas\/document" + "model": "#\/components\/schemas\/message" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-document.md", - "public": true, + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createRow" + "replaceWith": "messaging.createSMS" } }, { - "name": "createDocuments", - "namespace": "databases", - "desc": "Create documents", + "name": "createSMS", + "namespace": "messaging", + "desc": "", "auth": { "Project": [], "Key": [] }, "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" + "messageId", + "content", + "topics", + "users", + "targets", + "draft", + "scheduledAt" ], "required": [ - "databaseId", - "collectionId", - "documents" + "messageId", + "content" ], "responses": [ { "code": 201, - "model": "#\/components\/schemas\/documentList" + "model": "#\/components\/schemas\/message" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/create-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createRows" - } + "description": "Create a new SMS message.", + "demo": "messaging\/create-sms.md", + "public": true } ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -14827,65 +25794,85 @@ "schema": { "type": "object", "properties": { - "documentId": { + "messageId": { "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": "", - "x-example": "<DOCUMENT_ID>", + "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<MESSAGE_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, - "data": { - "type": "object", - "description": "Document data as JSON object.", + "content": { + "type": "string", + "description": "SMS Content.", + "x-example": "<CONTENT>" + }, + "topics": { + "type": "array", + "description": "List of Topic IDs.", "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + "x-example": null, + "items": { + "type": "string" + } }, - "permissions": { + "users": { "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "List of User IDs.", + "default": [], + "x-example": null, "items": { "type": "string" - }, - "x-nullable": true + } }, - "documents": { + "targets": { "type": "array", - "description": "Array of documents data as JSON objects.", + "description": "List of Targets IDs.", "default": [], "x-example": null, "items": { - "type": "object" + "type": "string" } }, - "transactionId": { + "draft": { + "type": "boolean", + "description": "Is message a draft", + "default": false, + "x-example": false + }, + "scheduledAt": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } - } + }, + "required": [ + "messageId", + "content" + ] } } } } - }, - "put": { - "summary": "Upsert documents", - "operationId": "databasesUpsertDocuments", + } + }, + "\/messaging\/messages\/sms\/{messageId}": { + "patch": { + "summary": "Update SMS", + "operationId": "messagingUpdateSms", "tags": [ - "databases" + "messaging" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", "responses": { - "201": { - "description": "Documents List", + "200": { + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/message" } } } @@ -14893,59 +25880,90 @@ }, "deprecated": true, "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", + "method": "updateSms", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/update-sms.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" + "replaceWith": "messaging.updateSMS" }, "methods": [ { - "name": "upsertDocuments", - "namespace": "databases", + "name": "updateSms", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" + ], + "required": [ + "messageId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/message" + } + ], + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMS" + } + }, + { + "name": "updateSMS", + "namespace": "messaging", "desc": "", "auth": { "Project": [], "Key": [] }, "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" + "messageId", + "topics", + "users", + "targets", + "content", + "draft", + "scheduledAt" ], "required": [ - "databaseId", - "collectionId", - "documents" + "messageId" ], "responses": [ { - "code": 201, - "model": "#\/components\/schemas\/documentList" + "code": 200, + "model": "#\/components\/schemas\/message" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", - "demo": "databases\/upsert-documents.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRows" - } + "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "demo": "messaging\/update-sms.md", + "public": true } ], "auth": { @@ -14961,22 +25979,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" } @@ -14987,70 +25995,97 @@ "schema": { "type": "object", "properties": { - "documents": { + "topics": { "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", + "description": "List of Topic IDs.", "x-example": null, "items": { - "type": "object" - } + "type": "string" + }, + "x-nullable": true }, - "transactionId": { + "users": { + "type": "array", + "description": "List of User IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "targets": { + "type": "array", + "description": "List of Targets IDs.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "content": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "Email Content.", + "x-example": "<CONTENT>", + "x-nullable": true + }, + "draft": { + "type": "boolean", + "description": "Is message a draft", + "x-example": false, + "x-nullable": true + }, + "scheduledAt": { + "type": "string", + "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } - }, - "required": [ - "documents" - ] + } } } } } - }, - "patch": { - "summary": "Update documents", - "operationId": "databasesUpdateDocuments", + } + }, + "\/messaging\/messages\/{messageId}": { + "get": { + "summary": "Get message", + "operationId": "messagingGetMessage", "tags": [ - "databases" + "messaging" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Get a message by its unique ID.\n", "responses": { "200": { - "description": "Documents List", + "description": "Message", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/message" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateDocuments", - "group": "documents", + "method": "getMessage", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/get-message.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "auth": { "Project": [], "Key": [] @@ -15064,100 +26099,47 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<MESSAGE_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.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } + ] }, "delete": { - "summary": "Delete documents", - "operationId": "databasesDeleteDocuments", + "summary": "Delete message", + "operationId": "messagingDelete", "tags": [ - "databases" + "messaging" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", + "method": "delete", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "messages.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRows" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "auth": { "Project": [], "Key": [] @@ -15171,141 +26153,81 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/messaging\/messages\/{messageId}\/targets": { "get": { - "summary": "Get document", - "operationId": "databasesGetDocument", + "summary": "List message targets", + "operationId": "messagingListTargets", "tags": [ - "databases" + "messaging" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Get a list of the targets associated with a message.", "responses": { "200": { - "description": "Document", + "description": "Target list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/targetList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "listTargets", + "group": "messages", "cookies": false, "type": "", - "demo": "databases\/get-document.md", + "demo": "messaging\/list-targets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "messages.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getRow" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "messageId", + "description": "Message ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<MESSAGE_ID>" }, "in": "path" }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", "required": false, "schema": { "type": "array", @@ -15317,191 +26239,122 @@ "in": "query" }, { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "databasesUpsertDocument", + } + }, + "\/messaging\/providers": { + "get": { + "summary": "List providers", + "operationId": "messagingListProviders", "tags": [ - "databases" + "messaging" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "Get a list of all providers from the current Appwrite project.", "responses": { - "201": { - "description": "Document", + "200": { + "description": "Provider list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/providerList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "listProviders", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/list-providers.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - }, - "methods": [ - { - "name": "upsertDocument", - "namespace": "databases", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", - "demo": "databases\/upsert-document.md", - "public": true, - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.upsertRow" - } - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", + "required": false, "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "documentId", - "description": "Document ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<DOCUMENT_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } + "in": "query" } - } - }, - "patch": { - "summary": "Update document", - "operationId": "databasesUpdateDocument", + ] + } + }, + "\/messaging\/providers\/apns": { + "post": { + "summary": "Create APNS provider", + "operationId": "messagingCreateApnsProvider", "tags": [ - "databases" + "messaging" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Create a new Apple Push Notification service provider.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/provider" } } } @@ -15509,70 +26362,105 @@ }, "deprecated": true, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createApnsProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/create-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", "platforms": [ "console", - "client", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.updateRow" + "replaceWith": "messaging.createAPNSProvider" }, + "methods": [ + { + "name": "createApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createAPNSProvider" + } + }, + { + "name": "createAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Apple Push Notification service provider.", + "demo": "messaging\/create-apns-provider.md", + "public": true + } + ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -15581,140 +26469,81 @@ "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": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" }, - "transactionId": { + "authKey": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, "x-nullable": true } - } + }, + "required": [ + "providerId", + "name" + ] } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "databasesDeleteDocument", - "tags": [ - "databases" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": true, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "databases\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteRow" - }, - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - } - ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + "\/messaging\/providers\/apns\/{providerId}": { "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "summary": "Update APNS provider", + "operationId": "messagingUpdateApnsProvider", "tags": [ - "databases" + "messaging" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Update a Apple Push Notification service provider by its unique ID.", "responses": { "200": { - "description": "Document", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/provider" } } } @@ -15722,77 +26551,113 @@ }, "deprecated": true, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "updateApnsProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/update-apns-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.decrementRowColumn" + "replaceWith": "messaging.updateAPNSProvider" }, + "methods": [ + { + "name": "updateApnsProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateAPNSProvider" + } + }, + { + "name": "updateAPNSProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "authKey", + "authKeyId", + "teamId", + "bundleId", + "sandbox" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Apple Push Notification service provider by its unique ID.", + "demo": "messaging\/update-apns-provider.md", + "public": true + } + ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -15803,24 +26668,46 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, "x-nullable": true }, - "transactionId": { + "authKey": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "APNS authentication key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "authKeyId": { + "type": "string", + "description": "APNS authentication key ID.", + "default": "", + "x-example": "<AUTH_KEY_ID>" + }, + "teamId": { + "type": "string", + "description": "APNS team ID.", + "default": "", + "x-example": "<TEAM_ID>" + }, + "bundleId": { + "type": "string", + "description": "APNS bundle ID.", + "default": "", + "x-example": "<BUNDLE_ID>" + }, + "sandbox": { + "type": "boolean", + "description": "Use APNS sandbox environment.", + "x-example": false, "x-nullable": true } } @@ -15830,21 +26717,21 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "\/messaging\/providers\/fcm": { + "post": { + "summary": "Create FCM provider", + "operationId": "messagingCreateFcmProvider", "tags": [ - "databases" + "messaging" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Create a new Firebase Cloud Messaging provider.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/provider" } } } @@ -15852,129 +26739,157 @@ }, "deprecated": true, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "createFcmProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/create-fcm-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.incrementRowColumn" + "replaceWith": "messaging.createFCMProvider" }, + "methods": [ + { + "name": "createFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createFCMProvider" + } + }, + { + "name": "createFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "serviceAccountJSON", + "enabled" + ], + "required": [ + "providerId", + "name" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new Firebase Cloud Messaging provider.", + "demo": "messaging\/create-fcm-provider.md", + "public": true + } + ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", "x-nullable": true }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, "x-nullable": true } - } + }, + "required": [ + "providerId", + "name" + ] } } } } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "databasesListIndexes", + "\/messaging\/providers\/fcm\/{providerId}": { + "patch": { + "summary": "Update FCM provider", + "operationId": "messagingUpdateFcmProvider", "tags": [ - "databases" + "messaging" ], - "description": "List indexes in the collection.", + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", "responses": { "200": { - "description": "Indexes List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/indexList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -15982,26 +26897,86 @@ }, "deprecated": true, "x-appwrite": { - "method": "listIndexes", - "group": "indexes", + "method": "updateFcmProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/list-indexes.md", + "demo": "messaging\/update-fcm-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.listIndexes" + "replaceWith": "messaging.updateFCMProvider" }, + "methods": [ + { + "name": "updateFcmProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateFCMProvider" + } + }, + { + "name": "updateFCMProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "enabled", + "serviceAccountJSON" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "demo": "messaging\/update-fcm-provider.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -16015,92 +26990,86 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "serviceAccountJSON": { + "type": "object", + "description": "FCM service account JSON.", + "default": {}, + "x-example": "{}", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/mailgun": { "post": { - "summary": "Create index", - "operationId": "databasesCreateIndex", + "summary": "Create Mailgun provider", + "operationId": "messagingCreateMailgunProvider", "tags": [ - "databases" + "messaging" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Create a new Mailgun provider.", "responses": { - "202": { - "description": "Index", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createIndex", - "group": "indexes", + "method": "createMailgunProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/create-index.md", + "demo": "messaging\/create-mailgun-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.createIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "auth": { "Project": [], "Key": [] @@ -16112,146 +27081,124 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "key": { + "providerId": { "type": "string", - "description": "Index Key.", - "x-example": null + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "type": { + "name": { "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "DatabasesIndexType", - "x-enum-keys": [ - "key", - "fulltext", - "unique", - "spatial" - ] + "description": "Provider name.", + "x-example": "<NAME>" }, - "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" - } + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" }, - "orders": { - "type": "array", - "description": "Array of index orders. Maximum of 100 orders are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] - } + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "key", - "type", - "attributes" + "providerId", + "name" ] } } } - } - } - }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "databasesGetIndex", + } + } + }, + "\/messaging\/providers\/mailgun\/{providerId}": { + "patch": { + "summary": "Update Mailgun provider", + "operationId": "messagingUpdateMailgunProvider", "tags": [ - "databases" + "messaging" ], - "description": "Get an index by its unique ID.", + "description": "Update a Mailgun provider by its unique ID.", "responses": { "200": { - "description": "Index", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getIndex", - "group": "indexes", + "method": "updateMailgunProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/get-index.md", + "demo": "messaging\/update-mailgun-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.getIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "auth": { "Project": [], "Key": [] @@ -16265,70 +27212,122 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<PROVIDER_ID>" }, "in": "path" } - ] - }, - "delete": { - "summary": "Delete index", - "operationId": "databasesDeleteIndex", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Mailgun API Key.", + "default": "", + "x-example": "<API_KEY>" + }, + "domain": { + "type": "string", + "description": "Mailgun Domain.", + "default": "", + "x-example": "<DOMAIN>" + }, + "isEuRegion": { + "type": "boolean", + "description": "Set as EU region.", + "x-example": false, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/msg91": { + "post": { + "summary": "Create Msg91 provider", + "operationId": "messagingCreateMsg91Provider", "tags": [ - "databases" + "messaging" ], - "description": "Delete an index.", + "description": "Create a new MSG91 provider.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", + "method": "createMsg91Provider", + "group": "providers", "cookies": false, "type": "", - "demo": "databases\/delete-index.md", + "demo": "messaging\/create-msg-91-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.deleteIndex" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "auth": { "Project": [], "Key": [] @@ -16340,54 +27339,75 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] + } } }, - "\/documentsdb": { - "get": { - "summary": "List databases", - "operationId": "documentsDBList", + "\/messaging\/providers\/msg91\/{providerId}": { + "patch": { + "summary": "Update Msg91 provider", + "operationId": "messagingUpdateMsg91Provider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "Update a MSG91 provider by its unique ID.", "responses": { "200": { - "description": "Databases List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16395,22 +27415,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "documentsdb", + "method": "updateMsg91Provider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/list.md", + "demo": "messaging\/update-msg-91-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "auth": { "Project": [], "Key": [] @@ -16424,45 +27444,74 @@ ], "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 columns: name", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "providerId", + "description": "Provider ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<PROVIDER_ID>" }, - "in": "query" + "in": "path" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "templateId": { + "type": "string", + "description": "Msg91 template ID.", + "default": "", + "x-example": "<TEMPLATE_ID>" + }, + "senderId": { + "type": "string", + "description": "Msg91 sender ID.", + "default": "", + "x-example": "<SENDER_ID>" + }, + "authKey": { + "type": "string", + "description": "Msg91 auth key.", + "default": "", + "x-example": "<AUTH_KEY>" + } + } + } + } + } + } + } + }, + "\/messaging\/providers\/resend": { "post": { - "summary": "Create database", - "operationId": "documentsDBCreate", + "summary": "Create Resend provider", + "operationId": "messagingCreateResendProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Create a new Database.\n", + "description": "Create a new Resend provider.", "responses": { "201": { - "description": "Database", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16470,22 +27519,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "documentsdb", + "method": "createResendProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/create.md", + "demo": "messaging\/create-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -16503,37 +27552,60 @@ "schema": { "type": "object", "properties": { - "databaseId": { + "providerId": { "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>", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, "name": { "type": "string", - "description": "Database name. Max length: 128 chars.", + "description": "Provider name.", "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 + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" }, - "dedicatedDatabaseId": { + "fromName": { "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", + "description": "Sender Name.", "default": "", - "x-example": "<DEDICATED_DATABASE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "databaseId", + "providerId", "name" ] } @@ -16542,21 +27614,21 @@ } } }, - "\/documentsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "documentsDBListTransactions", + "\/messaging\/providers\/resend\/{providerId}": { + "patch": { + "summary": "Update Resend provider", + "operationId": "messagingUpdateResendProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "List transactions across all databases.", + "description": "Update a Resend provider by its unique ID.", "responses": { "200": { - "description": "Transaction List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16564,23 +27636,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "updateResendProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/list-transactions.md", + "demo": "messaging\/update-resend-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "providers.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -16588,77 +27659,20 @@ }, "security": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create transaction", - "operationId": "documentsDBCreateTransaction", - "tags": [ - "documentsDB" - ], - "description": "Create a new transaction.", - "responses": { - "201": { - "description": "Transaction", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transaction" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createTransaction", - "group": "transactions", - "cookies": false, - "type": "", - "demo": "documentsdb\/create-transaction.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": [ - "console", - "server", - "client" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-transaction.md", - "auth": { "Project": [], "Key": [] - } - }, - "security": [ + } + ], + "parameters": [ { - "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "name": "providerId", + "description": "Provider ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROVIDER_ID>" + }, + "in": "path" } ], "requestBody": { @@ -16667,12 +27681,48 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Resend API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" } } } @@ -16681,21 +27731,21 @@ } } }, - "\/documentsdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "documentsDBGetTransaction", + "\/messaging\/providers\/sendgrid": { + "post": { + "summary": "Create Sendgrid provider", + "operationId": "messagingCreateSendgridProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a transaction by its unique ID.", + "description": "Create a new Sendgrid provider.", "responses": { - "200": { - "description": "Transaction", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16703,23 +27753,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "createSendgridProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/get-transaction.md", + "demo": "messaging\/create-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "providers.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "auth": { "Project": [], "Key": [] @@ -16728,38 +27777,92 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] - }, + } + } + }, + "\/messaging\/providers\/sendgrid\/{providerId}": { "patch": { - "summary": "Update transaction", - "operationId": "documentsDBUpdateTransaction", + "summary": "Update Sendgrid provider", + "operationId": "messagingUpdateSendgridProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Update a Sendgrid provider by its unique ID.", "responses": { "200": { - "description": "Transaction", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16767,23 +27870,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "updateSendgridProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/update-transaction.md", + "demo": "messaging\/update-sendgrid-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "providers.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "auth": { "Project": [], "Key": [] @@ -16792,19 +27894,17 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -16815,55 +27915,94 @@ "schema": { "type": "object", "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "rollback": { + "enabled": { "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "apiKey": { + "type": "string", + "description": "Sendgrid API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" } } } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "documentsDBDeleteTransaction", + } + }, + "\/messaging\/providers\/ses": { + "post": { + "summary": "Create Amazon SES provider", + "operationId": "messagingCreateSesProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Delete a transaction by its unique ID.", + "description": "Create a new Amazon SES provider.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "createSesProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/delete-transaction.md", + "demo": "messaging\/create-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "providers.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -16872,40 +28011,104 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "<SECRET_KEY>" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "<REGION>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] + } } }, - "\/documentsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "documentsDBCreateOperations", + "\/messaging\/providers\/ses\/{providerId}": { + "patch": { + "summary": "Update Amazon SES provider", + "operationId": "messagingUpdateSesProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Create multiple operations in a single transaction.", + "description": "Update an Amazon SES provider by its unique ID.", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/provider" } } } @@ -16913,22 +28116,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "updateSesProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/create-operations.md", + "demo": "messaging\/update-ses-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "providers.write", "platforms": [ - "server", - "client" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -16937,19 +28140,17 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -16960,14 +28161,60 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + }, + "accessKey": { + "type": "string", + "description": "AWS access key ID.", + "default": "", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "AWS secret access key.", + "default": "", + "x-example": "<SECRET_KEY>" + }, + "region": { + "type": "string", + "description": "AWS region, for example us-east-1.", + "default": "", + "x-example": "<REGION>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" } } } @@ -16976,44 +28223,132 @@ } } }, - "\/documentsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "documentsDBGet", + "\/messaging\/providers\/smtp": { + "post": { + "summary": "Create SMTP provider", + "operationId": "messagingCreateSmtpProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Create a new SMTP provider.", "responses": { - "200": { - "description": "Database", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "get", - "group": "documentsdb", + "method": "createSmtpProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/get.md", + "demo": "messaging\/create-smtp-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + }, + "methods": [ + { + "name": "createSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.createSMTPProvider" + } + }, + { + "name": "createSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId", + "name", + "host" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Create a new SMTP provider.", + "demo": "messaging\/create-smtp-provider.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -17025,56 +28360,244 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "The default SMTP server port.", + "default": 587, + "x-example": 1, + "format": "int32" + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "password", + "format": "password" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [ + "none", + "ssl", + "tls" + ] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "default": true, + "x-example": false + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the reply to field for the mail. Default value is sender name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the reply to field for the mail. Default value is sender email.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name", + "host" + ] + } + } } - ] - }, - "put": { - "summary": "Update database", - "operationId": "documentsDBUpdate", + } + } + }, + "\/messaging\/providers\/smtp\/{providerId}": { + "patch": { + "summary": "Update SMTP provider", + "operationId": "messagingUpdateSmtpProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Update a database by its unique ID.", + "description": "Update a SMTP provider by its unique ID.", "responses": { "200": { - "description": "Database", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/provider" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "update", - "group": "documentsdb", + "method": "updateSmtpProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/update.md", + "demo": "messaging\/update-smtp-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update.md", + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + }, + "methods": [ + { + "name": "updateSmtpProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "messaging.updateSMTPProvider" + } + }, + { + "name": "updateSMTPProvider", + "namespace": "messaging", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "providerId", + "name", + "host", + "port", + "username", + "password", + "encryption", + "autoTLS", + "mailer", + "fromName", + "fromEmail", + "replyToName", + "replyToEmail", + "enabled" + ], + "required": [ + "providerId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/provider" + } + ], + "description": "Update a SMTP provider by its unique ID.", + "demo": "messaging\/update-smtp-provider.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -17088,12 +28611,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -17106,94 +28629,117 @@ "properties": { "name": { "type": "string", - "description": "Database name. Max length: 128 chars.", + "description": "Provider name.", + "default": "", "x-example": "<NAME>" }, + "host": { + "type": "string", + "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", + "default": "", + "x-example": "<HOST>" + }, + "port": { + "type": "integer", + "description": "SMTP port.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "username": { + "type": "string", + "description": "Authentication username.", + "default": "", + "x-example": "<USERNAME>" + }, + "password": { + "type": "string", + "description": "Authentication password.", + "default": "", + "x-example": "password", + "format": "password" + }, + "encryption": { + "type": "string", + "description": "Encryption type. Can be 'ssl' or 'tls'", + "x-example": "none", + "enum": [ + "none", + "ssl", + "tls" + ], + "x-enum-name": "SmtpEncryption", + "x-enum-keys": [ + "none", + "ssl", + "tls" + ] + }, + "autoTLS": { + "type": "boolean", + "description": "Enable SMTP AutoTLS feature.", + "x-example": false, + "x-nullable": true + }, + "mailer": { + "type": "string", + "description": "The value to use for the X-Mailer header.", + "default": "", + "x-example": "<MAILER>" + }, + "fromName": { + "type": "string", + "description": "Sender Name.", + "default": "", + "x-example": "<FROM_NAME>" + }, + "fromEmail": { + "type": "string", + "description": "Sender email address.", + "default": "", + "x-example": "email@example.com", + "format": "email" + }, + "replyToName": { + "type": "string", + "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "default": "", + "x-example": "<REPLY_TO_NAME>" + }, + "replyToEmail": { + "type": "string", + "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", + "default": "", + "x-example": "<REPLY_TO_EMAIL>" + }, "enabled": { "type": "boolean", - "description": "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 + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "name" - ] + } } } } } - }, - "delete": { - "summary": "Delete database", - "operationId": "documentsDBDelete", - "tags": [ - "documentsDB" - ], - "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" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "documentsdb", - "cookies": false, - "type": "", - "demo": "documentsdb\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ] } }, - "\/documentsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "documentsDBListCollections", + "\/messaging\/providers\/telesign": { + "post": { + "summary": "Create Telesign provider", + "operationId": "messagingCreateTelesignProvider", "tags": [ - "documentsDB" + "messaging" ], - "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", + "description": "Create a new Telesign provider.", + "responses": { + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collectionList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17201,22 +28747,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "createTelesignProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/list-collections.md", + "demo": "messaging\/create-telesign-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "auth": { "Project": [], "Key": [] @@ -17228,68 +28774,76 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" + }, + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] - }, - "post": { - "summary": "Create collection", - "operationId": "documentsDBCreateCollection", + } + } + }, + "\/messaging\/providers\/telesign\/{providerId}": { + "patch": { + "summary": "Update Telesign provider", + "operationId": "messagingUpdateTelesignProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Update a Telesign provider by its unique ID.", "responses": { - "201": { - "description": "Collection", + "200": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17297,22 +28851,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "updateTelesignProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/create-collection.md", + "demo": "messaging\/update-telesign-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "auth": { "Project": [], "Key": [] @@ -17326,12 +28880,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -17342,84 +28896,58 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, "name": { "type": "string", - "description": "Collection name. Max length: 128 chars.", + "description": "Provider name.", + "default": "", "x-example": "<NAME>" }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, "enabled": { "type": "boolean", - "description": "Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.", - "default": true, - "x-example": false + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "attributes": { - "type": "array", - "description": "Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } + "customerId": { + "type": "string", + "description": "Telesign customer ID.", + "default": "", + "x-example": "<CUSTOMER_ID>" }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], - "x-example": null, - "items": { - "type": "object" - } + "apiKey": { + "type": "string", + "description": "Telesign API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" } - }, - "required": [ - "collectionId", - "name" - ] + } } } } } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "documentsDBGetCollection", + "\/messaging\/providers\/textmagic": { + "post": { + "summary": "Create Textmagic provider", + "operationId": "messagingCreateTextmagicProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "description": "Create a new Textmagic provider.", "responses": { - "200": { - "description": "Collection", + "201": { + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17427,22 +28955,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCollection", - "group": "collections", + "method": "createTextmagicProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/get-collection.md", + "demo": "messaging\/create-textmagic-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "auth": { "Project": [], "Key": [] @@ -17454,43 +28982,76 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "documentsDBUpdateCollection", + } + } + }, + "\/messaging\/providers\/textmagic\/{providerId}": { + "patch": { + "summary": "Update Textmagic provider", + "operationId": "messagingUpdateTextmagicProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Update a collection by its unique ID.", + "description": "Update a Textmagic provider by its unique ID.", "responses": { "200": { - "description": "Collection", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/collection" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17498,22 +29059,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateCollection", - "group": "collections", + "method": "updateTextmagicProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/update-collection.md", + "demo": "messaging\/update-textmagic-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "auth": { "Project": [], "Key": [] @@ -17527,22 +29088,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -17555,74 +29106,79 @@ "properties": { "name": { "type": "string", - "description": "Collection name. Max length: 128 chars.", + "description": "Provider name.", + "default": "", "x-example": "<NAME>" }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "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 + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false + "username": { + "type": "string", + "description": "Textmagic username.", + "default": "", + "x-example": "<USERNAME>" + }, + "apiKey": { + "type": "string", + "description": "Textmagic apiKey.", + "default": "", + "x-example": "<API_KEY>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" } - }, - "required": [ - "name" - ] + } } } } } - }, - "delete": { - "summary": "Delete collection", - "operationId": "documentsDBDeleteCollection", + } + }, + "\/messaging\/providers\/twilio": { + "post": { + "summary": "Create Twilio provider", + "operationId": "messagingCreateTwilioProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Create a new Twilio provider.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Provider", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/provider" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteCollection", - "group": "collections", + "method": "createTwilioProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/delete-collection.md", + "demo": "messaging\/create-twilio-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "auth": { "Project": [], "Key": [] @@ -17634,45 +29190,76 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" + }, + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "providerId", + "name" + ] + } + } } - ] + } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "documentsDBListDocuments", + "\/messaging\/providers\/twilio\/{providerId}": { + "patch": { + "summary": "Update Twilio provider", + "operationId": "messagingUpdateTwilioProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "Update a Twilio provider by its unique ID.", "responses": { "200": { - "description": "Documents List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17680,235 +29267,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "updateTwilioProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/list-documents.md", + "demo": "messaging\/update-twilio-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-documents.md", - "auth": { - "Project": [], - "Session": [] - } - }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create document", - "operationId": "documentsDBCreateDocument", - "tags": [ - "documentsDB" - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "documentsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "providers.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "documentsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "documentsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/create-documents.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -17919,63 +29312,58 @@ "schema": { "type": "object", "properties": { - "documentId": { + "name": { "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.", + "description": "Provider name.", "default": "", - "x-example": "<DOCUMENT_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "x-example": "<NAME>" }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "accountSid": { + "type": "string", + "description": "Twilio account secret ID.", + "default": "", + "x-example": "<ACCOUNT_SID>" }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } + "authToken": { + "type": "string", + "description": "Twilio authentication token.", + "default": "", + "x-example": "<AUTH_TOKEN>" }, - "transactionId": { + "from": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" } } } } } } - }, - "put": { - "summary": "Upsert documents", - "operationId": "documentsDBUpsertDocuments", + } + }, + "\/messaging\/providers\/vonage": { + "post": { + "summary": "Create Vonage provider", + "operationId": "messagingCreateVonageProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "description": "Create a new Vonage provider.", "responses": { "201": { - "description": "Documents List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -17983,53 +29371,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", + "method": "createVonageProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/create-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "documentsdb\/upsert-documents.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "auth": { "Project": [], "Key": [] @@ -18041,70 +29398,76 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" + "providerId": { + "type": "string", + "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PROVIDER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "transactionId": { + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Provider name.", + "x-example": "<NAME>" + }, + "from": { + "type": "string", + "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "apiKey": { + "type": "string", + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true } }, "required": [ - "documents" + "providerId", + "name" ] } } } } - }, + } + }, + "\/messaging\/providers\/vonage\/{providerId}": { "patch": { - "summary": "Update documents", - "operationId": "documentsDBUpdateDocuments", + "summary": "Update Vonage provider", + "operationId": "messagingUpdateVonageProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Update a Vonage provider by its unique ID.", "responses": { "200": { - "description": "Documents List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -18112,22 +29475,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocuments", - "group": "documents", + "method": "updateVonageProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/update-vonage-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "auth": { "Project": [], "Key": [] @@ -18141,22 +29504,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" } @@ -18167,46 +29520,58 @@ "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": "{}" + "name": { + "type": "string", + "description": "Provider name.", + "default": "", + "x-example": "<NAME>" }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "enabled": { + "type": "boolean", + "description": "Set as enabled.", + "x-example": false, + "x-nullable": true }, - "transactionId": { + "apiKey": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Vonage API key.", + "default": "", + "x-example": "<API_KEY>" + }, + "apiSecret": { + "type": "string", + "description": "Vonage API secret.", + "default": "", + "x-example": "<API_SECRET>" + }, + "from": { + "type": "string", + "description": "Sender number.", + "default": "", + "x-example": "<FROM>" } } } } } } - }, - "delete": { - "summary": "Delete documents", - "operationId": "documentsDBDeleteDocuments", + } + }, + "\/messaging\/providers\/{providerId}": { + "get": { + "summary": "Get provider", + "operationId": "messagingGetProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Get a provider by its unique ID.\n", "responses": { "200": { - "description": "Documents List", + "description": "Provider", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/provider" } } } @@ -18214,22 +29579,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", + "method": "getProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/get-provider.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "providers.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "auth": { "Project": [], "Key": [] @@ -18243,173 +29608,87 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { - "get": { - "summary": "Get document", - "operationId": "documentsDBGetDocument", + }, + "delete": { + "summary": "Delete provider", + "operationId": "messagingDeleteProvider", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Delete a provider by its unique ID.", "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "deleteProvider", + "group": "providers", "cookies": false, "type": "", - "demo": "documentsdb\/get-document.md", + "demo": "messaging\/delete-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "providers.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "providerId", + "description": "Provider ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<PROVIDER_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] - }, - "put": { - "summary": "Upsert a document", - "operationId": "documentsDBUpsertDocument", + } + }, + "\/messaging\/topics": { + "get": { + "summary": "List topics", + "operationId": "messagingListTopics", "tags": [ - "documentsDB" + "messaging" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Get a list of all topics from the current Appwrite project.", "responses": { - "201": { - "description": "Document", + "200": { + "description": "Topic list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/topicList" } } } @@ -18417,146 +29696,85 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "listTopics", + "group": "topics", "cookies": false, "type": "", - "demo": "documentsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/list-topics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "documentsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "documentsdb\/upsert-document.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "required": false, "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "collectionId", - "description": "Collection ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "documentId", - "description": "Document ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } + "in": "query" } - } + ] }, - "patch": { - "summary": "Update document", - "operationId": "documentsDBUpdateDocument", + "post": { + "summary": "Create topic", + "operationId": "messagingCreateTopic", "tags": [ - "documentsDB" + "messaging" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Create a new topic.", "responses": { - "200": { - "description": "Document", + "201": { + "description": "Topic", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/topic" } } } @@ -18564,66 +29782,31 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "createTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "documentsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/create-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/update-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -18632,134 +29815,117 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" + "topicId": { + "type": "string", + "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", + "x-example": "<TOPIC_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "permissions": { + "name": { + "type": "string", + "description": "Topic Name.", + "x-example": "<NAME>" + }, + "subscribe": { "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "default": [ + "users" + ], + "x-example": "[\"any\"]", "items": { "type": "string" } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" } - } + }, + "required": [ + "topicId", + "name" + ] } } } } - }, - "delete": { - "summary": "Delete document", - "operationId": "documentsDBDeleteDocument", + } + }, + "\/messaging\/topics\/{topicId}": { + "get": { + "summary": "Get topic", + "operationId": "messagingGetTopic", "tags": [ - "documentsDB" + "messaging" ], - "description": "Delete a document by its unique ID.", + "description": "Get a topic by its unique ID.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Topic", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/topic" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDocument", - "group": "documents", + "method": "getTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "documentsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/get-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { + }, "patch": { - "summary": "Decrement document attribute", - "operationId": "documentsDBDecrementDocumentAttribute", + "summary": "Update topic", + "operationId": "messagingUpdateTopic", "tags": [ - "documentsDB" + "messaging" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Update a topic by its unique ID.\n", "responses": { "200": { - "description": "Document", + "description": "Topic", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/topic" } } } @@ -18767,73 +29933,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", + "method": "updateTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "documentsdb\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/update-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/decrement-document-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<TOPIC_ID>" }, "in": "path" } @@ -18844,170 +29978,97 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Topic Name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "subscribe": { + "type": "array", + "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", + "x-example": "[\"any\"]", + "items": { + "type": "string" + }, + "x-nullable": true } } } } } } - } - }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "documentsDBIncrementDocumentAttribute", + }, + "delete": { + "summary": "Delete topic", + "operationId": "messagingDeleteTopic", "tags": [ - "documentsDB" + "messaging" ], - "description": "Increment a specific column of a row by a given value.", + "description": "Delete a topic by its unique ID.", "responses": { - "200": { - "description": "Document", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/document" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", + "method": "deleteTopic", + "group": "topics", "cookies": false, "type": "", - "demo": "documentsdb\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "messaging\/delete-topic.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "topics.write", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/increment-document-attribute.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "topicId", + "description": "Topic ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" - }, - "in": "path" - }, - { - "name": "attribute", - "description": "Attribute key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<TOPIC_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float" - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } + ] } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { + "\/messaging\/topics\/{topicId}\/subscribers": { "get": { - "summary": "List indexes", - "operationId": "documentsDBListIndexes", + "summary": "List subscribers", + "operationId": "messagingListSubscribers", "tags": [ - "documentsDB" + "messaging" ], - "description": "List indexes in the collection.", + "description": "Get a list of all subscribers from the current Appwrite project.", "responses": { "200": { - "description": "Indexes List", + "description": "Subscriber list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/indexList" + "$ref": "#\/components\/schemas\/subscriberList" } } } @@ -19015,22 +30076,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIndexes", - "group": "indexes", + "method": "listSubscribers", + "group": "subscribers", "cookies": false, "type": "", - "demo": "documentsdb\/list-indexes.md", + "demo": "messaging\/list-subscribers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "subscribers.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "auth": { "Project": [], "Key": [] @@ -19044,28 +30105,18 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", "required": false, "schema": { "type": "array", @@ -19076,6 +30127,17 @@ }, "in": "query" }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -19090,19 +30152,19 @@ ] }, "post": { - "summary": "Create index", - "operationId": "documentsDBCreateIndex", + "summary": "Create subscriber", + "operationId": "messagingCreateSubscriber", "tags": [ - "documentsDB" + "messaging" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Create a new subscriber.", "responses": { - "202": { - "description": "Index", + "201": { + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -19110,51 +30172,44 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIndex", - "group": "indexes", + "method": "createSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "documentsdb\/create-index.md", + "demo": "messaging\/create-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "subscribers.write", "platforms": [ - "console", - "server" + "server", + "client", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [], - "Key": [] + "JWT": [] } }, "security": [ { "Project": [], + "JWT": [], + "Session": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "topicId", + "description": "Topic ID. The topic ID to subscribe to.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" } @@ -19165,67 +30220,23 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": null - }, - "type": { + "subscriberId": { "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique" - ], - "x-enum-name": "DocumentsDBIndexType", - "x-enum-keys": [ - "key", - "fulltext", - "unique" - ] - }, - "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.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] + "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", + "x-example": "<SUBSCRIBER_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } + "targetId": { + "type": "string", + "description": "Target ID. The target ID to link to the specified Topic ID.", + "x-example": "<TARGET_ID>" } }, "required": [ - "key", - "type", - "attributes" + "subscriberId", + "targetId" ] } } @@ -19233,21 +30244,21 @@ } } }, - "\/documentsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { "get": { - "summary": "Get index", - "operationId": "documentsDBGetIndex", + "summary": "Get subscriber", + "operationId": "messagingGetSubscriber", "tags": [ - "documentsDB" + "messaging" ], - "description": "Get index by ID.", + "description": "Get a subscriber by its unique ID.\n", "responses": { "200": { - "description": "Index", + "description": "Subscriber", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/index" + "$ref": "#\/components\/schemas\/subscriber" } } } @@ -19255,22 +30266,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getIndex", - "group": "indexes", + "method": "getSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "documentsdb\/get-index.md", + "demo": "messaging\/get-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "subscribers.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "auth": { "Project": [], "Key": [] @@ -19284,43 +30295,34 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "subscriberId", + "description": "Subscriber ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<SUBSCRIBER_ID>" }, "in": "path" } ] }, "delete": { - "summary": "Delete index", - "operationId": "documentsDBDeleteIndex", + "summary": "Delete subscriber", + "operationId": "messagingDeleteSubscriber", "tags": [ - "documentsDB" + "messaging" ], - "description": "Delete an index.", + "description": "Delete a subscriber by its unique ID.", "responses": { "204": { "description": "No content" @@ -19328,81 +30330,75 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", + "method": "deleteSubscriber", + "group": "subscribers", "cookies": false, "type": "", - "demo": "documentsdb\/delete-index.md", + "demo": "messaging\/delete-subscriber.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "subscribers.write", "platforms": [ - "console", - "server" + "server", + "client", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/documentsdb\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [], - "Key": [] + "JWT": [] } }, "security": [ { "Project": [], + "JWT": [], + "Session": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "topicId", + "description": "Topic ID. The topic ID subscribed to.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TOPIC_ID>" }, "in": "path" }, { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "name": "subscriberId", + "description": "Subscriber ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<SUBSCRIBER_ID>" }, "in": "path" } ] } }, - "\/functions": { + "\/mongo": { "get": { - "summary": "List functions", - "operationId": "functionsList", + "summary": "List databases", + "operationId": "mongoList", "tags": [ - "functions" + "mongo" ], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "description": "List all dedicated databases. Results support pagination.", "responses": { "200": { - "description": "Functions List", + "description": "Dedicated databases list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/functionList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" } } } @@ -19411,14 +30407,14 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "functions", + "group": "mongo", "cookies": false, "type": "", - "demo": "functions\/list.md", + "demo": "mongo\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -19439,55 +30435,33 @@ "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, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId", + "description": "Array of query strings.", "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + }, + "default": [] }, "in": "query" } ] }, "post": { - "summary": "Create function", - "operationId": "functionsCreate", + "summary": "Create database", + "operationId": "mongoCreate", "tags": [ - "functions" + "mongo" ], - "description": "Create a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", "responses": { "201": { - "description": "Function", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -19496,14 +30470,14 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "functions", + "group": "mongo", "cookies": false, "type": "", - "demo": "functions\/create.md", + "demo": "mongo\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -19527,552 +30501,839 @@ "schema": { "type": "object", "properties": { - "functionId": { + "databaseId": { "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>", + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { "idGenerator": "ID.unique" } }, "name": { "type": "string", - "description": "Function name. Max length: 128 chars.", + "description": "Database display name. Max length: 128 chars.", "x-example": "<NAME>" }, - "runtime": { + "version": { "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "Runtime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true }, - "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" - } + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" }, - "events": { + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "default": [], + "description": "IP addresses\/CIDR ranges allowed to connect.", "x-example": null, "items": { "type": "string" - } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null + }, + "x-nullable": true }, - "timeout": { + "idleTimeoutMinutes": { "type": "integer", - "description": "Function maximum execution time in seconds.", + "description": "Minutes of inactivity before container scales to zero.", "default": 15, - "x-example": 1, + "x-example": 5, "format": "int32" }, - "enabled": { + "pitr": { "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.", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", "default": true, "x-example": false }, - "logging": { + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { "type": "boolean", - "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, "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>" + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } + } + }, + "\/mongo\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "mongoListSpecifications", + "tags": [ + "mongo" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/mongo\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "mongoGet", + "tags": [ + "mongo" + ], + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update database", + "operationId": "mongoUpdate", + "tags": [ + "mongo" + ], + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true }, - "installationId": { + "status": { "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true }, - "providerRepositoryId": { + "specification": { "type": "string", - "description": "Repository ID of the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true }, - "providerBranch": { + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { "type": "string", - "description": "Production branch for the repo linked to the function.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true }, - "providerSilentMode": { + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { "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 + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true }, - "providerRootDirectory": { + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", + "x-example": false, + "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete database", + "operationId": "mongoDelete", + "tags": [ + "mongo" + ], + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/backups": { + "get": { + "summary": "List backups", + "operationId": "mongoListBackups", + "tags": [ + "mongo" + ], + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", + "responses": { + "200": { + "description": "BackupList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBackups", + "group": "backups", + "cookies": false, + "type": "", + "demo": "mongo\/list-backups.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup", + "operationId": "mongoCreateBackup", + "tags": [ + "mongo" + ], + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", + "responses": { + "202": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBackup", + "group": "backups", + "cookies": false, + "type": "", + "demo": "mongo\/create-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "mongoListBackupPolicies", + "tags": [ + "mongo" + ], + "description": "List scheduled backup policies for a dedicated database.", + "responses": { + "200": { + "description": "Backup policy list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBackupPolicies", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mongo\/list-backup-policies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "mongoCreateBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Create a scheduled backup policy for a dedicated database.", + "responses": { + "201": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mongo\/create-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { "type": "string", - "description": "Path to function code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "default": [], - "x-example": null, - "items": { - "type": "string" + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" } }, - "buildSpecification": { + "name": { "type": "string", - "description": "Build specification for the function deployments.", - "default": {}, - "x-example": null + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "runtimeSpecification": { + "schedule": { "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, + "description": "Schedule CRON syntax.", "x-example": null }, - "deploymentRetention": { + "retention": { "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, + "description": "Days to keep backups before deletion.", + "x-example": 1, "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false } }, "required": [ - "functionId", + "policyId", "name", - "runtime" + "schedule", + "retention" ] } } @@ -20080,21 +31341,21 @@ } } }, - "\/functions\/runtimes": { + "\/mongo\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "List runtimes", - "operationId": "functionsListRuntimes", + "summary": "Get backup policy", + "operationId": "mongoGetBackupPolicy", "tags": [ - "functions" + "mongo" ], - "description": "Get a list of all runtimes that are currently active on your instance.", + "description": "Get a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Runtimes List", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/runtimeList" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -20102,21 +31363,192 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRuntimes", - "group": "runtimes", + "method": "getBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "functions\/list-runtimes.md", + "demo": "mongo\/get-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update backup policy", + "operationId": "mongoUpdateBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Update a scheduled backup policy for a dedicated database.", + "responses": { + "200": { + "description": "backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/backupPolicy" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mongo\/update-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", + "x-nullable": true + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mongoDeleteBackupPolicy", + "tags": [ + "mongo" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "mongo\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -20127,24 +31559,46 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } ] } }, - "\/functions\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "functionsListSpecifications", + "\/mongo\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mongoUpdateBackupStorage", "tags": [ - "functions" + "mongo" ], - "description": "List allowed function specifications for this instance.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { "200": { - "description": "Specifications List", + "description": "BackupStorageConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/specificationList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" } } } @@ -20152,18 +31606,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSpecifications", - "group": "runtimes", + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/list-specifications.md", + "demo": "mongo\/update-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.write", "platforms": [ - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, @@ -20180,34 +31634,88 @@ ], "parameters": [ { - "name": "type", - "description": "Specification type to list. Can be one of: runtimes, builds.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "runtimes", - "default": "runtimes" + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" + }, + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" + }, + "region": { + "type": "string", + "description": "Storage region.", + "default": "", + "x-example": "<REGION>" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "<ENDPOINT>" + }, + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } } }, - "\/functions\/{functionId}": { + "\/mongo\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get function", - "operationId": "functionsGet", + "summary": "Get backup", + "operationId": "mongoGetBackup", "tags": [ - "functions" + "mongo" ], - "description": "Get a function by its unique ID.", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "Function", + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -20215,15 +31723,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "functions", + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/get.md", + "demo": "mongo\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -20243,31 +31751,169 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, "in": "path" } ] }, - "put": { - "summary": "Update function", - "operationId": "functionsUpdate", + "delete": { + "summary": "Delete backup", + "operationId": "mongoDeleteBackup", "tags": [ - "functions" + "mongo" ], - "description": "Update function by its unique ID.", + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackup", + "group": "backups", + "cookies": false, + "type": "", + "demo": "mongo\/delete-backup.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/branches": { + "get": { + "summary": "List branches", + "operationId": "mongoListBranches", + "tags": [ + "mongo" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", "responses": { "200": { - "description": "Function", + "description": "BranchList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listBranches", + "group": "branches", + "cookies": false, + "type": "", + "demo": "mongo\/list-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "mongoCreateBranch", + "tags": [ + "mongo" + ], + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", + "responses": { + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -20275,15 +31921,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "functions", + "method": "createBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "functions\/update.md", + "demo": "mongo\/create-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -20303,587 +31949,684 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "Runtime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] - }, - "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, - "format": "int32" - }, - "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "default": true, - "x-example": false - }, - "entrypoint": { - "type": "string", - "description": "Entrypoint File. This path is relative to the \"providerRootDirectory\".", - "default": "", - "x-example": "<ENTRYPOINT>" - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "default": "", - "x-example": "<COMMANDS>" - }, - "scopes": { - "type": "array", - "description": "List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } - }, - "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", - "x-example": "<PROVIDER_REPOSITORY_ID>", - "x-nullable": true - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the function", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { - "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "branchId": { "type": "string", - "description": "Path to function code in the linked repo.", + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "buildSpecification": { + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "mongoDeleteBranch", + "tags": [ + "mongo" + ], + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBranch", + "group": "branches", + "cookies": false, + "type": "", + "demo": "mongo\/delete-branch.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BRANCH_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mongoUpdateCredentials", + "tags": [ + "mongo" + ], + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateCredentials", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "mongoCreateFailover", + "tags": [ + "mongo" + ], + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFailover", + "group": "failovers", + "cookies": false, + "type": "", + "demo": "mongo\/create-failover.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { "type": "string", - "description": "Build specification for the function deployments.", - "x-example": null, + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", "x-nullable": true - }, - "runtimeSpecification": { + } + } + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "mongoUpdateMaintenance", + "tags": [ + "mongo" + ], + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMaintenance", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/update-maintenance.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { "type": "string", - "description": "Runtime specification for the function executions.", - "default": {}, - "x-example": null + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" }, - "deploymentRetention": { + "hourUtc": { "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, + "description": "Hour in UTC (0-23) for maintenance window start.", "x-example": 0, "format": "int32" } }, "required": [ - "name" + "day", + "hourUtc" + ] + } + } + } + } + } + }, + "\/mongo\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "mongoCreateMigration", + "tags": [ + "mongo" + ], + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createMigration", + "group": "migrations", + "cookies": false, + "type": "", + "demo": "mongo\/create-migration.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" + }, + "specification": { + "type": "string", + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + } + }, + "required": [ + "targetType" ] } } } - } - }, - "delete": { - "summary": "Delete function", - "operationId": "functionsDelete", + } + } + }, + "\/mongo\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "mongoListOperations", + "tags": [ + "mongo" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOperations", + "group": "operations", + "cookies": false, + "type": "", + "demo": "mongo\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + } + }, + "\/mongo\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "mongoGetPitr", + "tags": [ + "mongo" + ], + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", + "responses": { + "200": { + "description": "PITRWindows", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getPitr", + "group": "pitr", + "cookies": false, + "type": "", + "demo": "mongo\/get-pitr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "mongoGetReplicas", + "tags": [ + "mongo" + ], + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", + "responses": { + "200": { + "description": "Replicas", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getReplicas", + "group": "replicas", + "cookies": false, + "type": "", + "demo": "mongo\/get-replicas.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "mongoListRestorations", "tags": [ - "functions" + "mongo" ], - "description": "Delete a function by its unique ID.", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Dedicated database restorations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "functions", + "method": "listRestorations", + "group": "restorations", "cookies": false, "type": "", - "demo": "functions\/delete.md", + "demo": "mongo\/list-restorations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.read", "platforms": [ "console", "server" @@ -20903,33 +32646,75 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - } - }, - "\/functions\/{functionId}\/deployment": { - "patch": { - "summary": "Update function's deployment", - "operationId": "functionsUpdateFunctionDeployment", + }, + "post": { + "summary": "Create restoration", + "operationId": "mongoCreateRestoration", "tags": [ - "functions" + "mongo" ], - "description": "Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Function", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/function" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -20937,15 +32722,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateFunctionDeployment", - "group": "functions", + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "functions\/update-function-deployment.md", + "demo": "mongo\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -20965,12 +32750,12 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -20981,36 +32766,47 @@ "schema": { "type": "object", "properties": { - "deploymentId": { + "type": { "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" + }, + "backupId": { + "type": "string", + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } - }, - "required": [ - "deploymentId" - ] + } } } } } } }, - "\/functions\/{functionId}\/deployments": { + "\/mongo\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "List deployments", - "operationId": "functionsListDeployments", + "summary": "Get restoration", + "operationId": "mongoGetRestoration", "tags": [ - "functions" + "mongo" ], - "description": "Get a list of all the function's code deployments. You can use the query params to filter your results.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { "200": { - "description": "Deployments List", + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deploymentList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -21018,15 +32814,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDeployments", - "group": "deployments", + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "functions\/list-deployments.md", + "demo": "mongo\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -21046,66 +32842,105 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "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, + "name": "restorationId", + "description": "Restoration ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<RESTORATION_ID>" }, - "in": "query" - }, + "in": "path" + } + ] + } + }, + "\/mongo\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "mongoGetStatus", + "tags": [ + "mongo" + ], + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", + "responses": { + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getStatus", + "group": "mongo", + "cookies": false, + "type": "", + "demo": "mongo\/get-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] - }, + } + }, + "\/mongo\/{databaseId}\/upgrades": { "post": { - "summary": "Create deployment", - "operationId": "functionsCreateDeployment", + "summary": "Create upgrade", + "operationId": "mongoCreateUpgrade", "tags": [ - "functions" + "mongo" ], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -21113,20 +32948,20 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDeployment", - "group": "deployments", + "method": "createUpgrade", + "group": "mongo", "cookies": false, - "type": "upload", - "demo": "functions\/create-deployment.md", + "type": "", + "demo": "mongo\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" ], - "packaging": true, + "packaging": false, "public": true, "auth": { "Project": [], @@ -21141,49 +32976,30 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ], "requestBody": { "content": { - "multipart\/form-data": { + "application\/json": { "schema": { "type": "object", "properties": { - "entrypoint": { - "type": "string", - "description": "Entrypoint File.", - "x-example": "<ENTRYPOINT>", - "x-nullable": true - }, - "commands": { - "type": "string", - "description": "Build Commands.", - "x-example": "<COMMANDS>", - "x-nullable": true - }, - "code": { + "targetVersion": { "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, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "x-example": false + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" } }, "required": [ - "code", - "activate" + "targetVersion" ] } } @@ -21191,21 +33007,21 @@ } } }, - "\/functions\/{functionId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "functionsCreateDuplicateDeployment", + "\/mysql": { + "get": { + "summary": "List databases", + "operationId": "mysqlList", "tags": [ - "functions" + "mysql" ], - "description": "Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "description": "List all dedicated databases. Results support pagination.", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "Dedicated databases list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" } } } @@ -21213,15 +33029,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", + "method": "list", + "group": "mysql", "cookies": false, "type": "", - "demo": "functions\/create-duplicate-deployment.md", + "demo": "mysql\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.read", "platforms": [ "console", "server" @@ -21241,14 +33057,65 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, + "name": "queries", + "description": "Array of query strings.", + "required": false, "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" + } + ] + }, + "post": { + "summary": "Create database", + "operationId": "mysqlCreate", + "tags": [ + "mysql" + ], + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "responses": { + "201": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "mysql", + "cookies": false, + "type": "", + "demo": "mysql\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] } ], "requestBody": { @@ -21257,42 +33124,242 @@ "schema": { "type": "object", "properties": { - "deploymentId": { + "databaseId": { "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { + "idGenerator": "ID.unique" + } }, - "buildId": { + "name": { "type": "string", - "description": "Build unique ID.", - "default": "", - "x-example": "<BUILD_ID>" + "description": "Database display name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "version": { + "type": "string", + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "default": 15, + "x-example": 5, + "format": "int32" + }, + "pitr": { + "type": "boolean", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "default": true, + "x-example": false + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, + "x-example": false + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" } }, "required": [ - "deploymentId" + "databaseId", + "name" ] } } } - } - } - }, - "\/functions\/{functionId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "functionsCreateTemplateDeployment", + } + } + }, + "\/mysql\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "mysqlListSpecifications", + "tags": [ + "mysql" + ], + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", + "responses": { + "200": { + "description": "SpecificationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSpecifications", + "group": "mysql", + "cookies": false, + "type": "", + "demo": "mysql\/list-specifications.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/mysql\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "mysqlGet", + "tags": [ + "mysql" + ], + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", + "responses": { + "200": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "mysql", + "cookies": false, + "type": "", + "demo": "mysql\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update database", + "operationId": "mysqlUpdate", "tags": [ - "functions" + "mysql" ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/functions\/templates) to find the template details.", + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -21300,15 +33367,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", + "method": "update", + "group": "mysql", "cookies": false, "type": "", - "demo": "functions\/create-template-deployment.md", + "demo": "mysql\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -21328,12 +33395,12 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -21344,99 +33411,194 @@ "schema": { "type": "object", "properties": { - "repository": { + "name": { "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true }, - "owner": { + "status": { "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true }, - "rootDirectory": { + "specification": { "type": "string", - "description": "Path to function code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true }, - "type": { + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "commit", - "enum": [ - "commit", - "branch", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [ - "commit", - "branch", - "tag" - ] + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true }, - "reference": { + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true }, - "activate": { + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", + "x-example": false, + "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] + } } } } } - } - }, - "\/functions\/{functionId}\/deployments\/vcs": { - "post": { - "summary": "Create VCS deployment", - "operationId": "functionsCreateVcsDeployment", + }, + "delete": { + "summary": "Delete database", + "operationId": "mysqlDelete", "tags": [ - "functions" + "mysql" ], - "description": "Create a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", "responses": { - "202": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", + "method": "delete", + "group": "mysql", "cookies": false, "type": "", - "demo": "functions\/create-vcs-deployment.md", + "demo": "mysql\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -21450,73 +33612,33 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [ - "branch", - "commit" - ] - }, - "reference": { - "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "type", - "reference" - ] - } - } - } - } + ] } }, - "\/functions\/{functionId}\/deployments\/{deploymentId}": { + "\/mysql\/{databaseId}\/backups": { "get": { - "summary": "Get deployment", - "operationId": "functionsGetDeployment", + "summary": "List backups", + "operationId": "mysqlListBackups", "tags": [ - "functions" + "mysql" ], - "description": "Get a function deployment by its unique ID.", + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Deployment", + "description": "BackupList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" } } } @@ -21524,15 +33646,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDeployment", - "group": "deployments", + "method": "listBackups", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/get-deployment.md", + "demo": "mysql\/list-backups.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -21552,50 +33674,60 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] }, - "delete": { - "summary": "Delete deployment", - "operationId": "functionsDeleteDeployment", + "post": { + "summary": "Create backup", + "operationId": "mysqlCreateBackup", "tags": [ - "functions" + "mysql" ], - "description": "Delete a code deployment by its unique ID.", + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", "responses": { - "204": { - "description": "No content" + "202": { + "description": "Backup", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", + "method": "createBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/delete-deployment.md", + "demo": "mysql\/create-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -21615,44 +33747,50 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + } + } + } + } + } + } } }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/download": { + "\/mysql\/{databaseId}\/backups\/policies": { "get": { - "summary": "Get deployment download", - "operationId": "functionsGetDeploymentDownload", + "summary": "List backup policies", + "operationId": "mysqlListBackupPolicies", "tags": [ - "functions" + "mysql" ], - "description": "Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "description": "List scheduled backup policies for a dedicated database.", "responses": { "200": { - "description": "File", + "description": "Backup policy list", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -21660,15 +33798,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", + "method": "listBackupPolicies", + "group": "policies", "cookies": false, - "type": "location", - "demo": "functions\/get-deployment-download.md", + "type": "", + "demo": "mysql\/list-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -21677,77 +33815,55 @@ "public": true, "auth": { "Project": [], - "Key": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", "required": false, "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [ - "source", - "output" - ], - "default": "source" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, "in": "query" } ] - } - }, - "\/functions\/{functionId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "functionsUpdateDeploymentStatus", + }, + "post": { + "summary": "Create backup policy", + "operationId": "mysqlCreateBackupPolicy", "tags": [ - "functions" + "mysql" ], - "description": "Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "description": "Create a scheduled backup policy for a dedicated database.", "responses": { - "200": { - "description": "Deployment", + "201": { + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -21755,15 +33871,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", + "method": "createBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "functions\/update-deployment-status.md", + "demo": "mysql\/create-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -21783,43 +33899,86 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "policyId": { + "type": "string", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "x-example": null + }, + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" + }, + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false + } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] + } + } + } + } } }, - "\/functions\/{functionId}\/executions": { + "\/mysql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "List executions", - "operationId": "functionsListExecutions", + "summary": "Get backup policy", + "operationId": "mysqlGetBackupPolicy", "tags": [ - "functions" + "mysql" ], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.", + "description": "Get a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Executions List", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/executionList" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -21827,89 +33986,69 @@ }, "deprecated": false, "x-appwrite": { - "method": "listExecutions", - "group": "executions", + "method": "getBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "functions\/list-executions.md", + "demo": "mysql\/get-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "databases.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "policyId", + "description": "Policy ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<POLICY_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create execution", - "operationId": "functionsCreateExecution", + "patch": { + "summary": "Update backup policy", + "operationId": "mysqlUpdateBackupPolicy", "tags": [ - "functions" + "mysql" ], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "description": "Update a scheduled backup policy for a dedicated database.", "responses": { - "201": { - "description": "Execution", + "200": { + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -21917,46 +34056,50 @@ }, "deprecated": false, "x-appwrite": { - "method": "createExecution", - "group": "executions", + "method": "updateBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "functions\/create-execution.md", + "demo": "mysql\/update-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "databases.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, "in": "path" } @@ -21967,59 +34110,28 @@ "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": { + "name": { "type": "string", - "description": "HTTP path of execution. Path can include query params. Default value is \/", - "default": "\/", - "x-example": "<PATH>" + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", + "x-nullable": true }, - "method": { + "schedule": { "type": "string", - "description": "HTTP method of execution. Default value is POST.", - "default": "POST", - "x-example": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ], - "x-enum-name": "ExecutionMethod", - "x-enum-keys": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" - ] + "description": "Schedule CRON syntax.", + "x-example": null }, - "headers": { - "type": "object", - "description": "HTTP headers of execution. Defaults to empty.", - "default": [], - "x-example": "{}" + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32", + "x-nullable": true }, - "scheduledAt": { - "type": "string", - "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": "<SCHEDULED_AT>", + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "x-example": false, "x-nullable": true } } @@ -22027,111 +34139,105 @@ } } } - } - }, - "\/functions\/{functionId}\/executions\/{executionId}": { - "get": { - "summary": "Get execution", - "operationId": "functionsGetExecution", + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "mysqlDeleteBackupPolicy", "tags": [ - "functions" + "mysql" ], - "description": "Get a function execution log by its unique ID.", + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", "responses": { - "200": { - "description": "Execution", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/execution" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getExecution", - "group": "executions", + "method": "deleteBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "functions\/get-execution.md", + "demo": "mysql\/delete-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.read", - "execution.read" - ], + "scope": "databases.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "executionId", - "description": "Execution ID.", + "name": "policyId", + "description": "Policy ID.", "required": true, "schema": { "type": "string", - "x-example": "<EXECUTION_ID>" + "x-example": "<POLICY_ID>" }, "in": "path" } ] - }, - "delete": { - "summary": "Delete execution", - "operationId": "functionsDeleteExecution", + } + }, + "\/mysql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "mysqlUpdateBackupStorage", "tags": [ - "functions" + "mysql" ], - "description": "Delete a function execution by its unique ID.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "BackupStorageConfig", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteExecution", - "group": "executions", + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/delete-execution.md", + "demo": "mysql\/update-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "executions.write", - "execution.write" - ], + "scope": "databases.write", "platforms": [ "console", "server" @@ -22151,43 +34257,88 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<EXECUTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" + }, + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" + }, + "region": { + "type": "string", + "description": "Storage region.", + "default": "", + "x-example": "<REGION>" + }, + "prefix": { + "type": "string", + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" + }, + "endpoint": { + "type": "string", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", + "default": "", + "x-example": "<ENDPOINT>" + }, + "accessKey": { + "type": "string", + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" + }, + "secretKey": { + "type": "string", + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" + } + }, + "required": [ + "provider", + "bucket", + "accessKey", + "secretKey" + ] + } + } + } + } } }, - "\/functions\/{functionId}\/variables": { + "\/mysql\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "List variables", - "operationId": "functionsListVariables", + "summary": "Get backup", + "operationId": "mysqlGetBackup", "tags": [ - "functions" + "mysql" ], - "description": "Get a list of all variables of a specific function.", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "Variables List", + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variableList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -22195,15 +34346,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listVariables", - "group": "variables", + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/list-variables.md", + "demo": "mysql\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -22223,77 +34374,59 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "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: key, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "backupId", + "description": "Backup ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<BACKUP_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create variable", - "operationId": "functionsCreateVariable", + "delete": { + "summary": "Delete backup", + "operationId": "mysqlDeleteBackup", "tags": [ - "functions" + "mysql" ], - "description": "Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", "responses": { - "201": { - "description": "Variable", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variable" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createVariable", - "group": "variables", + "method": "deleteBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "functions\/create-variable.md", + "demo": "mysql\/delete-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -22307,73 +34440,43 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<VARIABLE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "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>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "default": true, - "x-example": false - } - }, - "required": [ - "variableId", - "key", - "value" - ] - } - } - } - } + ] } }, - "\/functions\/{functionId}\/variables\/{variableId}": { + "\/mysql\/{databaseId}\/branches": { "get": { - "summary": "Get variable", - "operationId": "functionsGetVariable", + "summary": "List branches", + "operationId": "mysqlListBranches", "tags": [ - "functions" + "mysql" ], - "description": "Get a variable by its unique ID.", + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", "responses": { "200": { - "description": "Variable", + "description": "BranchList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" } } } @@ -22381,15 +34484,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getVariable", - "group": "variables", + "method": "listBranches", + "group": "branches", "cookies": false, "type": "", - "demo": "functions\/get-variable.md", + "demo": "mysql\/list-branches.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -22409,41 +34512,31 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] }, - "put": { - "summary": "Update variable", - "operationId": "functionsUpdateVariable", + "post": { + "summary": "Create branch", + "operationId": "mysqlCreateBranch", "tags": [ - "functions" + "mysql" ], - "description": "Update variable by its unique ID.", + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", "responses": { - "200": { - "description": "Variable", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -22451,15 +34544,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVariable", - "group": "variables", + "method": "createBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "functions\/update-variable.md", + "demo": "mysql\/create-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -22479,22 +34572,12 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<FUNCTION_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -22505,53 +34588,60 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { + "branchId": { "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only functions can read them during build and runtime.", - "x-example": false, - "x-nullable": true + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" } } } } } } - }, + } + }, + "\/mysql\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete variable", - "operationId": "functionsDeleteVariable", + "summary": "Delete branch", + "operationId": "mysqlDeleteBranch", "tags": [ - "functions" + "mysql" ], - "description": "Delete a variable by its unique ID.", + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", "responses": { - "204": { - "description": "No content" + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteVariable", - "group": "variables", + "method": "deleteBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "functions\/delete-variable.md", + "demo": "mysql\/delete-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", + "scope": "databases.write", "platforms": [ "console", "server" @@ -22571,43 +34661,43 @@ ], "parameters": [ { - "name": "functionId", - "description": "Function unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<FUNCTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, - { - "name": "variableId", - "description": "Variable unique ID.", + { + "name": "branchId", + "description": "Branch ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<BRANCH_ID>" }, "in": "path" } ] } }, - "\/graphql": { - "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlQuery", + "\/mysql\/{databaseId}\/credentials": { + "patch": { + "summary": "Update credentials", + "operationId": "mysqlUpdateCredentials", "tags": [ - "graphql" + "mysql" ], - "description": "Execute a GraphQL mutation.", + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", "responses": { "200": { - "description": "Any", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -22615,23 +34705,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "query", - "group": "graphql", + "method": "updateCredentials", + "group": "mysql", "cookies": false, - "type": "graphql", - "demo": "graphql\/query.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "mysql\/update-credentials.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "databases.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [], "Key": [] @@ -22640,48 +34728,38 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "object", - "description": "The query or queries to execute.", - "default": {}, - "x-example": "{}" - } - }, - "required": [ - "query" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } + ] } }, - "\/graphql\/mutation": { + "\/mysql\/{databaseId}\/executions": { "post": { - "summary": "GraphQL endpoint", - "operationId": "graphqlMutation", + "summary": "Create execution", + "operationId": "mysqlCreateExecution", "tags": [ - "graphql" + "mysql" ], - "description": "Execute a GraphQL mutation.", + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", "responses": { "200": { - "description": "Any", + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" } } } @@ -22689,23 +34767,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "mutation", - "group": "graphql", + "method": "createExecution", + "group": "executions", "cookies": false, - "type": "graphql", - "demo": "graphql\/mutation.md", - "rate-limit": 60, - "rate-time": 60, + "type": "", + "demo": "mysql\/create-execution.md", + "rate-limit": 0, + "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "graphql", + "scope": "databases.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "auth": { "Project": [], "Key": [] @@ -22714,9 +34790,19 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } ], "requestBody": { @@ -22725,15 +34811,28 @@ "schema": { "type": "object", "properties": { - "query": { + "sql": { + "type": "string", + "description": "SQL statement to execute. Exactly one statement per request.", + "x-example": "<SQL>" + }, + "bindings": { "type": "object", - "description": "The query or queries to execute.", + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", "default": {}, - "x-example": "{}" + "x-example": "{}", + "x-nullable": true + }, + "timeoutSeconds": { + "type": "integer", + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "x-example": 1, + "format": "int32", + "x-nullable": true } }, "required": [ - "query" + "sql" ] } } @@ -22741,21 +34840,21 @@ } } }, - "\/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", + "\/mysql\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "mysqlCreateFailover", "tags": [ - "health" + "mysql" ], - "description": "Check the Appwrite HTTP server is up and responsive.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "200": { - "description": "Health Status", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -22763,22 +34862,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "health", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "health\/get.md", + "demo": "mysql\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "auth": { "Project": [], "Key": [] @@ -22789,75 +34887,53 @@ "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" + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true + } } } } } - }, - "deprecated": false, - "x-appwrite": { - "method": "getAntivirus", - "group": "health", - "cookies": false, - "type": "", - "demo": "health\/get-antivirus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] + } } }, - "\/health\/audits-db": { - "get": { - "summary": "Get audits DB", - "operationId": "healthGetAuditsDB", + "\/mysql\/{databaseId}\/maintenance": { + "patch": { + "summary": "Update maintenance", + "operationId": "mysqlUpdateMaintenance", "tags": [ - "health" + "mysql" ], - "description": "Check the database that backs the audit and activity store. When the connection is reachable the endpoint returns a passing status with its response time.\n", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Status List", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -22865,22 +34941,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getAuditsDB", - "group": null, + "method": "updateMaintenance", + "group": "mysql", "cookies": false, "type": "", - "demo": "health\/get-audits-db.md", + "demo": "mysql\/update-maintenance.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-audits-db.md", "auth": { "Project": [], "Key": [] @@ -22891,24 +34966,62 @@ "Project": [], "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "day": { + "type": "string", + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "day", + "hourUtc" + ] + } + } + } + } } }, - "\/health\/cache": { - "get": { - "summary": "Get cache", - "operationId": "healthGetCache", + "\/mysql\/{databaseId}\/migrations": { + "post": { + "summary": "Create migration", + "operationId": "mysqlCreateMigration", "tags": [ - "health" + "mysql" ], - "description": "Check the Appwrite in-memory cache servers are up and connection is successful.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", "responses": { "200": { - "description": "Status List", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -22916,22 +35029,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCache", - "group": "health", + "method": "createMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "health\/get-cache.md", + "demo": "mysql\/create-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "auth": { "Project": [], "Key": [] @@ -22942,24 +35054,61 @@ "Project": [], "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" + }, + "specification": { + "type": "string", + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", + "x-nullable": true + } + }, + "required": [ + "targetType" + ] + } + } + } + } } }, - "\/health\/certificate": { + "\/mysql\/{databaseId}\/operations": { "get": { - "summary": "Get the SSL certificate for a domain", - "operationId": "healthGetCertificate", + "summary": "List operations", + "operationId": "mysqlListOperations", "tags": [ - "health" + "mysql" ], - "description": "Get the SSL certificate for a domain", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Health Certificate", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthCertificate" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -22967,22 +35116,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCertificate", - "group": "health", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "health\/get-certificate.md", + "demo": "mysql\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "auth": { "Project": [], "Key": [] @@ -22996,32 +35144,67 @@ ], "parameters": [ { - "name": "domain", - "description": "string", + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", "required": false, "schema": { - "type": "string" + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 }, "in": "query" } ] } }, - "\/health\/console-pausing": { + "\/mysql\/{databaseId}\/pitr": { "get": { - "summary": "Get console pausing health", - "operationId": "healthGetConsolePausing", + "summary": "Get PITR", + "operationId": "mysqlGetPitr", "tags": [ - "health" + "mysql" ], - "description": "Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.\n", + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", "responses": { "200": { - "description": "Health Status", + "description": "PITRWindows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" } } } @@ -23029,22 +35212,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getConsolePausing", - "group": null, + "method": "getPitr", + "group": "pitr", "cookies": false, "type": "", - "demo": "health\/get-console-pausing.md", + "demo": "mysql\/get-pitr.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-console-pausing.md", "auth": { "Project": [], "Key": [] @@ -23058,45 +35240,33 @@ ], "parameters": [ { - "name": "threshold", - "description": "Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - }, - "in": "query" - }, - { - "name": "inactivityDays", - "description": "Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 7 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/health\/db": { + "\/mysql\/{databaseId}\/pooler": { "get": { - "summary": "Get DB", - "operationId": "healthGetDB", + "summary": "Get pooler", + "operationId": "mysqlGetPooler", "tags": [ - "health" + "mysql" ], - "description": "Check the Appwrite database servers are up and connection is successful.", + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", "responses": { "200": { - "description": "Status List", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -23104,22 +35274,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDB", - "group": "health", + "method": "getPooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "health\/get-db.md", + "demo": "mysql\/get-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "auth": { "Project": [], "Key": [] @@ -23130,24 +35299,34 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } ] - } - }, - "\/health\/pubsub": { - "get": { - "summary": "Get pubsub", - "operationId": "healthGetPubSub", + }, + "patch": { + "summary": "Update pooler", + "operationId": "mysqlUpdatePooler", "tags": [ - "health" + "mysql" ], - "description": "Check the Appwrite pub-sub servers are up and connection is successful.", + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", "responses": { "200": { - "description": "Status List", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatusList" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -23155,22 +35334,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPubSub", - "group": "health", + "method": "updatePooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "health\/get-pub-sub.md", + "demo": "mysql\/update-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "auth": { "Project": [], "Key": [] @@ -23181,24 +35359,97 @@ "Project": [], "Key": [] } - ] + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "x-example": "transaction", + "x-nullable": true + }, + "maxConnections": { + "type": "integer", + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "readWriteSplitting": { + "type": "boolean", + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", + "x-example": false, + "x-nullable": true + }, + "poolerCpuRequest": { + "type": "string", + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "x-example": "<POOLER_CPU_REQUEST>", + "x-nullable": true + }, + "poolerCpuLimit": { + "type": "string", + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "x-example": "<POOLER_CPU_LIMIT>", + "x-nullable": true + }, + "poolerMemoryRequest": { + "type": "string", + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "x-example": "<POOLER_MEMORY_REQUEST>", + "x-nullable": true + }, + "poolerMemoryLimit": { + "type": "string", + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "x-example": "<POOLER_MEMORY_LIMIT>", + "x-nullable": true + } + } + } + } + } + } } }, - "\/health\/queue\/audits": { + "\/mysql\/{databaseId}\/replicas": { "get": { - "summary": "Get audits queue", - "operationId": "healthGetQueueAudits", + "summary": "Get replicas", + "operationId": "mysqlGetReplicas", "tags": [ - "health" + "mysql" ], - "description": "Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Health Queue", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -23206,22 +35457,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueAudits", - "group": "queue", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "health\/get-queue-audits.md", + "demo": "mysql\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-audits.md", "auth": { "Project": [], "Key": [] @@ -23235,34 +35485,33 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/health\/queue\/billing-project-aggregation": { + "\/mysql\/{databaseId}\/restorations": { "get": { - "summary": "Get billing project aggregation queue", - "operationId": "healthGetQueueBillingProjectAggregation", + "summary": "List restorations", + "operationId": "mysqlListRestorations", "tags": [ - "health" + "mysql" ], - "description": "Get billing project aggregation queue.", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Health Queue", + "description": "Dedicated database restorations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" } } } @@ -23270,22 +35519,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueBillingProjectAggregation", - "group": null, + "method": "listRestorations", + "group": "restorations", "cookies": false, "type": "", - "demo": "health\/get-queue-billing-project-aggregation.md", + "demo": "mysql\/list-restorations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-billing-project-aggregation.md", "auth": { "Project": [], "Key": [] @@ -23299,34 +35547,75 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", "required": false, "schema": { "type": "integer", "format": "int32", - "default": 10000 + "x-example": 0, + "default": 0 }, "in": "query" } ] - } - }, - "\/health\/queue\/billing-team-aggregation": { - "get": { - "summary": "Get billing team aggregation queue", - "operationId": "healthGetQueueBillingTeamAggregation", + }, + "post": { + "summary": "Create restoration", + "operationId": "mysqlCreateRestoration", "tags": [ - "health" + "mysql" ], - "description": "Get billing team aggregation queue.", + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Health Queue", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -23334,22 +35623,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueBillingTeamAggregation", - "group": null, + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "health\/get-queue-billing-team-aggregation.md", + "demo": "mysql\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-billing-team-aggregation.md", "auth": { "Project": [], "Key": [] @@ -23363,34 +35651,63 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 10000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" + }, + "backupId": { + "type": "string", + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } } }, - "\/health\/queue\/builds": { + "\/mysql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get builds queue", - "operationId": "healthGetQueueBuilds", + "summary": "Get restoration", + "operationId": "mysqlGetRestoration", "tags": [ - "health" + "mysql" ], - "description": "Get the number of builds that are waiting to be processed in the Appwrite internal queue server.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { "200": { - "description": "Health Queue", + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -23398,22 +35715,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueBuilds", - "group": "queue", + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "health\/get-queue-builds.md", + "demo": "mysql\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "auth": { "Project": [], "Key": [] @@ -23427,34 +35743,43 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RESTORATION_ID>" + }, + "in": "path" } ] } }, - "\/health\/queue\/certificates": { + "\/mysql\/{databaseId}\/status": { "get": { - "summary": "Get certificates queue", - "operationId": "healthGetQueueCertificates", + "summary": "Get status", + "operationId": "mysqlGetStatus", "tags": [ - "health" + "mysql" ], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "Health Queue", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/databaseStatus" } } } @@ -23462,22 +35787,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueCertificates", - "group": "queue", + "method": "getStatus", + "group": "mysql", "cookies": false, "type": "", - "demo": "health\/get-queue-certificates.md", + "demo": "mysql\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "auth": { "Project": [], "Key": [] @@ -23491,34 +35815,33 @@ ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/health\/queue\/databases": { - "get": { - "summary": "Get databases queue", - "operationId": "healthGetQueueDatabases", + "\/mysql\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "mysqlCreateUpgrade", "tags": [ - "health" + "mysql" ], - "description": "Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { "200": { - "description": "Health Queue", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -23526,22 +35849,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueDatabases", - "group": "queue", + "method": "createUpgrade", + "group": "mysql", "cookies": false, "type": "", - "demo": "health\/get-queue-databases.md", + "demo": "mysql\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "auth": { "Project": [], "Key": [] @@ -23555,45 +35877,52 @@ ], "parameters": [ { - "name": "name", - "description": "Queue name for which to check the queue size", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<NAME>", - "default": "database_db_main" - }, - "in": "query" - }, - { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "type": "string", + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } } }, - "\/health\/queue\/deletes": { - "get": { - "summary": "Get deletes queue", - "operationId": "healthGetQueueDeletes", + "\/oauth2\/{project_id}\/approve": { + "post": { + "summary": "Approve OAuth2", + "operationId": "oauth2Approve", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.", + "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Approve", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Approve" } } } @@ -23601,63 +35930,94 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueDeletes", - "group": "queue", + "method": "approve", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-queue-deletes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "demo": "oauth2\/approve.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "grant_id": { + "type": "string", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "<GRANT_ID>" + }, + "authorization_details": { + "type": "string", + "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + }, + "scope": { + "type": "string", + "description": "Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.", + "default": "", + "x-example": "<SCOPE>" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, - "\/health\/queue\/failed\/{name}": { + "\/oauth2\/{project_id}\/authorize": { "get": { - "summary": "Get number of failed queue jobs", - "operationId": "healthGetFailedJobs", + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizeGet", "tags": [ - "health" + "oauth2" ], - "description": "Returns the amount of failed jobs in a given queue.\n", + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -23665,104 +36025,215 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFailedJobs", - "group": "queue", + "method": "authorize", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-failed-jobs.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "name", - "description": "The name of the queue", + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", "required": true, "schema": { "type": "string", - "x-example": "v1-database", - "enum": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ], - "x-enum-name": "HealthQueueName", - "x-enum-keys": [ - "v1-database", - "v1-deletes", - "v1-audits", - "v1-mails", - "v1-functions", - "v1-stats-resources", - "v1-stats-usage", - "v1-webhooks", - "v1-certificates", - "v1-builds", - "v1-screenshots", - "v1-messaging", - "v1-migrations" - ] + "x-example": "<PROJECT_ID>" }, "in": "path" }, { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "client_id", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "required": false, + "schema": { + "type": "string", + "x-example": "<CLIENT_ID>", + "default": "" + }, + "in": "query" + }, + { + "name": "redirect_uri", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "required": false, + "schema": { + "type": "string", + "format": "url", + "x-example": "https:\/\/example.com", + "default": "" + }, + "in": "query" + }, + { + "name": "response_type", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + }, + { + "name": "scope", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SCOPE>", + "default": "" + }, + "in": "query" + }, + { + "name": "state", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "<STATE>", + "default": "" + }, + "in": "query" + }, + { + "name": "nonce", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "required": false, + "schema": { + "type": "string", + "x-example": "<NONCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "<CODE_CHALLENGE>", + "default": "" + }, + "in": "query" + }, + { + "name": "code_challenge_method", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "required": false, + "schema": { + "type": "string", + "x-example": "s256", + "default": "" + }, + "in": "query" + }, + { + "name": "prompt", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "required": false, + "schema": { + "type": "string", + "x-example": "<PROMPT>", + "default": "" + }, + "in": "query" + }, + { + "name": "max_age", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", "required": false, "schema": { "type": "integer", "format": "int32", - "default": 5000 + "x-example": 0 + }, + "in": "query" + }, + { + "name": "authorization_details", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "required": false, + "schema": { + "type": "string", + "x-example": "<AUTHORIZATION_DETAILS>", + "default": "" + }, + "in": "query" + }, + { + "name": "resource", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "required": false, + "schema": { + "type": "string", + "default": [] + }, + "in": "query" + }, + { + "name": "audience", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "required": false, + "schema": { + "type": "string", + "x-example": "<AUDIENCE>", + "default": "" + }, + "in": "query" + }, + { + "name": "request_uri", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "required": false, + "schema": { + "type": "string", + "x-example": "<REQUEST_URI>", + "default": "" }, "in": "query" } ] - } - }, - "\/health\/queue\/functions": { - "get": { - "summary": "Get functions queue", - "operationId": "healthGetQueueFunctions", + }, + "post": { + "summary": "OAuth2 Authorize", + "operationId": "oauth2AuthorizePost", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.", + "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Authorize", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Authorize" } } } @@ -23770,63 +36241,160 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueFunctions", - "group": "queue", + "method": "authorizePost", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/authorize.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "<CLIENT_ID>" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "type": "string", + "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", + "default": "", + "x-example": "" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "default": "", + "x-example": "<SCOPE>" + }, + "state": { + "type": "string", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "default": "", + "x-example": "<STATE>" + }, + "nonce": { + "type": "string", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "default": "", + "x-example": "<NONCE>" + }, + "code_challenge": { + "type": "string", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "default": "", + "x-example": "<CODE_CHALLENGE>" + }, + "code_challenge_method": { + "type": "string", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "default": "", + "x-example": "s256" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "default": "", + "x-example": "<PROMPT>" + }, + "max_age": { + "type": "integer", + "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" + }, + "request_uri": { + "type": "string", + "description": "OAuth2 authorization request handle returned by the pushed authorization request endpoint.", + "default": "", + "x-example": "<REQUEST_URI>" + } + } + } + } + } + } } }, - "\/health\/queue\/logs": { - "get": { - "summary": "Get logs queue", - "operationId": "healthGetQueueLogs", + "\/oauth2\/{project_id}\/device_authorization": { + "post": { + "summary": "OAuth2 Device Authorization", + "operationId": "oauth2CreateDeviceAuthorization", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Device Authorization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" } } } @@ -23834,63 +36402,105 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueLogs", - "group": "queue", + "method": "createDeviceAuthorization", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-device-authorization.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "<CLIENT_ID>" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", + "default": "", + "x-example": "<SCOPE>" + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" + } + } + } + } + } + } } }, - "\/health\/queue\/mails": { - "get": { - "summary": "Get mails queue", - "operationId": "healthGetQueueMails", + "\/oauth2\/{project_id}\/grants": { + "post": { + "summary": "Create OAuth2 Grant", + "operationId": "oauth2CreateGrant", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of mails that are waiting to be processed in the Appwrite internal queue server.", + "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", "responses": { - "200": { - "description": "Health Queue", + "201": { + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -23898,63 +36508,82 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueMails", - "group": "queue", + "method": "createGrant", + "group": "grants", "cookies": false, "type": "", - "demo": "health\/get-queue-mails.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "demo": "oauth2\/create-grant.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "user_code": { + "type": "string", + "description": "User code displayed on the device.", + "x-example": "<USER_CODE>" + } + }, + "required": [ + "user_code" + ] + } + } + } + } } }, - "\/health\/queue\/messaging": { + "\/oauth2\/{project_id}\/grants\/{grant_id}": { "get": { - "summary": "Get messaging queue", - "operationId": "healthGetQueueMessaging", + "summary": "Get OAuth2 Grant", + "operationId": "oauth2GetGrant", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of messages that are waiting to be processed in the Appwrite internal queue server.", + "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Grant", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Grant" } } } @@ -23962,63 +36591,74 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueMessaging", - "group": "queue", + "method": "getGrant", + "group": "grants", "cookies": false, "type": "", - "demo": "health\/get-queue-messaging.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "demo": "oauth2\/get-grant.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client that created grant during authorization exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "grant_id", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "required": true, + "schema": { + "type": "string", + "x-example": "<GRANT_ID>" + }, + "in": "path" } ] } }, - "\/health\/queue\/migrations": { + "\/oauth2\/{project_id}\/organizations": { "get": { - "summary": "Get migrations queue", - "operationId": "healthGetQueueMigrations", + "summary": "OAuth2 List Accessible Organizations", + "operationId": "oauth2ListOrganizations", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.", + "description": "List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 accessible organizations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2OrganizationList" } } } @@ -24026,63 +36666,99 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueMigrations", - "group": "queue", + "method": "listOrganizations", + "group": "platform", "cookies": false, "type": "", - "demo": "health\/get-queue-migrations.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-organizations.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "oauth2.organizations.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of organizations to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of organizations to skip before returning results. Used for pagination.", "required": false, "schema": { "type": "integer", "format": "int32", - "default": 5000 + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" }, "in": "query" } ] } }, - "\/health\/queue\/region-manager": { - "get": { - "summary": "Get region manager queue", - "operationId": "healthGetQueueRegionManager", + "\/oauth2\/{project_id}\/par": { + "post": { + "summary": "OAuth2 PAR", + "operationId": "oauth2CreatePAR", "tags": [ - "health" + "oauth2" ], - "description": "Get region manager queue.", + "description": "Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.", "responses": { - "200": { - "description": "Health Queue", + "201": { + "description": "OAuth2 PAR", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2PAR" } } } @@ -24090,63 +36766,157 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueRegionManager", - "group": null, + "method": "createPAR", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-queue-region-manager.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-par.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-region-manager.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 100 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "x-example": "<CLIENT_ID>" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "response_type": { + "type": "string", + "description": "OAuth2 \/ OIDC response type.", + "x-example": "code" + }, + "scope": { + "type": "string", + "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.", + "default": "", + "x-example": "<SCOPE>" + }, + "state": { + "type": "string", + "description": "OAuth2 state. You receive this back in the redirect URI.", + "default": "", + "x-example": "<STATE>" + }, + "nonce": { + "type": "string", + "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", + "default": "", + "x-example": "<NONCE>" + }, + "code_challenge": { + "type": "string", + "description": "PKCE code challenge. Required when OAuth2 app is public.", + "default": "", + "x-example": "<CODE_CHALLENGE>" + }, + "code_challenge_method": { + "type": "string", + "description": "PKCE code challenge method. Required when OAuth2 app is public.", + "default": "", + "x-example": "s256" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", + "default": "", + "x-example": "<PROMPT>" + }, + "max_age": { + "type": "integer", + "description": "OIDC max_age parameter for customization of consent screen.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "authorization_details": { + "type": "string", + "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" + } + }, + "required": [ + "client_id", + "redirect_uri", + "response_type" + ] + } + } + } + } } }, - "\/health\/queue\/stats-resources": { + "\/oauth2\/{project_id}\/projects": { "get": { - "summary": "Get stats resources queue", - "operationId": "healthGetQueueStatsResources", + "summary": "OAuth2 List Accessible Projects", + "operationId": "oauth2ListProjects", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.", + "description": "List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 accessible projects list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2ProjectList" } } } @@ -24154,63 +36924,99 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueStatsResources", - "group": "queue", + "method": "listProjects", + "group": "platform", "cookies": false, "type": "", - "demo": "health\/get-queue-stats-resources.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/list-projects.md", + "rate-limit": 120, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "oauth2.projects.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", + "name": "project_id", + "description": "Project ID of the console project the OAuth2 access token was issued for.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PROJECT_ID>" + }, + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of projects to return. Between 1 and 5000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of projects to skip before returning results. Used for pagination.", "required": false, "schema": { "type": "integer", "format": "int32", - "default": 5000 + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" }, "in": "query" } ] } }, - "\/health\/queue\/stats-usage": { - "get": { - "summary": "Get stats usage queue", - "operationId": "healthGetQueueUsage", + "\/oauth2\/{project_id}\/reject": { + "post": { + "summary": "Reject OAuth2", + "operationId": "oauth2Reject", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.", + "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Reject", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Reject" } } } @@ -24218,63 +37024,83 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueUsage", - "group": "queue", + "method": "reject", + "group": "authorization", "cookies": false, "type": "", - "demo": "health\/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "demo": "oauth2\/reject.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "oauth2.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "grant_id": { + "type": "string", + "description": "Grant ID made during authorization, provided to consent screen in URL search params.", + "x-example": "<GRANT_ID>" + } + }, + "required": [ + "grant_id" + ] + } + } + } + } } }, - "\/health\/queue\/threats": { - "get": { - "summary": "Get threats queue", - "operationId": "healthGetQueueThreats", + "\/oauth2\/{project_id}\/revoke": { + "post": { + "summary": "OAuth2 Revoke", + "operationId": "oauth2Revoke", "tags": [ - "health" + "oauth2" ], - "description": "Get threats queue.", + "description": "Revoke an OAuth2 access token or refresh token.", "responses": { "200": { - "description": "Health Queue", + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "type": "string", + "format": "binary" } } } @@ -24282,63 +37108,101 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueThreats", - "group": null, + "method": "revoke", + "group": "tokens", "cookies": false, "type": "", - "demo": "health\/get-queue-threats.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/revoke.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/health\/get-queue-threats.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 100 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The access or refresh token to revoke.", + "x-example": "<TOKEN>" + }, + "token_type_hint": { + "type": "string", + "description": "Type of token to revoke (access_token or refresh_token).", + "default": "", + "x-example": "access_token" + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "<CLIENT_ID>" + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", + "default": "", + "x-example": "<CLIENT_SECRET>" + } + }, + "required": [ + "token" + ] + } + } + } + } } }, - "\/health\/queue\/webhooks": { - "get": { - "summary": "Get webhooks queue", - "operationId": "healthGetQueueWebhooks", + "\/oauth2\/{project_id}\/token": { + "post": { + "summary": "OAuth2 Token", + "operationId": "oauth2CreateToken", "tags": [ - "health" + "oauth2" ], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", "responses": { "200": { - "description": "Health Queue", + "description": "OAuth2 Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthQueue" + "$ref": "#\/components\/schemas\/oauth2Token" } } } @@ -24346,114 +37210,138 @@ }, "deprecated": false, "x-appwrite": { - "method": "getQueueWebhooks", - "group": "queue", + "method": "createToken", + "group": "tokens", "cookies": false, "type": "", - "demo": "health\/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, + "demo": "oauth2\/create-token.md", + "rate-limit": 60, + "rate-time": 60, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "auth": { - "Project": [], - "Key": [] + "ProjectPath": [], + "Session": [] } }, "security": [ { - "Project": [], + "ProjectPath": [], + "Session": [], + "JWT": [], "Key": [] } ], "parameters": [ { - "name": "threshold", - "description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.", - "required": false, + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "default": 5000 + "type": "string", + "x-example": "<PROJECT_ID>" }, - "in": "query" + "in": "path" } - ] - } - }, - "\/health\/storage": { - "get": { - "summary": "Get storage", - "operationId": "healthGetStorage", - "tags": [ - "health" ], - "description": "Check the Appwrite storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/healthStatus" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getStorage", - "group": "storage", - "cookies": false, - "type": "", - "demo": "health\/get-storage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "grant_type": { + "type": "string", + "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", + "x-example": "<GRANT_TYPE>" + }, + "code": { + "type": "string", + "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", + "default": "", + "x-example": "<CODE>" + }, + "refresh_token": { + "type": "string", + "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", + "default": "", + "x-example": "<REFRESH_TOKEN>" + }, + "device_code": { + "type": "string", + "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", + "default": "", + "x-example": "<DEVICE_CODE>" + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "default": "", + "x-example": "<CLIENT_ID>" + }, + "client_secret": { + "type": "string", + "description": "OAuth2 client secret. Required for confidential apps.", + "default": "", + "x-example": "<CLIENT_SECRET>" + }, + "code_verifier": { + "type": "string", + "description": "PKCE code verifier. Required for public apps.", + "default": "", + "x-example": "<CODE_VERIFIER>" + }, + "redirect_uri": { + "type": "string", + "description": "Redirect URI. Required for `authorization_code` grant type.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "resource": { + "type": "string", + "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", + "default": [], + "x-example": null + }, + "audience": { + "type": "string", + "description": "Compatibility alias for a single OAuth2 resource indicator URI.", + "default": "", + "x-example": "<AUDIENCE>" + } + }, + "required": [ + "grant_type" + ] + } + } } - ] + } } }, - "\/health\/storage\/local": { + "\/organization": { "get": { - "summary": "Get local storage", - "operationId": "healthGetStorageLocal", + "summary": "Get organization", + "operationId": "organizationGet", "tags": [ - "health" + "organization" ], - "description": "Check the Appwrite local storage device is up and connection is successful.", + "description": "Get the current organization.", "responses": { "200": { - "description": "Health Status", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthStatus" + "$ref": "#\/components\/schemas\/organization" } } } @@ -24461,22 +37349,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getStorageLocal", - "group": "storage", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "health\/get-storage-local.md", + "demo": "organization\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "organization.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "auth": { "Project": [], "Key": [] @@ -24485,26 +37372,25 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ] - } - }, - "\/health\/time": { - "get": { - "summary": "Get time", - "operationId": "healthGetTime", + }, + "put": { + "summary": "Update organization", + "operationId": "organizationUpdate", "tags": [ - "health" + "organization" ], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "description": "Update the current organization's name.", "responses": { "200": { - "description": "Health Time", + "description": "Organization", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/healthTime" + "$ref": "#\/components\/schemas\/organization" } } } @@ -24512,22 +37398,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTime", - "group": "health", + "method": "update", + "group": null, "cookies": false, "type": "", - "demo": "health\/get-time.md", + "demo": "organization\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", + "scope": "organization.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "auth": { "Project": [], "Key": [] @@ -24536,80 +37421,88 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } - ] - } - }, - "\/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" - } + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New organization name. Max length: 128 chars.", + "x-example": "<NAME>" + } + }, + "required": [ + "name" + ] } } } + } + }, + "delete": { + "summary": "Delete organization", + "operationId": "organizationDelete", + "tags": [ + "organization" + ], + "description": "Delete the current organization. All projects that belong to the organization are deleted as well.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "delete", "group": null, "cookies": false, "type": "", - "demo": "locale\/get.md", + "demo": "organization\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "organization.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], "Key": [], - "JWT": [] + "Organization": [] } ] } }, - "\/locale\/codes": { + "\/organization\/installations": { "get": { - "summary": "List locale codes", - "operationId": "localeListCodes", + "summary": "List Installations", + "operationId": "organizationListInstallations", "tags": [ - "locale" + "organization" ], - "description": "List of all locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes).", + "description": "List app installations on the organization. Any organization member can read installations.", "responses": { "200": { - "description": "Locale codes list", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/localeCodeList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -24617,15 +37510,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCodes", - "group": null, + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "locale\/list-codes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", "platforms": [ "console", "client", @@ -24633,7 +37526,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "auth": { "Project": [], "Session": [] @@ -24644,26 +37536,51 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "Organization": [] + } + ], + "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] - } - }, - "\/locale\/continents": { - "get": { - "summary": "List continents", - "operationId": "localeListContinents", + }, + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", "tags": [ - "locale" + "organization" ], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", "responses": { - "200": { - "description": "Continents List", + "201": { + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/continentList" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -24671,15 +37588,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listContinents", - "group": null, + "method": "createInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "locale\/list-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", "client", @@ -24687,7 +37604,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "auth": { "Project": [], "Session": [] @@ -24698,26 +37614,52 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "Organization": [] } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "<APP_ID>" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" + } + }, + "required": [ + "appId" + ] + } + } + } + } } }, - "\/locale\/countries": { + "\/organization\/installations\/{installationId}": { "get": { - "summary": "List countries", - "operationId": "localeListCountries", + "summary": "Get Installation", + "operationId": "organizationGetInstallation", "tags": [ - "locale" + "organization" ], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", "responses": { "200": { - "description": "Countries List", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -24725,15 +37667,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountries", - "group": null, + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "locale\/list-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", "platforms": [ "console", "client", @@ -24741,7 +37683,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "auth": { "Project": [], "Session": [] @@ -24752,26 +37693,37 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" } ] - } - }, - "\/locale\/countries\/eu": { - "get": { - "summary": "List EU countries", - "operationId": "localeListCountriesEU", + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", "tags": [ - "locale" + "organization" ], - "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.", + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { "200": { - "description": "Countries List", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/countryList" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -24779,15 +37731,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCountriesEU", - "group": null, + "method": "updateInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "locale\/list-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", "client", @@ -24795,7 +37747,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "auth": { "Project": [], "Session": [] @@ -24806,42 +37757,63 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "Organization": [] } - ] - } - }, - "\/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" + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "<AUTHORIZATION_DETAILS>", + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "listCountriesPhones", - "group": null, + "method": "deleteInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "locale\/list-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", "platforms": [ "console", "client", @@ -24849,7 +37821,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Session": [] @@ -24860,26 +37834,39 @@ "Project": [], "Session": [], "Key": [], - "JWT": [] + "JWT": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSTALLATION_ID>" + }, + "in": "path" } ] } }, - "\/locale\/currencies": { + "\/organization\/keys": { "get": { - "summary": "List currencies", - "operationId": "localeListCurrencies", + "summary": "List organization keys", + "operationId": "organizationListKeys", "tags": [ - "locale" + "organization" ], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "description": "Get a list of all API keys from the current organization.", "responses": { "200": { - "description": "Currencies List", + "description": "API Keys List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/currencyList" + "$ref": "#\/components\/schemas\/keyList" } } } @@ -24887,53 +37874,74 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCurrencies", - "group": null, + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "locale\/list-currencies.md", + "demo": "organization\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "organization.keys.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], "Key": [], - "JWT": [] + "Organization": [] + } + ], + "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: expire, accessedAt, name, scopes", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] - } - }, - "\/locale\/languages": { - "get": { - "summary": "List languages", - "operationId": "localeListLanguages", + }, + "post": { + "summary": "Create organization key", + "operationId": "organizationCreateKey", "tags": [ - "locale" + "organization" ], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "description": "Create a new organization API key.", "responses": { - "200": { - "description": "Languages List", + "201": { + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/languageList" + "$ref": "#\/components\/schemas\/key" } } } @@ -24941,53 +37949,131 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLanguages", - "group": null, + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "locale\/list-languages.md", + "demo": "organization\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", + "scope": "organization.keys.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], "Key": [], - "JWT": [] + "Organization": [] } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<KEY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ], + "x-enum-name": "OrganizationKeyScopes", + "x-enum-keys": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } + } + } } }, - "\/messaging\/messages": { + "\/organization\/keys\/{keyId}": { "get": { - "summary": "List messages", - "operationId": "messagingListMessages", + "summary": "Get organization key", + "operationId": "organizationGetKey", "tags": [ - "messaging" + "organization" ], - "description": "Get a list of all messages from the current Appwrite project.", + "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.", "responses": { "200": { - "description": "Message list", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/messageList" + "$ref": "#\/components\/schemas\/key" } } } @@ -24995,22 +38081,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMessages", - "group": "messages", + "method": "getKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/list-messages.md", + "demo": "organization\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "organization.keys.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "auth": { "Project": [], "Key": [] @@ -25019,63 +38104,37 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/messaging\/messages\/email": { - "post": { - "summary": "Create email", - "operationId": "messagingCreateEmail", + }, + "put": { + "summary": "Update organization key", + "operationId": "organizationUpdateKey", "tags": [ - "messaging" + "organization" ], - "description": "Create a new email message.", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", "responses": { - "201": { - "description": "Message", + "200": { + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/key" } } } @@ -25083,22 +38142,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEmail", - "group": "messages", + "method": "updateKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/create-email.md", + "demo": "organization\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "organization.keys.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "auth": { "Project": [], "Key": [] @@ -25107,7 +38165,20 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" } ], "requestBody": { @@ -25116,124 +38187,143 @@ "schema": { "type": "object", "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>" - }, - "content": { + "name": { "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "attachments": { + "scopes": { "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": [], + "description": "Key scopes list. Maximum of 200 scopes are allowed.", "x-example": null, "items": { - "type": "string" + "type": "string", + "enum": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ], + "x-enum-name": "OrganizationKeyScopes", + "x-enum-keys": [ + "projects.read", + "projects.write", + "devKeys.read", + "devKeys.write", + "organization.keys.read", + "organization.keys.write", + "organization.installations.read", + "organization.installations.write", + "organization.memberships.read", + "organization.memberships.write", + "organization.read", + "organization.write", + "domains.read", + "domains.write", + "keys.read", + "keys.write" + ] } }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "default": false, - "x-example": false - }, - "scheduledAt": { + "expire": { "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", "x-example": "2020-10-15T06:38:00.000+00:00", "format": "datetime", "x-nullable": true } }, "required": [ - "messageId", - "subject", - "content" + "name", + "scopes" ] } } } } + }, + "delete": { + "summary": "Delete organization key", + "operationId": "organizationDeleteKey", + "tags": [ + "organization" + ], + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "cookies": false, + "type": "", + "demo": "organization\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.keys.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<KEY_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/messages\/email\/{messageId}": { - "patch": { - "summary": "Update email", - "operationId": "messagingUpdateEmail", + "\/organization\/memberships": { + "get": { + "summary": "List organization memberships", + "operationId": "organizationListMemberships", "tags": [ - "messaging" + "organization" ], - "description": "Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Get a list of all memberships from the current organization.", "responses": { "200": { - "description": "Message", + "description": "Memberships List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/membershipList" } } } @@ -25241,22 +38331,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmail", - "group": "messages", + "method": "listMemberships", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/update-email.md", + "demo": "organization\/list-memberships.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "organization.memberships.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "auth": { "Project": [], "Key": [] @@ -25265,134 +38354,62 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, roles", + "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": "<MESSAGE_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "subject": { - "type": "string", - "description": "Email Subject.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "html": { - "type": "boolean", - "description": "Is content of type HTML", - "x-example": false, - "x-nullable": true - }, - "cc": { - "type": "array", - "description": "Array of target IDs to be added as CC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "bcc": { - "type": "array", - "description": "Array of target IDs to be added as BCC.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "attachments": { - "type": "array", - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - } - } - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/messaging\/messages\/push": { + ] + }, "post": { - "summary": "Create push notification", - "operationId": "messagingCreatePush", + "summary": "Create organization membership", + "operationId": "organizationCreateMembership", "tags": [ - "messaging" + "organization" ], - "description": "Create a new push notification.", + "description": "Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.", "responses": { "201": { - "description": "Message", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/membership" } } } @@ -25400,22 +38417,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPush", - "group": "messages", + "method": "createMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/create-push.md", - "rate-limit": 0, + "demo": "organization\/create-membership.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "organization.memberships.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "auth": { "Project": [], "Key": [] @@ -25424,7 +38440,8 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "requestBody": { @@ -25433,146 +38450,50 @@ "schema": { "type": "object", "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "default": "", - "x-example": "<TITLE>" - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "default": "", - "x-example": "<BODY>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "description": "Additional key-value pair data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "default": "", - "x-example": "<ACTION>" - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "default": "", - "x-example": "<ID1:ID2>" - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web Platform.", - "default": "", - "x-example": "<ICON>" - }, - "sound": { + "email": { "type": "string", - "description": "Sound for push notification. Available only for Android and iOS Platform.", + "description": "Email of the new organization member.", "default": "", - "x-example": "<SOUND>" + "x-example": "email@example.com", + "format": "email" }, - "color": { + "userId": { "type": "string", - "description": "Color for push notification. Available only for Android Platform.", + "description": "ID of the user to be added to the organization.", "default": "", - "x-example": "<COLOR>" + "x-example": "<USER_ID>" }, - "tag": { + "phone": { "type": "string", - "description": "Tag for push notification. Available only for Android Platform.", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", "default": "", - "x-example": "<TAG>" - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS Platform.", - "default": -1, - "x-example": null, - "format": "int32" - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "x-example": "+12065550100", + "format": "phone" }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "default": false, - "x-example": false + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "default": false, - "x-example": false + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" }, - "priority": { + "name": { "type": "string", - "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", - "default": "high", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [ - "normal", - "high" - ] + "description": "Name of the new organization member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" } }, "required": [ - "messageId" + "roles" ] } } @@ -25580,21 +38501,21 @@ } } }, - "\/messaging\/messages\/push\/{messageId}": { - "patch": { - "summary": "Update push notification", - "operationId": "messagingUpdatePush", + "\/organization\/memberships\/{membershipId}": { + "get": { + "summary": "Get organization membership", + "operationId": "organizationGetMembership", "tags": [ - "messaging" + "organization" ], - "description": "Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Get a membership from the current organization by its unique ID.", "responses": { "200": { - "description": "Message", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/membership" } } } @@ -25602,22 +38523,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePush", - "group": "messages", + "method": "getMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "messaging\/update-push.md", + "demo": "organization\/get-membership.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "organization.memberships.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "auth": { "Project": [], "Key": [] @@ -25625,18 +38545,80 @@ }, "security": [ { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update organization membership", + "operationId": "organizationUpdateMembership", + "tags": [ + "organization" + ], + "description": "Modify the roles of a member in the current organization.", + "responses": { + "200": { + "description": "Membership", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/membership" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateMembership", + "group": "memberships", + "cookies": false, + "type": "", + "demo": "organization\/update-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { "Project": [], "Key": [] } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" } @@ -25647,252 +38629,115 @@ "schema": { "type": "object", "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { + "roles": { "type": "array", - "description": "List of Targets IDs.", + "description": "An array of strings. Use this param to set the user's roles in the organization. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", "x-example": null, "items": { "type": "string" - }, - "x-nullable": true - }, - "title": { - "type": "string", - "description": "Title for push notification.", - "x-example": "<TITLE>", - "x-nullable": true - }, - "body": { - "type": "string", - "description": "Body for push notification.", - "x-example": "<BODY>", - "x-nullable": true - }, - "data": { - "type": "object", - "description": "Additional Data for push notification.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "action": { - "type": "string", - "description": "Action for push notification.", - "x-example": "<ACTION>", - "x-nullable": true - }, - "image": { - "type": "string", - "description": "Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.", - "x-example": "<ID1:ID2>", - "x-nullable": true - }, - "icon": { - "type": "string", - "description": "Icon for push notification. Available only for Android and Web platforms.", - "x-example": "<ICON>", - "x-nullable": true - }, - "sound": { - "type": "string", - "description": "Sound for push notification. Available only for Android and iOS platforms.", - "x-example": "<SOUND>", - "x-nullable": true - }, - "color": { - "type": "string", - "description": "Color for push notification. Available only for Android platforms.", - "x-example": "<COLOR>", - "x-nullable": true - }, - "tag": { - "type": "string", - "description": "Tag for push notification. Available only for Android platforms.", - "x-example": "<TAG>", - "x-nullable": true - }, - "badge": { - "type": "integer", - "description": "Badge for push notification. Available only for iOS platforms.", - "x-example": null, - "format": "int32", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - }, - "contentAvailable": { - "type": "boolean", - "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "critical": { - "type": "boolean", - "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", - "x-example": false, - "x-nullable": true - }, - "priority": { - "type": "string", - "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", - "x-example": "normal", - "enum": [ - "normal", - "high" - ], - "x-enum-name": "MessagePriority", - "x-enum-keys": [ - "normal", - "high" - ], - "x-nullable": true + } } - } + }, + "required": [ + "roles" + ] } } } } + }, + "delete": { + "summary": "Delete organization membership", + "operationId": "organizationDeleteMembership", + "tags": [ + "organization" + ], + "description": "Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteMembership", + "group": "memberships", + "cookies": false, + "type": "", + "demo": "organization\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "organization.memberships.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "parameters": [ + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<MEMBERSHIP_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/messages\/sms": { - "post": { - "summary": "Create SMS", - "operationId": "messagingCreateSms", + "\/organization\/projects": { + "get": { + "summary": "List organization projects", + "operationId": "organizationListProjects", "tags": [ - "messaging" + "organization" ], - "description": "Create a new SMS message.", + "description": "Get a list of all projects. You can use the query params to filter your results.", "responses": { - "201": { - "description": "Message", + "200": { + "description": "Projects List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/projectList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createSms", - "group": "messages", + "method": "listProjects", + "group": "projects", "cookies": false, "type": "", - "demo": "messaging\/create-sms.md", + "demo": "organization\/list-projects.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "projects.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - }, - "methods": [ - { - "name": "createSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMS" - } - }, - { - "name": "createSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "content", - "topics", - "users", - "targets", - "draft", - "scheduledAt" - ], - "required": [ - "messageId", - "content" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Create a new SMS message.", - "demo": "messaging\/create-sms.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -25901,72 +38746,138 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "messageId": { - "type": "string", - "description": "Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<MESSAGE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "content": { - "type": "string", - "description": "SMS Content.", - "x-example": "<CONTENT>" - }, - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } + "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, labels, search, accessedAt", + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create organization project", + "operationId": "organizationCreateProject", + "tags": [ + "organization" + ], + "description": "Create a new project.", + "responses": { + "201": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createProject", + "group": "projects", + "cookies": false, + "type": "", + "demo": "organization\/create-project.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Organization": [] + } + ], + "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 }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "default": false, - "x-example": false + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "scheduledAt": { + "region": { "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true + "description": "Project Region.", + "x-example": "fra", + "enum": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ], + "x-enum-name": "Region", + "x-enum-keys": [ + "fra", + "nyc", + "syd", + "sfo", + "sgp", + "tor" + ] } }, "required": [ - "messageId", - "content" + "projectId", + "name" ] } } @@ -25974,114 +38885,43 @@ } } }, - "\/messaging\/messages\/sms\/{messageId}": { - "patch": { - "summary": "Update SMS", - "operationId": "messagingUpdateSms", + "\/organization\/projects\/{projectId}": { + "get": { + "summary": "Get organization project", + "operationId": "organizationGetProject", "tags": [ - "messaging" + "organization" ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", + "description": "Get a project.", "responses": { "200": { - "description": "Message", + "description": "Project", "content": { - "application\/json": { + "": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/project" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateSms", - "group": "messages", + "method": "getProject", + "group": "projects", "cookies": false, "type": "", - "demo": "messaging\/update-sms.md", + "demo": "organization\/get-project.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "projects.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - }, - "methods": [ - { - "name": "updateSms", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMS" - } - }, - { - "name": "updateSMS", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "messageId", - "topics", - "users", - "targets", - "content", - "draft", - "scheduledAt" - ], - "required": [ - "messageId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/message" - } - ], - "description": "Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.\n", - "demo": "messaging\/update-sms.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -26090,95 +38930,37 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "projectId", + "description": "Project unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topics": { - "type": "array", - "description": "List of Topic IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "users": { - "type": "array", - "description": "List of User IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "targets": { - "type": "array", - "description": "List of Targets IDs.", - "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true - }, - "content": { - "type": "string", - "description": "Email Content.", - "x-example": "<CONTENT>", - "x-nullable": true - }, - "draft": { - "type": "boolean", - "description": "Is message a draft", - "x-example": false, - "x-nullable": true - }, - "scheduledAt": { - "type": "string", - "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/messaging\/messages\/{messageId}": { - "get": { - "summary": "Get message", - "operationId": "messagingGetMessage", + ] + }, + "patch": { + "summary": "Update organization project", + "operationId": "organizationUpdateProject", "tags": [ - "messaging" + "organization" ], - "description": "Get a message by its unique ID.\n", + "description": "Update a project by its unique ID.", "responses": { "200": { - "description": "Message", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/message" + "$ref": "#\/components\/schemas\/project" } } } @@ -26186,22 +38968,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getMessage", - "group": "messages", + "method": "updateProject", + "group": "projects", "cookies": false, "type": "", - "demo": "messaging\/get-message.md", + "demo": "organization\/update-project.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "projects.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "auth": { "Project": [], "Key": [] @@ -26210,29 +38991,49 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "projectId", + "description": "Project unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "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>" + } + }, + "required": [ + "name" + ] + } + } + } + } }, "delete": { - "summary": "Delete message", - "operationId": "messagingDelete", + "summary": "Delete organization project", + "operationId": "organizationDeleteProject", "tags": [ - "messaging" + "organization" ], - "description": "Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.", + "description": "Delete a project by its unique ID.", "responses": { "204": { "description": "No content" @@ -26240,22 +39041,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "messages", + "method": "deleteProject", + "group": "projects", "cookies": false, "type": "", - "demo": "messaging\/delete.md", + "demo": "organization\/delete-project.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.write", + "scope": "projects.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "auth": { "Project": [], "Key": [] @@ -26264,38 +39064,39 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Organization": [] } ], "parameters": [ { - "name": "messageId", - "description": "Message ID.", + "name": "projectId", + "description": "Project unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<MESSAGE_ID>" + "x-example": "<PROJECT_ID>" }, "in": "path" } ] } }, - "\/messaging\/messages\/{messageId}\/logs": { + "\/ping": { "get": { - "summary": "List message logs", - "operationId": "messagingListMessageLogs", + "summary": "Test the connection between the Appwrite and the SDK.", + "operationId": "pingGet", "tags": [ - "messaging" + "ping" ], - "description": "Get the message activity logs listed by its unique ID.", + "description": "Send a ping to project as part of onboarding.", "responses": { "200": { - "description": "Logs List", + "description": "Any", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/any" } } } @@ -26303,22 +39104,74 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMessageLogs", - "group": "logs", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/list-message-logs.md", + "demo": "ping\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "global", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [], + "Session": [] + } + ] + } + }, + "\/postgresql": { + "get": { + "summary": "List databases", + "operationId": "postgresqlList", + "tags": [ + "postgresql" + ], + "description": "List all dedicated databases. Results support pagination.", + "responses": { + "200": { + "description": "Dedicated databases list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "list", + "group": "postgresql", + "cookies": false, + "type": "", + "demo": "postgresql\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "auth": { "Project": [], "Key": [] @@ -26331,19 +39184,9 @@ } ], "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", + "description": "Array of query strings.", "required": false, "schema": { "type": "array", @@ -26353,36 +39196,188 @@ "default": [] }, "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] + }, + "post": { + "summary": "Create database", + "operationId": "postgresqlCreate", + "tags": [ + "postgresql" + ], + "description": "Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.", + "responses": { + "201": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "postgresql", + "cookies": false, + "type": "", + "demo": "postgresql\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "databaseId": { + "type": "string", + "description": "Database ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are 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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Database display name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "version": { + "type": "string", + "description": "Database engine version. Defaults to latest for selected engine.", + "x-example": "17", + "x-nullable": true + }, + "specification": { + "type": "string", + "description": "Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.", + "default": "s-1vcpu-1gb", + "x-example": "<SPECIFICATION>" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + }, + "standbyRegion": { + "type": "string", + "description": "Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "default": 900, + "x-example": 60, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes of inactivity before container scales to zero.", + "default": 15, + "x-example": 5, + "format": "int32" + }, + "pitr": { + "type": "boolean", + "description": "Enable point-in-time recovery (PITR). Continuously archives changes so the database can be restored to any moment within the retention window.", + "default": true, + "x-example": false + }, + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "default": 7, + "x-example": 1, + "format": "int32" + }, + "storageAutoscaling": { + "type": "boolean", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "default": false, + "x-example": false + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "default": 85, + "x-example": 50, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "default": 0, + "x-example": 0, + "format": "int32" + } + }, + "required": [ + "databaseId", + "name" + ] + } + } + } + } } }, - "\/messaging\/messages\/{messageId}\/targets": { + "\/postgresql\/specifications": { "get": { - "summary": "List message targets", - "operationId": "messagingListTargets", + "summary": "List specifications", + "operationId": "postgresqlListSpecifications", "tags": [ - "messaging" + "postgresql" ], - "description": "Get a list of the targets associated with a message.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "Target list", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/targetList" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -26390,22 +39385,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTargets", - "group": "messages", + "method": "listSpecifications", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/list-targets.md", + "demo": "postgresql\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "messages.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "auth": { "Project": [], "Key": [] @@ -26416,60 +39410,24 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "messageId", - "description": "Message ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<MESSAGE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } ] } }, - "\/messaging\/providers": { + "\/postgresql\/{databaseId}": { "get": { - "summary": "List providers", - "operationId": "messagingListProviders", + "summary": "Get database", + "operationId": "postgresqlGet", "tags": [ - "messaging" + "postgresql" ], - "description": "Get a list of all providers from the current Appwrite project.", + "description": "Get a dedicated database by its unique ID. Returns the database configuration and current status.", "responses": { "200": { - "description": "Provider list", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/providerList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -26477,22 +39435,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProviders", - "group": "providers", + "method": "get", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/list-providers.md", + "demo": "postgresql\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "auth": { "Project": [], "Key": [] @@ -26506,155 +39463,53 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/messaging\/providers\/apns": { - "post": { - "summary": "Create APNS provider", - "operationId": "messagingCreateApnsProvider", + }, + "patch": { + "summary": "Update database", + "operationId": "postgresqlUpdate", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Apple Push Notification service provider.", + "description": "Update a dedicated database configuration. All changes are applied with zero downtime. Specification changes (cpu, memory, storage) are handled via rolling cutover. Storage expansion is done online. All other settings are applied in-place.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createApnsProvider", - "group": "providers", + "method": "update", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/create-apns-provider.md", + "demo": "postgresql\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - }, - "methods": [ - { - "name": "createApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createAPNSProvider" - } - }, - { - "name": "createAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Apple Push Notification service provider.", - "demo": "messaging\/create-apns-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -26666,364 +39521,274 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, "name": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "Database display name.", + "x-example": "<NAME>", + "x-nullable": true }, - "authKey": { + "status": { "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" + "description": "Database status. Allowed values: ready, paused, inactive. Set to \"paused\" to pause, \"ready\" to resume (also recovers a failed database whose infrastructure is healthy), or \"inactive\" to spin down a shared-pool database.", + "x-example": "ready", + "x-nullable": true }, - "authKeyId": { + "specification": { "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" + "description": "Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.", + "x-example": "<SPECIFICATION>", + "x-nullable": true }, - "teamId": { + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5). High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" + "description": "Replication sync mode preference. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true }, - "bundleId": { + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "standbyRegion": { "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" + "description": "Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.", + "x-example": "<STANDBY_REGION>", + "x-nullable": true }, - "sandbox": { + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds (60-86400).", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "idleTimeoutMinutes": { + "type": "integer", + "description": "Minutes before container scales to zero.", + "x-example": 5, + "format": "int32", + "x-nullable": true + }, + "pitr": { "type": "boolean", - "description": "Use APNS sandbox environment.", - "default": false, - "x-example": false + "description": "Enable or disable point-in-time recovery (PITR).", + "x-example": false, + "x-nullable": true }, - "enabled": { + "pitrRetentionDays": { + "type": "integer", + "description": "Days to retain PITR data.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "storageAutoscaling": { "type": "boolean", - "description": "Set as enabled.", + "description": "Enable automatic storage expansion when usage exceeds threshold.", + "x-example": false, + "x-nullable": true + }, + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage (50-95) that triggers automatic expansion.", + "x-example": 50, + "format": "int32", + "x-nullable": true + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "metricsTraceSampleRate": { + "type": "number", + "description": "Fraction of queries to trace (0.0\u20131.0). Forwarded to the sidecar.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "metricsSlowQueryLogThresholdMs": { + "type": "integer", + "description": "Threshold in ms above which queries are logged as slow. Forwarded to the sidecar.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "sqlApiEnabled": { + "type": "boolean", + "description": "Enable the SQL API sidecar for this database.", "x-example": false, "x-nullable": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types the SQL API accepts. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution (1-1000000).", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes (1024-104857600).", + "x-example": 1024, + "format": "int32", + "x-nullable": true + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Per-call SQL API execution timeout in seconds (1-300).", + "x-example": 1, + "format": "int32", + "x-nullable": true } - }, - "required": [ - "providerId", - "name" - ] + } } } } } - } - }, - "\/messaging\/providers\/apns\/{providerId}": { - "patch": { - "summary": "Update APNS provider", - "operationId": "messagingUpdateApnsProvider", + }, + "delete": { + "summary": "Delete database", + "operationId": "postgresqlDelete", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Apple Push Notification service provider by its unique ID.", + "description": "Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.", "responses": { - "200": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } + "204": { + "description": "No content" } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateApnsProvider", - "group": "providers", + "method": "delete", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/update-apns-provider.md", + "demo": "postgresql\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - }, - "methods": [ - { - "name": "updateApnsProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateAPNSProvider" - } - }, - { - "name": "updateAPNSProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "authKey", - "authKeyId", - "teamId", - "bundleId", - "sandbox" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Apple Push Notification service provider by its unique ID.", - "demo": "messaging\/update-apns-provider.md", - "public": true - } + "public": true, + "produces": [ + "application\/json" ], "auth": { "Project": [], "Key": [] } }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "providerId", - "description": "Provider ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROVIDER_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "authKey": { - "type": "string", - "description": "APNS authentication key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "authKeyId": { - "type": "string", - "description": "APNS authentication key ID.", - "default": "", - "x-example": "<AUTH_KEY_ID>" - }, - "teamId": { - "type": "string", - "description": "APNS team ID.", - "default": "", - "x-example": "<TEAM_ID>" - }, - "bundleId": { - "type": "string", - "description": "APNS bundle ID.", - "default": "", - "x-example": "<BUNDLE_ID>" - }, - "sandbox": { - "type": "boolean", - "description": "Use APNS sandbox environment.", - "x-example": false, - "x-nullable": true - } - } - } - } + "security": [ + { + "Project": [], + "Key": [] } - } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/providers\/fcm": { - "post": { - "summary": "Create FCM provider", - "operationId": "messagingCreateFcmProvider", + "\/postgresql\/{databaseId}\/backups": { + "get": { + "summary": "List backups", + "operationId": "postgresqlListBackups", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Firebase Cloud Messaging provider.", + "description": "List all backups for a dedicated database. Results can be filtered by status and type.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "BackupList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createFcmProvider", - "group": "providers", + "method": "listBackups", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/create-fcm-provider.md", + "demo": "postgresql\/list-backups.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - }, - "methods": [ - { - "name": "createFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createFCMProvider" - } - }, - { - "name": "createFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "serviceAccountJSON", - "enabled" - ], - "required": [ - "providerId", - "name" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new Firebase Cloud Messaging provider.", - "demo": "messaging\/create-fcm-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -27035,151 +39800,68 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, type, databaseId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - } - } - }, - "\/messaging\/providers\/fcm\/{providerId}": { - "patch": { - "summary": "Update FCM provider", - "operationId": "messagingUpdateFcmProvider", + ] + }, + "post": { + "summary": "Create backup", + "operationId": "postgresqlCreateBackup", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", + "description": "Create a manual backup of a dedicated database. The backup will be created asynchronously and its status can be checked via the get backup endpoint.", "responses": { - "200": { - "description": "Provider", + "202": { + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateFcmProvider", - "group": "providers", + "method": "createBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/update-fcm-provider.md", + "demo": "postgresql\/create-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - }, - "methods": [ - { - "name": "updateFcmProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateFCMProvider" - } - }, - { - "name": "updateFCMProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "enabled", - "serviceAccountJSON" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a Firebase Cloud Messaging provider by its unique ID.", - "demo": "messaging\/update-fcm-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -27193,12 +39875,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -27209,24 +39891,11 @@ "schema": { "type": "object", "properties": { - "name": { + "type": { "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "serviceAccountJSON": { - "type": "object", - "description": "FCM service account JSON.", - "default": {}, - "x-example": "{}", - "x-nullable": true + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" } } } @@ -27235,21 +39904,21 @@ } } }, - "\/messaging\/providers\/mailgun": { - "post": { - "summary": "Create Mailgun provider", - "operationId": "messagingCreateMailgunProvider", + "\/postgresql\/{databaseId}\/backups\/policies": { + "get": { + "summary": "List backup policies", + "operationId": "postgresqlListBackupPolicies", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Mailgun provider.", + "description": "List scheduled backup policies for a dedicated database.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Backup policy list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/backupPolicyList" } } } @@ -27257,22 +39926,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMailgunProvider", - "group": "providers", + "method": "listBackupPolicies", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/create-mailgun-provider.md", + "demo": "postgresql\/list-backup-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "auth": { "Project": [], "Key": [] @@ -27284,101 +39952,46 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" - }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" - }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - } - } - }, - "\/messaging\/providers\/mailgun\/{providerId}": { - "patch": { - "summary": "Update Mailgun provider", - "operationId": "messagingUpdateMailgunProvider", + ] + }, + "post": { + "summary": "Create backup policy", + "operationId": "postgresqlCreateBackupPolicy", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Mailgun provider by its unique ID.", + "description": "Create a scheduled backup policy for a dedicated database.", "responses": { - "200": { - "description": "Provider", + "201": { + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -27386,22 +39999,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMailgunProvider", - "group": "providers", + "method": "createBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/update-mailgun-provider.md", + "demo": "postgresql\/create-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "auth": { "Project": [], "Key": [] @@ -27415,12 +40027,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -27431,83 +40043,70 @@ "schema": { "type": "object", "properties": { + "policyId": { + "type": "string", + "description": "Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<POLICY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "name": { "type": "string", - "description": "Provider name.", - "default": "", + "description": "Policy name. Max length: 128 chars.", "x-example": "<NAME>" }, - "apiKey": { + "schedule": { "type": "string", - "description": "Mailgun API Key.", - "default": "", - "x-example": "<API_KEY>" + "description": "Schedule CRON syntax.", + "x-example": null }, - "domain": { - "type": "string", - "description": "Mailgun Domain.", - "default": "", - "x-example": "<DOMAIN>" + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32" }, - "isEuRegion": { - "type": "boolean", - "description": "Set as EU region.", - "x-example": false, - "x-nullable": true + "type": { + "type": "string", + "description": "Backup type: full or incremental.", + "default": "full", + "x-example": "full" }, "enabled": { "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" + "description": "Is policy enabled? When disabled, no backups will be taken.", + "default": true, + "x-example": false } - } + }, + "required": [ + "policyId", + "name", + "schedule", + "retention" + ] } } } } } }, - "\/messaging\/providers\/msg91": { - "post": { - "summary": "Create Msg91 provider", - "operationId": "messagingCreateMsg91Provider", + "\/postgresql\/{databaseId}\/backups\/policies\/{policyId}": { + "get": { + "summary": "Get backup policy", + "operationId": "postgresqlGetBackupPolicy", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new MSG91 provider.", + "description": "Get a scheduled backup policy for a dedicated database.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -27515,22 +40114,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMsg91Provider", - "group": "providers", + "method": "getBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/create-msg-91-provider.md", + "demo": "postgresql\/get-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "auth": { "Project": [], "Key": [] @@ -27542,75 +40140,43 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "templateId": { - "type": "string", - "description": "Msg91 template ID", - "default": "", - "x-example": "<TEMPLATE_ID>" - }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" - }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" } - } - } - }, - "\/messaging\/providers\/msg91\/{providerId}": { + ] + }, "patch": { - "summary": "Update Msg91 provider", - "operationId": "messagingUpdateMsg91Provider", + "summary": "Update backup policy", + "operationId": "postgresqlUpdateBackupPolicy", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a MSG91 provider by its unique ID.", + "description": "Update a scheduled backup policy for a dedicated database.", "responses": { "200": { - "description": "Provider", + "description": "backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/backupPolicy" } } } @@ -27618,22 +40184,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMsg91Provider", - "group": "providers", + "method": "updateBackupPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "messaging\/update-msg-91-provider.md", + "demo": "postgresql\/update-backup-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "auth": { "Project": [], "Key": [] @@ -27647,12 +40212,22 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" }, "in": "path" } @@ -27665,56 +40240,116 @@ "properties": { "name": { "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "description": "Policy name. Max length: 128 chars.", + "x-example": "<NAME>", "x-nullable": true }, - "templateId": { + "schedule": { "type": "string", - "description": "Msg91 template ID.", - "default": "", - "x-example": "<TEMPLATE_ID>" + "description": "Schedule CRON syntax.", + "x-example": null }, - "senderId": { - "type": "string", - "description": "Msg91 sender ID.", - "default": "", - "x-example": "<SENDER_ID>" + "retention": { + "type": "integer", + "description": "Days to keep backups before deletion.", + "x-example": 1, + "format": "int32", + "x-nullable": true }, - "authKey": { - "type": "string", - "description": "Msg91 auth key.", - "default": "", - "x-example": "<AUTH_KEY>" + "enabled": { + "type": "boolean", + "description": "Is policy enabled? When disabled, no backups will be taken.", + "x-example": false, + "x-nullable": true } } } } } } + }, + "delete": { + "summary": "Delete backup policy", + "operationId": "postgresqlDeleteBackupPolicy", + "tags": [ + "postgresql" + ], + "description": "Delete a scheduled backup policy for a dedicated database. Backups already taken by the policy are kept until their retention expires.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteBackupPolicy", + "group": "policies", + "cookies": false, + "type": "", + "demo": "postgresql\/delete-backup-policy.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "policyId", + "description": "Policy ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<POLICY_ID>" + }, + "in": "path" + } + ] } }, - "\/messaging\/providers\/resend": { - "post": { - "summary": "Create Resend provider", - "operationId": "messagingCreateResendProvider", + "\/postgresql\/{databaseId}\/backups\/storage": { + "put": { + "summary": "Update backup storage", + "operationId": "postgresqlUpdateBackupStorage", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Resend provider.", + "description": "Configure off-cluster backup storage for a dedicated database. Supports S3, GCS, and Azure Blob Storage destinations. Backups will be stored to the configured destination in addition to on-cluster storage.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "BackupStorageConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackupStorage" } } } @@ -27722,22 +40357,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createResendProvider", - "group": "providers", + "method": "updateBackupStorage", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/create-resend-provider.md", + "demo": "postgresql\/update-backup-storage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -27749,67 +40383,68 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { + "provider": { "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Storage provider for off-cluster backups. Allowed values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" }, - "name": { + "bucket": { "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" + "description": "Storage bucket or container name.", + "x-example": "<BUCKET>" }, - "apiKey": { + "region": { "type": "string", - "description": "Resend API key.", + "description": "Storage region.", "default": "", - "x-example": "<API_KEY>" + "x-example": "<REGION>" }, - "fromName": { + "prefix": { "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" + "description": "Object key prefix for backups.", + "default": "backups\/", + "x-example": "<PREFIX>" }, - "fromEmail": { + "endpoint": { "type": "string", - "description": "Sender email address.", + "description": "Custom endpoint for S3-compatible storage (e.g. MinIO).", "default": "", - "x-example": "email@example.com", - "format": "email" + "x-example": "<ENDPOINT>" }, - "replyToName": { + "accessKey": { "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" + "description": "Access key or client ID for authentication.", + "x-example": "<ACCESS_KEY>" }, - "replyToEmail": { + "secretKey": { "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true + "description": "Secret key or service account JSON for authentication.", + "x-example": "<SECRET_KEY>" } }, "required": [ - "providerId", - "name" + "provider", + "bucket", + "accessKey", + "secretKey" ] } } @@ -27817,21 +40452,21 @@ } } }, - "\/messaging\/providers\/resend\/{providerId}": { - "patch": { - "summary": "Update Resend provider", - "operationId": "messagingUpdateResendProvider", + "\/postgresql\/{databaseId}\/backups\/{backupId}": { + "get": { + "summary": "Get backup", + "operationId": "postgresqlGetBackup", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Resend provider by its unique ID.", + "description": "Get details of a specific database backup including its status, size, and timestamps.", "responses": { "200": { - "description": "Provider", + "description": "Backup", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" } } } @@ -27839,22 +40474,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateResendProvider", - "group": "providers", + "method": "getBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/update-resend-provider.md", + "demo": "postgresql\/get-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-resend-provider.md", "auth": { "Project": [], "Key": [] @@ -27868,110 +40502,59 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Resend API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/sendgrid": { - "post": { - "summary": "Create Sendgrid provider", - "operationId": "messagingCreateSendgridProvider", + ] + }, + "delete": { + "summary": "Delete backup", + "operationId": "postgresqlDeleteBackup", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Sendgrid provider.", + "description": "Delete a database backup. This will permanently remove the backup from storage and cannot be undone.", "responses": { - "201": { - "description": "Provider", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/provider" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createSendgridProvider", - "group": "providers", + "method": "deleteBackup", + "group": "backups", "cookies": false, "type": "", - "demo": "messaging\/create-sendgrid-provider.md", + "demo": "postgresql\/delete-backup.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -27983,89 +40566,105 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "backupId", + "description": "Backup ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BACKUP_ID>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/branches": { + "get": { + "summary": "List branches", + "operationId": "postgresqlListBranches", + "tags": [ + "postgresql" + ], + "description": "List all ephemeral branches for a dedicated database. Returns branch metadata including ID, name, namespace, and expiration time.", + "responses": { + "200": { + "description": "BranchList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranchList" + } } } } - } - } - }, - "\/messaging\/providers\/sendgrid\/{providerId}": { - "patch": { - "summary": "Update Sendgrid provider", - "operationId": "messagingUpdateSendgridProvider", + }, + "deprecated": false, + "x-appwrite": { + "method": "listBranches", + "group": "branches", + "cookies": false, + "type": "", + "demo": "postgresql\/list-branches.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "post": { + "summary": "Create branch", + "operationId": "postgresqlCreateBranch", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Sendgrid provider by its unique ID.", + "description": "Create an ephemeral database branch from the primary via PVC snapshot. The branch is a full copy of the database at the current point in time, useful for testing schema migrations or running experiments without affecting production data. Branches expire after the configured TTL (default 24 hours). The branch is created asynchronously.", "responses": { - "200": { - "description": "Provider", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -28073,22 +40672,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSendgridProvider", - "group": "providers", + "method": "createBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "messaging\/update-sendgrid-provider.md", + "demo": "postgresql\/create-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "auth": { "Project": [], "Key": [] @@ -28102,12 +40700,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -28118,48 +40716,21 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Sendgrid API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { + "branchId": { "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", + "description": "Branch ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "default": "", - "x-example": "<REPLY_TO_NAME>" + "x-example": "<BRANCH_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" + "ttl": { + "type": "integer", + "description": "Time-to-live in seconds before the branch expires. Min 300 (5 min), max 604800 (7 days). Default: 86400 (24h).", + "default": 86400, + "x-example": 300, + "format": "int32" } } } @@ -28168,21 +40739,21 @@ } } }, - "\/messaging\/providers\/ses": { - "post": { - "summary": "Create Amazon SES provider", - "operationId": "messagingCreateSesProvider", + "\/postgresql\/{databaseId}\/branches\/{branchId}": { + "delete": { + "summary": "Delete branch", + "operationId": "postgresqlDeleteBranch", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Amazon SES provider.", + "description": "Delete an ephemeral database branch. This removes the branch namespace, its PVC, and the associated VolumeSnapshot. The deletion runs asynchronously and is irreversible.", "responses": { - "201": { - "description": "Provider", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -28190,22 +40761,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSesProvider", - "group": "providers", + "method": "deleteBranch", + "group": "branches", "cookies": false, "type": "", - "demo": "messaging\/create-ses-provider.md", + "demo": "postgresql\/delete-branch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -28217,101 +40787,45 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "accessKey": { - "type": "string", - "description": "AWS access key ID.", - "default": "", - "x-example": "<ACCESS_KEY>" - }, - "secretKey": { - "type": "string", - "description": "AWS secret access key.", - "default": "", - "x-example": "<SECRET_KEY>" - }, - "region": { - "type": "string", - "description": "AWS region, for example us-east-1.", - "default": "", - "x-example": "<REGION>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "branchId", + "description": "Branch ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<BRANCH_ID>" + }, + "in": "path" } - } + ] } }, - "\/messaging\/providers\/ses\/{providerId}": { + "\/postgresql\/{databaseId}\/credentials": { "patch": { - "summary": "Update Amazon SES provider", - "operationId": "messagingUpdateSesProvider", + "summary": "Update credentials", + "operationId": "postgresqlUpdateCredentials", "tags": [ - "messaging" + "postgresql" ], - "description": "Update an Amazon SES provider by its unique ID.", + "description": "Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.", "responses": { "200": { - "description": "Provider", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -28319,22 +40833,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSesProvider", - "group": "providers", + "method": "updateCredentials", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/update-ses-provider.md", + "demo": "postgresql\/update-credentials.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-ses-provider.md", "auth": { "Project": [], "Key": [] @@ -28348,210 +40861,55 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "accessKey": { - "type": "string", - "description": "AWS access key ID.", - "default": "", - "x-example": "<ACCESS_KEY>" - }, - "secretKey": { - "type": "string", - "description": "AWS secret access key.", - "default": "", - "x-example": "<SECRET_KEY>" - }, - "region": { - "type": "string", - "description": "AWS region, for example us-east-1.", - "default": "", - "x-example": "<REGION>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - } - } - } - } - } - } + ] } }, - "\/messaging\/providers\/smtp": { + "\/postgresql\/{databaseId}\/executions": { "post": { - "summary": "Create SMTP provider", - "operationId": "messagingCreateSmtpProvider", + "summary": "Create execution", + "operationId": "postgresqlCreateExecution", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new SMTP provider.", + "description": "Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https:\/\/db-{project}-{db}.{region}.appwrite.center\/v1\/sql\/executions` with an `X-Appwrite-Key` header \u2014 that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values \u2014 the API does not interpolate raw strings.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecution" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createSmtpProvider", - "group": "providers", + "method": "createExecution", + "group": "executions", "cookies": false, "type": "", - "demo": "messaging\/create-smtp-provider.md", + "demo": "postgresql\/create-execution.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - }, - "methods": [ - { - "name": "createSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.createSMTPProvider" - } - }, - { - "name": "createSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId", - "name", - "host" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Create a new SMTP provider.", - "demo": "messaging\/create-smtp-provider.md", - "public": true - } - ], + "public": true, "auth": { "Project": [], "Key": [] @@ -28563,115 +40921,46 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "The default SMTP server port.", - "default": 587, - "x-example": 1, - "format": "int32" - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "password", - "format": "password" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be omitted, 'ssl', or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [ - "none", - "ssl", - "tls" - ] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "default": true, - "x-example": false - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { + "sql": { "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the reply to field for the mail. Default value is sender name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" + "description": "SQL statement to execute. Exactly one statement per request.", + "x-example": "<SQL>" }, - "replyToEmail": { - "type": "string", - "description": "Email set in the reply to field for the mail. Default value is sender email.", - "default": "", - "x-example": "email@example.com", - "format": "email" + "bindings": { + "type": "object", + "description": "Optional bound parameters. Pass either a positional list or a name => value map matching the placeholder style used in the SQL.", + "default": {}, + "x-example": "{}", + "x-nullable": true }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "timeoutSeconds": { + "type": "integer", + "description": "Per-call execution timeout override. Must be less than or equal to the database's configured sqlApiTimeoutSeconds.", + "x-example": 1, + "format": "int32", "x-nullable": true } }, "required": [ - "providerId", - "name", - "host" + "sql" ] } } @@ -28679,128 +40968,103 @@ } } }, - "\/messaging\/providers\/smtp\/{providerId}": { - "patch": { - "summary": "Update SMTP provider", - "operationId": "messagingUpdateSmtpProvider", + "\/postgresql\/{databaseId}\/extensions": { + "get": { + "summary": "List extensions", + "operationId": "postgresqlListExtensions", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a SMTP provider by its unique ID.", + "description": "List installed and available extensions for a PostgreSQL database.", "responses": { "200": { - "description": "Provider", + "description": "Extensions", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseExtensions" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateSmtpProvider", - "group": "providers", + "method": "listExtensions", + "group": "extensions", "cookies": false, "type": "", - "demo": "messaging\/update-smtp-provider.md", + "demo": "postgresql\/list-extensions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - }, - "methods": [ - { - "name": "updateSmtpProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" - } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "messaging.updateSMTPProvider" - } + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" }, - { - "name": "updateSMTPProvider", - "namespace": "messaging", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "providerId", - "name", - "host", - "port", - "username", - "password", - "encryption", - "autoTLS", - "mailer", - "fromName", - "fromEmail", - "replyToName", - "replyToEmail", - "enabled" - ], - "required": [ - "providerId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/provider" + "in": "path" + } + ] + }, + "post": { + "summary": "Create extension", + "operationId": "postgresqlCreateExtension", + "tags": [ + "postgresql" + ], + "description": "Install a database extension. Only available for PostgreSQL databases. The install runs asynchronously; poll the extensions list endpoint for status.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" } - ], - "description": "Update a SMTP provider by its unique ID.", - "demo": "messaging\/update-smtp-provider.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createExtension", + "group": "extensions", + "cookies": false, + "type": "", + "demo": "postgresql\/create-extension.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" ], + "packaging": false, + "public": true, "auth": { "Project": [], "Key": [] @@ -28814,12 +41078,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -28832,117 +41096,106 @@ "properties": { "name": { "type": "string", - "description": "Provider name.", - "default": "", + "description": "Extension name (e.g., pgvector, postgis, uuid-ossp).", "x-example": "<NAME>" - }, - "host": { - "type": "string", - "description": "SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls:\/\/smtp1.example.com:587;ssl:\/\/smtp2.example.com:465\"`. Hosts will be tried in order.", - "default": "", - "x-example": "<HOST>" - }, - "port": { - "type": "integer", - "description": "SMTP port.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Authentication username.", - "default": "", - "x-example": "<USERNAME>" - }, - "password": { - "type": "string", - "description": "Authentication password.", - "default": "", - "x-example": "password", - "format": "password" - }, - "encryption": { - "type": "string", - "description": "Encryption type. Can be 'ssl' or 'tls'", - "x-example": "none", - "enum": [ - "none", - "ssl", - "tls" - ], - "x-enum-name": "SmtpEncryption", - "x-enum-keys": [ - "none", - "ssl", - "tls" - ] - }, - "autoTLS": { - "type": "boolean", - "description": "Enable SMTP AutoTLS feature.", - "x-example": false, - "x-nullable": true - }, - "mailer": { - "type": "string", - "description": "The value to use for the X-Mailer header.", - "default": "", - "x-example": "<MAILER>" - }, - "fromName": { - "type": "string", - "description": "Sender Name.", - "default": "", - "x-example": "<FROM_NAME>" - }, - "fromEmail": { - "type": "string", - "description": "Sender email address.", - "default": "", - "x-example": "email@example.com", - "format": "email" - }, - "replyToName": { - "type": "string", - "description": "Name set in the Reply To field for the mail. Default value is Sender Name.", - "default": "", - "x-example": "<REPLY_TO_NAME>" - }, - "replyToEmail": { - "type": "string", - "description": "Email set in the Reply To field for the mail. Default value is Sender Email.", - "default": "", - "x-example": "<REPLY_TO_EMAIL>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true } - } + }, + "required": [ + "name" + ] } } } } } }, - "\/messaging\/providers\/telesign": { + "\/postgresql\/{databaseId}\/extensions\/{extensionName}": { + "delete": { + "summary": "Delete extension", + "operationId": "postgresqlDeleteExtension", + "tags": [ + "postgresql" + ], + "description": "Uninstall a database extension from a PostgreSQL database. The uninstall runs asynchronously; poll the extensions list endpoint for status.", + "responses": { + "202": { + "description": "DedicatedDatabase", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteExtension", + "group": "extensions", + "cookies": false, + "type": "", + "demo": "postgresql\/delete-extension.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "extensionName", + "description": "Extension name to uninstall.", + "required": true, + "schema": { + "type": "string", + "x-example": "<EXTENSION_NAME>" + }, + "in": "path" + } + ] + } + }, + "\/postgresql\/{databaseId}\/failovers": { "post": { - "summary": "Create Telesign provider", - "operationId": "messagingCreateTelesignProvider", + "summary": "Create failover", + "operationId": "postgresqlCreateFailover", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Telesign provider.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "201": { - "description": "Provider", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -28950,22 +41203,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTelesignProvider", - "group": "providers", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "messaging\/create-telesign-provider.md", + "demo": "postgresql\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "auth": { "Project": [], "Key": [] @@ -28977,76 +41229,52 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { + "targetReplicaId": { "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", "x-nullable": true } - }, - "required": [ - "providerId", - "name" - ] + } } } } } } }, - "\/messaging\/providers\/telesign\/{providerId}": { + "\/postgresql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update Telesign provider", - "operationId": "messagingUpdateTelesignProvider", + "summary": "Update maintenance", + "operationId": "postgresqlUpdateMaintenance", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Telesign provider by its unique ID.", + "description": "Update the maintenance window for a dedicated database. Maintenance operations like minor version upgrades will be performed during this window.", "responses": { "200": { - "description": "Provider", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -29054,22 +41282,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTelesignProvider", - "group": "providers", + "method": "updateMaintenance", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/update-telesign-provider.md", + "demo": "postgresql\/update-maintenance.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "auth": { "Project": [], "Key": [] @@ -29083,12 +41310,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -29099,58 +41326,43 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "customerId": { - "type": "string", - "description": "Telesign customer ID.", - "default": "", - "x-example": "<CUSTOMER_ID>" - }, - "apiKey": { + "day": { "type": "string", - "description": "Telesign API key.", - "default": "", - "x-example": "<API_KEY>" + "description": "Day of the week for the maintenance window. Allowed values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" + "hourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) for maintenance window start.", + "x-example": 0, + "format": "int32" } - } + }, + "required": [ + "day", + "hourUtc" + ] } } } } } }, - "\/messaging\/providers\/textmagic": { + "\/postgresql\/{databaseId}\/migrations": { "post": { - "summary": "Create Textmagic provider", - "operationId": "messagingCreateTextmagicProvider", + "summary": "Create migration", + "operationId": "postgresqlCreateMigration", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Textmagic provider.", + "description": "Migrate a database between shared and dedicated types. Shared to dedicated provisions an always-on dedicated instance; dedicated to shared converts to a serverless instance that scales to zero when idle. Data is copied to the target with a brief read-only window during cutover.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -29158,22 +41370,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTextmagicProvider", - "group": "providers", + "method": "createMigration", + "group": "migrations", "cookies": false, "type": "", - "demo": "messaging\/create-textmagic-provider.md", + "demo": "postgresql\/create-migration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "auth": { "Project": [], "Key": [] @@ -29185,76 +41396,156 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "username": { + "targetType": { "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" + "description": "Target database type to migrate to. Allowed values: shared (serverless, scales to zero when idle), dedicated (always-on with persistent resources).", + "x-example": "shared" }, - "apiKey": { + "specification": { "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, + "description": "Target specification to provision when migrating to dedicated. Ignored for shared. Defaults to the database's current specification.", + "x-example": "<SPECIFICATION>", "x-nullable": true } }, "required": [ - "providerId", - "name" + "targetType" ] } } } - } + } + } + }, + "\/postgresql\/{databaseId}\/operations": { + "get": { + "summary": "List operations", + "operationId": "postgresqlListOperations", + "tags": [ + "postgresql" + ], + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", + "responses": { + "200": { + "description": "OperationList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listOperations", + "group": "operations", + "cookies": false, + "type": "", + "demo": "postgresql\/list-operations.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] } }, - "\/messaging\/providers\/textmagic\/{providerId}": { - "patch": { - "summary": "Update Textmagic provider", - "operationId": "messagingUpdateTextmagicProvider", + "\/postgresql\/{databaseId}\/pitr": { + "get": { + "summary": "Get PITR", + "operationId": "postgresqlGetPitr", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Textmagic provider by its unique ID.", + "description": "Get available point-in-time recovery windows for a dedicated database. Returns the earliest and latest recovery points.", "responses": { "200": { - "description": "Provider", + "description": "PITRWindows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePITRWindows" } } } @@ -29262,22 +41553,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTextmagicProvider", - "group": "providers", + "method": "getPitr", + "group": "pitr", "cookies": false, "type": "", - "demo": "messaging\/update-textmagic-provider.md", + "demo": "postgresql\/get-pitr.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "auth": { "Project": [], "Key": [] @@ -29291,74 +41581,33 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "username": { - "type": "string", - "description": "Textmagic username.", - "default": "", - "x-example": "<USERNAME>" - }, - "apiKey": { - "type": "string", - "description": "Textmagic apiKey.", - "default": "", - "x-example": "<API_KEY>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - } - } + ] } }, - "\/messaging\/providers\/twilio": { - "post": { - "summary": "Create Twilio provider", - "operationId": "messagingCreateTwilioProvider", + "\/postgresql\/{databaseId}\/pooler": { + "get": { + "summary": "Get pooler", + "operationId": "postgresqlGetPooler", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Twilio provider.", + "description": "Get the connection pooler configuration for a dedicated database. Returns pooler mode, max connections, and pool size settings.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -29366,22 +41615,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTwilioProvider", - "group": "providers", + "method": "getPooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "messaging\/create-twilio-provider.md", + "demo": "postgresql\/get-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "auth": { "Project": [], "Key": [] @@ -29393,76 +41641,33 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "accountSid": { - "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" - }, - "authToken": { - "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } - } - }, - "\/messaging\/providers\/twilio\/{providerId}": { + ] + }, "patch": { - "summary": "Update Twilio provider", - "operationId": "messagingUpdateTwilioProvider", + "summary": "Update pooler", + "operationId": "postgresqlUpdatePooler", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Twilio provider by its unique ID.", + "description": "Update the connection pooler configuration for a dedicated database. Configure pool mode, max connections, and pool sizes.", "responses": { "200": { - "description": "Provider", + "description": "PoolerConfig", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabasePooler" } } } @@ -29470,22 +41675,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTwilioProvider", - "group": "providers", + "method": "updatePooler", + "group": "pooler", "cookies": false, "type": "", - "demo": "messaging\/update-twilio-provider.md", + "demo": "postgresql\/update-pooler.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "auth": { "Project": [], "Key": [] @@ -29499,12 +41703,12 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -29515,35 +41719,55 @@ "schema": { "type": "object", "properties": { - "name": { + "mode": { "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" + "description": "Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.", + "x-example": "transaction", + "x-nullable": true }, - "enabled": { + "maxConnections": { + "type": "integer", + "description": "Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "defaultPoolSize": { + "type": "integer", + "description": "Default pool size per user.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "readWriteSplitting": { "type": "boolean", - "description": "Set as enabled.", + "description": "Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.", "x-example": false, "x-nullable": true }, - "accountSid": { + "poolerCpuRequest": { "type": "string", - "description": "Twilio account secret ID.", - "default": "", - "x-example": "<ACCOUNT_SID>" + "description": "Pooler sidecar CPU request override (Kubernetes quantity, e.g. \"250m\" or \"1\"). Leave null for the proportional default (5% of DB CPU, floor 100m).", + "x-example": "<POOLER_CPU_REQUEST>", + "x-nullable": true }, - "authToken": { + "poolerCpuLimit": { "type": "string", - "description": "Twilio authentication token.", - "default": "", - "x-example": "<AUTH_TOKEN>" + "description": "Pooler sidecar CPU limit override (Kubernetes quantity, e.g. \"500m\" or \"1\"). Leave null for the proportional default (10% of DB CPU, floor 200m). Changing this field rolls the database pod.", + "x-example": "<POOLER_CPU_LIMIT>", + "x-nullable": true }, - "from": { + "poolerMemoryRequest": { "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" + "description": "Pooler sidecar memory request override (Kubernetes quantity, e.g. \"128Mi\" or \"1Gi\"). Leave null for the proportional default (7.5% of DB memory, floor 64Mi).", + "x-example": "<POOLER_MEMORY_REQUEST>", + "x-nullable": true + }, + "poolerMemoryLimit": { + "type": "string", + "description": "Pooler sidecar memory limit override (Kubernetes quantity, e.g. \"256Mi\" or \"1Gi\"). Leave null for the proportional default (15% of DB memory, floor 128Mi). Changing this field rolls the database pod.", + "x-example": "<POOLER_MEMORY_LIMIT>", + "x-nullable": true } } } @@ -29552,21 +41776,21 @@ } } }, - "\/messaging\/providers\/vonage": { - "post": { - "summary": "Create Vonage provider", - "operationId": "messagingCreateVonageProvider", + "\/postgresql\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "postgresqlGetReplicas", "tags": [ - "messaging" + "postgresql" ], - "description": "Create a new Vonage provider.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { - "201": { - "description": "Provider", + "200": { + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -29574,22 +41798,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVonageProvider", - "group": "providers", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "messaging\/create-vonage-provider.md", + "demo": "postgresql\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "auth": { "Project": [], "Key": [] @@ -29601,76 +41824,35 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "providerId": { - "type": "string", - "description": "Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PROVIDER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Provider name.", - "x-example": "<NAME>" - }, - "from": { - "type": "string", - "description": "Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - } - }, - "required": [ - "providerId", - "name" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } - } + ] } }, - "\/messaging\/providers\/vonage\/{providerId}": { - "patch": { - "summary": "Update Vonage provider", - "operationId": "messagingUpdateVonageProvider", + "\/postgresql\/{databaseId}\/restorations": { + "get": { + "summary": "List restorations", + "operationId": "postgresqlListRestorations", "tags": [ - "messaging" + "postgresql" ], - "description": "Update a Vonage provider by its unique ID.", + "description": "List all restorations for a dedicated database. Results can be filtered by status and type.", "responses": { "200": { - "description": "Provider", + "description": "Dedicated database restorations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestorationList" } } } @@ -29678,22 +41860,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVonageProvider", - "group": "providers", + "method": "listRestorations", + "group": "restorations", "cookies": false, "type": "", - "demo": "messaging\/update-vonage-provider.md", + "demo": "postgresql\/list-restorations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "auth": { "Project": [], "Key": [] @@ -29707,74 +41888,75 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by restoration status.", + "required": false, + "schema": { + "type": "string", + "x-example": "pending" + }, + "in": "query" + }, + { + "name": "type", + "description": "Filter by restoration type.", + "required": false, + "schema": { + "type": "string", + "x-example": "backup" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of restorations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of restorations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Provider name.", - "default": "", - "x-example": "<NAME>" - }, - "enabled": { - "type": "boolean", - "description": "Set as enabled.", - "x-example": false, - "x-nullable": true - }, - "apiKey": { - "type": "string", - "description": "Vonage API key.", - "default": "", - "x-example": "<API_KEY>" - }, - "apiSecret": { - "type": "string", - "description": "Vonage API secret.", - "default": "", - "x-example": "<API_SECRET>" - }, - "from": { - "type": "string", - "description": "Sender number.", - "default": "", - "x-example": "<FROM>" - } - } - } - } - } - } - } - }, - "\/messaging\/providers\/{providerId}": { - "get": { - "summary": "Get provider", - "operationId": "messagingGetProvider", + ] + }, + "post": { + "summary": "Create restoration", + "operationId": "postgresqlCreateRestoration", "tags": [ - "messaging" + "postgresql" ], - "description": "Get a provider by its unique ID.\n", + "description": "Restore a database from a backup or to a specific point in time (PITR). For backup restoration, provide a backupId. For PITR, provide a targetTime as an ISO 8601 datetime. PITR requires the database to have PITR enabled and is only available for enterprise databases.", "responses": { - "200": { - "description": "Provider", + "202": { + "description": "Restoration", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/provider" + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" } } } @@ -29782,22 +41964,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getProvider", - "group": "providers", + "method": "createRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "messaging\/get-provider.md", + "demo": "postgresql\/create-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "auth": { "Project": [], "Key": [] @@ -29811,47 +41992,85 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ] - }, - "delete": { - "summary": "Delete provider", - "operationId": "messagingDeleteProvider", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Restoration type. Allowed values: backup, pitr. Use \"backup\" to restore from a specific backup, or \"pitr\" for point-in-time recovery.", + "default": "backup", + "x-example": "backup" + }, + "backupId": { + "type": "string", + "description": "Backup ID to restore from (required for backup type).", + "x-example": "<BACKUP_ID>", + "x-nullable": true + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR (required for pitr type) as an [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/postgresql\/{databaseId}\/restorations\/{restorationId}": { + "get": { + "summary": "Get restoration", + "operationId": "postgresqlGetRestoration", "tags": [ - "messaging" + "postgresql" ], - "description": "Delete a provider by its unique ID.", + "description": "Get details of a specific database restoration including its status, type, and timestamps.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Restoration", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteProvider", - "group": "providers", + "method": "getRestoration", + "group": "restorations", "cookies": false, "type": "", - "demo": "messaging\/delete-provider.md", + "demo": "postgresql\/get-restoration.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "auth": { "Project": [], "Key": [] @@ -29865,33 +42084,43 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "restorationId", + "description": "Restoration ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RESTORATION_ID>" }, "in": "path" } ] } }, - "\/messaging\/providers\/{providerId}\/logs": { + "\/postgresql\/{databaseId}\/status": { "get": { - "summary": "List provider logs", - "operationId": "messagingListProviderLogs", + "summary": "Get status", + "operationId": "postgresqlGetStatus", "tags": [ - "messaging" + "postgresql" ], - "description": "Get the provider activity logs listed by its unique ID.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { "200": { - "description": "Logs List", + "description": "Status", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/databaseStatus" } } } @@ -29899,22 +42128,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProviderLogs", - "group": "providers", + "method": "getStatus", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/list-provider-logs.md", + "demo": "postgresql\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "providers.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "auth": { "Project": [], "Key": [] @@ -29928,57 +42156,33 @@ ], "parameters": [ { - "name": "providerId", - "description": "Provider ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROVIDER_ID>" + "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] } }, - "\/messaging\/subscribers\/{subscriberId}\/logs": { - "get": { - "summary": "List subscriber logs", - "operationId": "messagingListSubscriberLogs", + "\/postgresql\/{databaseId}\/upgrades": { + "post": { + "summary": "Create upgrade", + "operationId": "postgresqlCreateUpgrade", "tags": [ - "messaging" + "postgresql" ], - "description": "Get the subscriber activity logs listed by its unique ID.", + "description": "Upgrade a dedicated database to a new engine version. Uses blue-green deployment for zero-downtime cutover.", "responses": { "200": { - "description": "Logs List", + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -29986,22 +42190,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSubscriberLogs", - "group": "subscribers", + "method": "createUpgrade", + "group": "postgresql", "cookies": false, "type": "", - "demo": "messaging\/list-subscriber-logs.md", + "demo": "postgresql\/create-upgrade.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "auth": { "Project": [], "Key": [] @@ -30015,57 +42218,52 @@ ], "parameters": [ { - "name": "subscriberId", - "description": "Subscriber ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<SUBSCRIBER_ID>" + "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "targetVersion": { + "type": "string", + "description": "Target engine version to upgrade to.", + "x-example": "<TARGET_VERSION>" + } + }, + "required": [ + "targetVersion" + ] + } + } + } + } } }, - "\/messaging\/topics": { + "\/presences": { "get": { - "summary": "List topics", - "operationId": "messagingListTopics", + "summary": "List presences", + "operationId": "presencesList", "tags": [ - "messaging" + "presences" ], - "description": "Get a list of all topics from the current Appwrite project.", + "description": "List presence logs. Expired entries are filtered out automatically.\n", "responses": { "200": { - "description": "Topic list", + "description": "Presences List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topicList" + "$ref": "#\/components\/schemas\/presenceList" } } } @@ -30073,22 +42271,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTopics", - "group": "topics", + "method": "list", + "group": "presences", "cookies": false, "type": "", - "demo": "messaging\/list-topics.md", + "demo": "presences\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "presences.read", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/list.md", "auth": { "Project": [], "Key": [] @@ -30097,13 +42296,15 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal", + "description": "Array of query strings generated using the Query class provided by the SDK.", "required": false, "schema": { "type": "array", @@ -30115,43 +42316,46 @@ "in": "query" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", "required": false, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 }, "in": "query" } ] - }, - "post": { - "summary": "Create topic", - "operationId": "messagingCreateTopic", + } + }, + "\/presences\/{presenceId}": { + "get": { + "summary": "Get presence", + "operationId": "presencesGet", "tags": [ - "messaging" + "presences" ], - "description": "Create a new topic.", + "description": "Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.\n", "responses": { - "201": { - "description": "Topic", + "200": { + "description": "Presence", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/presence" } } } @@ -30159,22 +42363,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTopic", - "group": "topics", + "method": "get", + "group": "presences", "cookies": false, "type": "", - "demo": "messaging\/create-topic.md", + "demo": "presences\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "presences.read", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/get.md", "auth": { "Project": [], "Key": [] @@ -30183,65 +42388,38 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "topicId": { - "type": "string", - "description": "Topic ID. Choose a custom Topic ID or a new Topic ID.", - "x-example": "<TOPIC_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>" - }, - "subscribe": { - "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "default": [ - "users" - ], - "x-example": "[\"any\"]", - "items": { - "type": "string" - } - } - }, - "required": [ - "topicId", - "name" - ] - } - } + "parameters": [ + { + "name": "presenceId", + "description": "Presence unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PRESENCE_ID>" + }, + "in": "path" } - } - } - }, - "\/messaging\/topics\/{topicId}": { - "get": { - "summary": "Get topic", - "operationId": "messagingGetTopic", + ] + }, + "put": { + "summary": "Upsert presence", + "operationId": "presencesUpsert", "tags": [ - "messaging" + "presences" ], - "description": "Get a topic by its unique ID.\n", + "description": "Create or update a presence log by its user ID.\n", "responses": { "200": { - "description": "Topic", + "description": "Presence", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/presence" } } } @@ -30249,60 +42427,137 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTopic", - "group": "topics", + "method": "upsert", + "group": "presences", "cookies": false, "type": "", - "demo": "messaging\/get-topic.md", + "demo": "presences\/upsert.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "presences.write", "platforms": [ - "console", - "server" + "client", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/upsert.md", + "methods": [ + { + "name": "upsert", + "namespace": "presences", + "desc": "Upsert presence", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "permissions", + "expiresAt", + "metadata" + ], + "required": [ + "presenceId", + "userId", + "status" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Create or update a presence log by its user ID.\n", + "demo": "presences\/upsert.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "presenceId", + "description": "Presence unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<PRESENCE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" + }, + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": [], + "x-example": "{}" + } + }, + "required": [ + "status" + ] + } + } + } + } }, "patch": { - "summary": "Update topic", - "operationId": "messagingUpdateTopic", + "summary": "Update presence", + "operationId": "presencesUpdate", "tags": [ - "messaging" + "presences" ], - "description": "Update a topic by its unique ID.\n", + "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", "responses": { "200": { - "description": "Topic", + "description": "Presence", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/topic" + "$ref": "#\/components\/schemas\/presence" } } } @@ -30310,41 +42565,74 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTopic", - "group": "topics", + "method": "update", + "group": "presences", "cookies": false, "type": "", - "demo": "messaging\/update-topic.md", + "demo": "presences\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "presences.write", "platforms": [ - "console", - "server" + "client", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", + "methods": [ + { + "name": "update", + "namespace": "presences", + "desc": "Update presence", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "presenceId", + "userId", + "status", + "expiresAt", + "metadata", + "permissions", + "purge" + ], + "required": [ + "presenceId", + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/presence" + } + ], + "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", + "demo": "presences\/update.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "presenceId", + "description": "Presence unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<PRESENCE_ID>" }, "in": "path" } @@ -30355,20 +42643,41 @@ "schema": { "type": "object", "properties": { - "name": { + "userId": { "type": "string", - "description": "Topic Name.", - "x-example": "<NAME>", - "x-nullable": true + "description": "User ID.", + "x-example": "<USER_ID>" }, - "subscribe": { + "status": { + "type": "string", + "description": "Presence status.", + "x-example": "<STATUS>" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry datetime.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime" + }, + "metadata": { + "type": "object", + "description": "Presence metadata object.", + "default": {}, + "x-example": "{}" + }, + "permissions": { "type": "array", - "description": "An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https:\/\/appwrite.io\/docs\/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.", - "x-example": "[\"any\"]", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" - }, - "x-nullable": true + } + }, + "purge": { + "type": "boolean", + "description": "When true, purge cached responses used by list presences endpoint.", + "default": false, + "x-example": false } } } @@ -30377,12 +42686,12 @@ } }, "delete": { - "summary": "Delete topic", - "operationId": "messagingDeleteTopic", + "summary": "Delete presence", + "operationId": "presencesDelete", "tags": [ - "messaging" + "presences" ], - "description": "Delete a topic by its unique ID.", + "description": "Delete a presence log by its unique ID.\n", "responses": { "204": { "description": "No content" @@ -30390,22 +42699,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteTopic", - "group": "topics", + "method": "delete", + "group": "presences", "cookies": false, "type": "", - "demo": "messaging\/delete-topic.md", + "demo": "presences\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.write", + "scope": "presences.write", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/delete.md", "auth": { "Project": [], "Key": [] @@ -30414,38 +42724,40 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID.", + "name": "presenceId", + "description": "Presence unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "<PRESENCE_ID>" }, "in": "path" } ] } }, - "\/messaging\/topics\/{topicId}\/logs": { + "\/project": { "get": { - "summary": "List topic logs", - "operationId": "messagingListTopicLogs", + "summary": "Get project", + "operationId": "projectGet", "tags": [ - "messaging" + "project" ], - "description": "Get the topic activity logs listed by its unique ID.", + "description": "Get a project.", "responses": { "200": { - "description": "Logs List", + "description": "Project", "content": { - "application\/json": { + "": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/project" } } } @@ -30453,22 +42765,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTopicLogs", - "group": "topics", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/list-topic-logs.md", + "demo": "project\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "topics.read", + "scope": "project.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "auth": { "Project": [], "Key": [] @@ -30479,83 +42790,37 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } ] - } - }, - "\/messaging\/topics\/{topicId}\/subscribers": { - "get": { - "summary": "List subscribers", - "operationId": "messagingListSubscribers", + }, + "delete": { + "summary": "Delete project", + "operationId": "projectDelete", "tags": [ - "messaging" + "project" ], - "description": "Get a list of all subscribers from the current Appwrite project.", + "description": "Delete a project.", "responses": { - "200": { - "description": "Subscriber list", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/subscriberList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listSubscribers", - "group": "subscribers", + "method": "delete", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/list-subscribers.md", + "demo": "project\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "project.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "auth": { "Project": [], "Key": [] @@ -30566,69 +42831,24 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } ] - }, - "post": { - "summary": "Create subscriber", - "operationId": "messagingCreateSubscriber", + } + }, + "\/project\/auth-methods\/{methodId}": { + "patch": { + "summary": "Update project auth method status", + "operationId": "projectUpdateAuthMethod", "tags": [ - "messaging" + "project" ], - "description": "Create a new subscriber.", + "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", "responses": { - "201": { - "description": "Subscriber", + "200": { + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/project" } } } @@ -30636,44 +42856,59 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSubscriber", - "group": "subscribers", + "method": "updateAuthMethod", + "group": null, "cookies": false, "type": "", - "demo": "messaging\/create-subscriber.md", + "demo": "project\/update-auth-method.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "project.write", "platforms": [ - "server", - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "auth": { "Project": [], - "JWT": [] + "Key": [] } }, "security": [ { "Project": [], - "JWT": [], - "Session": [], "Key": [] } ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID to subscribe to.", + "name": "methodId", + "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", "required": true, "schema": { "type": "string", - "x-example": "<TOPIC_ID>" + "x-example": "email-password", + "enum": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ], + "x-enum-name": "ProjectAuthMethodId", + "x-enum-keys": [ + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" + ] }, "in": "path" } @@ -30684,23 +42919,14 @@ "schema": { "type": "object", "properties": { - "subscriberId": { - "type": "string", - "description": "Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.", - "x-example": "<SUBSCRIBER_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "targetId": { - "type": "string", - "description": "Target ID. The target ID to link to the specified Topic ID.", - "x-example": "<TARGET_ID>" + "enabled": { + "type": "boolean", + "description": "Auth method status.", + "x-example": false } }, "required": [ - "subscriberId", - "targetId" + "enabled" ] } } @@ -30708,21 +42934,21 @@ } } }, - "\/messaging\/topics\/{topicId}\/subscribers\/{subscriberId}": { + "\/project\/keys": { "get": { - "summary": "Get subscriber", - "operationId": "messagingGetSubscriber", + "summary": "List project keys", + "operationId": "projectListKeys", "tags": [ - "messaging" + "project" ], - "description": "Get a subscriber by its unique ID.\n", + "description": "Get a list of all API keys from the current project.", "responses": { "200": { - "description": "Subscriber", + "description": "API Keys List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/subscriber" + "$ref": "#\/components\/schemas\/keyList" } } } @@ -30730,22 +42956,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSubscriber", - "group": "subscribers", + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/get-subscriber.md", + "demo": "project\/list-keys.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.read", + "scope": "keys.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "auth": { "Project": [], "Key": [] @@ -30759,110 +42984,352 @@ ], "parameters": [ { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes", + "required": false, "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "in": "query" } ] }, - "delete": { - "summary": "Delete subscriber", - "operationId": "messagingDeleteSubscriber", + "post": { + "summary": "Create project key", + "operationId": "projectCreateKey", "tags": [ - "messaging" + "project" ], - "description": "Delete a subscriber by its unique ID.", + "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Key", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/key" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSubscriber", - "group": "subscribers", + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "messaging\/delete-subscriber.md", + "demo": "project\/create-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "subscribers.write", + "scope": "keys.write", "platforms": [ - "server", - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "auth": { "Project": [], - "JWT": [] + "Key": [] } }, "security": [ { "Project": [], - "JWT": [], - "Session": [], "Key": [] } ], - "parameters": [ - { - "name": "topicId", - "description": "Topic ID. The topic ID subscribed to.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOPIC_ID>" - }, - "in": "path" - }, - { - "name": "subscriberId", - "description": "Subscriber ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SUBSCRIBER_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "keyId": { + "type": "string", + "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<KEY_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } + }, + "expire": { + "type": "string", + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + } + }, + "required": [ + "keyId", + "name", + "scopes" + ] + } + } } - ] + } } }, - "\/oauth2\/{project_id}\/approve": { + "\/project\/keys\/ephemeral": { "post": { - "summary": "Approve OAuth2", - "operationId": "oauth2Approve", + "summary": "Create ephemeral project key", + "operationId": "projectCreateEphemeralKey", "tags": [ - "oauth2" + "project" ], - "description": "Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", "responses": { - "200": { - "description": "OAuth2 Approve", + "201": { + "description": "Ephemeral Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Approve" + "$ref": "#\/components\/schemas\/ephemeralKey" } } } @@ -30870,44 +43337,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "approve", - "group": null, + "method": "createEphemeralKey", + "group": "keys", "cookies": false, "type": "", - "demo": "oauth2\/approve.md", + "demo": "project\/create-ephemeral-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "keys.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -30916,20 +43369,237 @@ "schema": { "type": "object", "properties": { - "grant_id": { - "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "<GRANT_ID>" + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } }, - "authorization_details": { - "type": "string", - "description": "Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.", - "default": "", - "x-example": "<AUTHORIZATION_DETAILS>" + "duration": { + "type": "integer", + "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", + "x-example": "600", + "format": "int32" } }, "required": [ - "grant_id" + "scopes", + "duration" ] } } @@ -30937,21 +43607,21 @@ } } }, - "\/oauth2\/{project_id}\/authorize": { + "\/project\/keys\/{keyId}": { "get": { - "summary": "OAuth2 Authorize", - "operationId": "oauth2Authorize", + "summary": "Get project key", + "operationId": "projectGetKey", "tags": [ - "oauth2" + "project" ], - "description": "Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Get a key by its unique ID. ", "responses": { "200": { - "description": "OAuth2 Authorize", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Authorize" + "$ref": "#\/components\/schemas\/key" } } } @@ -30959,235 +43629,100 @@ }, "deprecated": false, "x-appwrite": { - "method": "authorize", - "group": null, + "method": "getKey", + "group": "keys", "cookies": false, "type": "", - "demo": "oauth2\/authorize.md", + "demo": "project\/get-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "keys.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "keyId", + "description": "Key ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<KEY_ID>" }, "in": "path" - }, - { - "name": "client_id", - "description": "OAuth2 client ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<CLIENT_ID>" - }, - "in": "query" - }, - { - "name": "redirect_uri", - "description": "Redirect URI where visitor will be redirected after authorization, whether successful or not.", - "required": true, - "schema": { - "type": "string", - "format": "url", - "x-example": "https:\/\/example.com" - }, - "in": "query" - }, - { - "name": "response_type", - "description": "OAuth2 \/ OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).", - "required": true, - "schema": { - "type": "string", - "x-example": "code" - }, - "in": "query" - }, - { - "name": "scope", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SCOPE>" - }, - "in": "query" - }, - { - "name": "state", - "description": "OAuth2 state. You receive this back in the redirect URI.", - "required": false, - "schema": { - "type": "string", - "x-example": "<STATE>", - "default": "" - }, - "in": "query" - }, - { - "name": "nonce", - "description": "OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.", - "required": false, - "schema": { - "type": "string", - "x-example": "<NONCE>", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge", - "description": "PKCE code challenge. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "<CODE_CHALLENGE>", - "default": "" - }, - "in": "query" - }, - { - "name": "code_challenge_method", - "description": "PKCE code challenge method. Required when OAuth2 app is public.", - "required": false, - "schema": { - "type": "string", - "x-example": "s256", - "default": "" - }, - "in": "query" - }, - { - "name": "prompt", - "description": "OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.", - "required": false, - "schema": { - "type": "string", - "x-example": "<PROMPT>", - "default": "" - }, - "in": "query" - }, - { - "name": "max_age", - "description": "OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0 - }, - "in": "query" - }, - { - "name": "authorization_details", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", - "required": false, - "schema": { - "type": "string", - "x-example": "<AUTHORIZATION_DETAILS>", - "default": "" - }, - "in": "query" - }, - { - "name": "resource", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "required": false, - "schema": { - "type": "string", - "default": [] - }, - "in": "query" } ] - } - }, - "\/oauth2\/{project_id}\/device_authorization": { - "post": { - "summary": "OAuth2 Device Authorization", - "operationId": "oauth2CreateDeviceAuthorization", + }, + "put": { + "summary": "Update project key", + "operationId": "projectUpdateKey", "tags": [ - "oauth2" + "project" ], - "description": "Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.", + "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", "responses": { "200": { - "description": "OAuth2 Device Authorization", + "description": "Key", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2DeviceAuthorization" + "$ref": "#\/components\/schemas\/key" } } } } }, "deprecated": false, - "x-appwrite": { - "method": "createDeviceAuthorization", - "group": null, + "x-appwrite": { + "method": "updateKey", + "group": "keys", "cookies": false, "type": "", - "demo": "oauth2\/create-device-authorization.md", + "demo": "project\/update-key.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "keys.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], + "Project": [], "Key": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "keyId", + "description": "Key ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<KEY_ID>" }, "in": "path" } @@ -31198,135 +43733,318 @@ "schema": { "type": "object", "properties": { - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" - }, - "scope": { + "name": { "type": "string", - "description": "Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.", - "default": "", - "x-example": "<SCOPE>" + "description": "Key name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "authorization_details": { - "type": "string", - "description": "Rich authorization request. JSON array of objects, each with a `type` and project-defined fields", - "default": "", - "x-example": "<AUTHORIZATION_DETAILS>" + "scopes": { + "type": "array", + "description": "Key scopes list. Maximum of 200 scopes are allowed.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ], + "x-enum-name": "ProjectKeyScopes", + "x-enum-keys": [ + "project.read", + "project.write", + "keys.read", + "keys.write", + "platforms.read", + "platforms.write", + "mocks.read", + "mocks.write", + "policies.read", + "policies.write", + "project.policies.read", + "project.policies.write", + "project.oauth2.read", + "project.oauth2.write", + "templates.read", + "templates.write", + "stages.read", + "stages.write", + "users.read", + "users.write", + "sessions.read", + "sessions.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "tables.read", + "tables.write", + "columns.read", + "columns.write", + "indexes.read", + "indexes.write", + "rows.read", + "rows.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "documents.read", + "documents.write", + "buckets.read", + "buckets.write", + "files.read", + "files.write", + "tokens.read", + "tokens.write", + "functions.read", + "functions.write", + "executions.read", + "executions.write", + "execution.read", + "execution.write", + "sites.read", + "sites.write", + "log.read", + "log.write", + "providers.read", + "providers.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "targets.read", + "targets.write", + "messages.read", + "messages.write", + "rules.read", + "rules.write", + "webhooks.read", + "webhooks.write", + "locale.read", + "avatars.read", + "health.read", + "assistant.read", + "migrations.read", + "migrations.write", + "schedules.read", + "schedules.write", + "vcs.read", + "vcs.write", + "insights.read", + "insights.write", + "reports.read", + "reports.write", + "presences.read", + "presences.write", + "backups.policies.read", + "backups.policies.write", + "archives.read", + "archives.write", + "restorations.read", + "restorations.write", + "dedicatedDatabases.execute", + "domains.read", + "domains.write", + "wafRules.read", + "wafRules.write", + "events.read", + "apps.read", + "apps.write", + "oauth2.read", + "oauth2.write", + "oauth2.introspect", + "usage.read" + ] + } }, - "resource": { + "expire": { "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null + "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true } - } + }, + "required": [ + "name", + "scopes" + ] } } } } - } - }, - "\/oauth2\/{project_id}\/grants": { - "post": { - "summary": "Create OAuth2 Grant", - "operationId": "oauth2CreateGrant", + }, + "delete": { + "summary": "Delete project key", + "operationId": "projectDeleteKey", "tags": [ - "oauth2" + "project" ], - "description": "Exchange a device flow user code for an OAuth2 grant. The authenticated user is bound to the pending grant. Pass the returned grant ID to the get grant endpoint to render the consent screen, then to the approve or reject endpoint to complete the flow.", + "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", "responses": { - "201": { - "description": "OAuth2 Grant", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createGrant", - "group": null, + "method": "deleteKey", + "group": "keys", "cookies": false, "type": "", - "demo": "oauth2\/create-grant.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "oauth2.write", + "demo": "project\/delete-key.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "keys.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "keyId", + "description": "Key ID.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "x-example": "<KEY_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "user_code": { - "type": "string", - "description": "User code displayed on the device.", - "x-example": "<USER_CODE>" - } - }, - "required": [ - "user_code" - ] - } - } - } - } + ] } }, - "\/oauth2\/{project_id}\/grants\/{grant_id}": { - "get": { - "summary": "Get OAuth2 Grant", - "operationId": "oauth2GetGrant", + "\/project\/labels": { + "put": { + "summary": "Update project labels", + "operationId": "projectUpdateLabels", "tags": [ - "oauth2" + "project" ], - "description": "Get an OAuth2 grant by its ID. Used by the consent screen to display the details of the authorization the user is being asked to approve. A grant can only be read by the user it belongs to, or by server SDK.", + "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", "responses": { "200": { - "description": "OAuth2 Grant", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Grant" + "$ref": "#\/components\/schemas\/project" } } } @@ -31334,74 +44052,71 @@ }, "deprecated": false, "x-appwrite": { - "method": "getGrant", + "method": "updateLabels", "group": null, "cookies": false, "type": "", - "demo": "oauth2\/get-grant.md", + "demo": "project\/update-labels.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], + "Project": [], "Key": [] } ], - "parameters": [ - { - "name": "project_id", - "description": "Project ID in which OAuth2 client that created grant during authorization exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - }, - { - "name": "grant_id", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "required": true, - "schema": { - "type": "string", - "x-example": "<GRANT_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } } - ] + } } }, - "\/oauth2\/{project_id}\/reject": { - "post": { - "summary": "Reject OAuth2", - "operationId": "oauth2Reject", + "\/project\/mock-phones": { + "get": { + "summary": "List project mock phones", + "operationId": "projectListMockPhones", "tags": [ - "oauth2" + "project" ], - "description": "Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application\/json` to receive a JSON response instead of a redirect.", + "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", "responses": { "200": { - "description": "OAuth2 Reject", + "description": "Mock Numbers List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Reject" + "$ref": "#\/components\/schemas\/mockNumberList" } } } @@ -31409,83 +44124,73 @@ }, "deprecated": false, "x-appwrite": { - "method": "reject", - "group": null, + "method": "listMockPhones", + "group": "mocks", "cookies": false, "type": "", - "demo": "oauth2\/reject.md", + "demo": "project\/list-mock-phones.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "mocks.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [] + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", - "required": true, + "name": "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": "string", - "x-example": "<PROJECT_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "grant_id": { - "type": "string", - "description": "Grant ID made during authorization, provided to consent screen in URL search params.", - "x-example": "<GRANT_ID>" - } - }, - "required": [ - "grant_id" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/oauth2\/{project_id}\/revoke": { + ] + }, "post": { - "summary": "OAuth2 Revoke", - "operationId": "oauth2Revoke", + "summary": "Create project mock phone", + "operationId": "projectCreateMockPhone", "tags": [ - "oauth2" + "project" ], - "description": "Revoke an OAuth2 access token or refresh token.", + "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", "responses": { - "200": { - "description": "File", + "201": { + "description": "Mock Number", "content": { "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/mockNumber" } } } @@ -31493,79 +44198,53 @@ }, "deprecated": false, "x-appwrite": { - "method": "revoke", - "group": null, + "method": "createMockPhone", + "group": "mocks", "cookies": false, "type": "", - "demo": "oauth2\/revoke.md", + "demo": "project\/create-mock-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "mocks.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], + "Project": [], "Key": [] } ], - "parameters": [ - { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PROJECT_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "token": { - "type": "string", - "description": "The access or refresh token to revoke.", - "x-example": "<TOKEN>" - }, - "token_type_hint": { - "type": "string", - "description": "Type of token to revoke (access_token or refresh_token).", - "default": "", - "x-example": "access_token" - }, - "client_id": { + "number": { "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" + "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", + "x-example": "+12065550100", + "format": "phone" }, - "client_secret": { + "otp": { "type": "string", - "description": "OAuth2 client secret. Required for confidential apps; omitted for public apps.", - "default": "", - "x-example": "<CLIENT_SECRET>" + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" } }, "required": [ - "token" + "number", + "otp" ] } } @@ -31573,21 +44252,21 @@ } } }, - "\/oauth2\/{project_id}\/token": { - "post": { - "summary": "OAuth2 Token", - "operationId": "oauth2CreateToken", + "\/project\/mock-phones\/{number}": { + "get": { + "summary": "Get project mock phone", + "operationId": "projectGetMockPhone", "tags": [ - "oauth2" + "project" ], - "description": "Exchange an OAuth2 authorization code, refresh token, or device code for access and refresh tokens.", + "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", "responses": { "200": { - "description": "OAuth2 Token", + "description": "Mock Number", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oauth2Token" + "$ref": "#\/components\/schemas\/mockNumber" } } } @@ -31595,132 +44274,60 @@ }, "deprecated": false, "x-appwrite": { - "method": "createToken", - "group": null, + "method": "getMockPhone", + "group": "mocks", "cookies": false, "type": "", - "demo": "oauth2\/create-token.md", + "demo": "project\/get-mock-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "mocks.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, "auth": { - "ProjectPath": [], - "Session": [] + "Project": [], + "Key": [] } }, "security": [ { - "ProjectPath": [], - "Session": [], - "JWT": [], + "Project": [], "Key": [] } ], "parameters": [ { - "name": "project_id", - "description": "Project ID in which OAuth2 client exists.", + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", "required": true, "schema": { "type": "string", - "x-example": "<PROJECT_ID>" + "format": "phone", + "x-example": "+12065550100" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "grant_type": { - "type": "string", - "description": "OAuth2 grant type. Can be one of: `authorization_code`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`.", - "x-example": "<GRANT_TYPE>" - }, - "code": { - "type": "string", - "description": "Authorization code to be exchanged for access and refresh tokens. Required for `authorization_code` grant type.", - "default": "", - "x-example": "<CODE>" - }, - "refresh_token": { - "type": "string", - "description": "Refresh token to be exchanged for a new access and refresh tokens. Required for `refresh_token` grant type.", - "default": "", - "x-example": "<REFRESH_TOKEN>" - }, - "device_code": { - "type": "string", - "description": "Device code obtained from the device authorization endpoint. Required for `urn:ietf:params:oauth:grant-type:device_code` grant type.", - "default": "", - "x-example": "<DEVICE_CODE>" - }, - "client_id": { - "type": "string", - "description": "OAuth2 client ID.", - "default": "", - "x-example": "<CLIENT_ID>" - }, - "client_secret": { - "type": "string", - "description": "OAuth2 client secret. Required for confidential apps.", - "default": "", - "x-example": "<CLIENT_SECRET>" - }, - "code_verifier": { - "type": "string", - "description": "PKCE code verifier. Required for public apps.", - "default": "", - "x-example": "<CODE_VERIFIER>" - }, - "redirect_uri": { - "type": "string", - "description": "Redirect URI. Required for `authorization_code` grant type.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "resource": { - "type": "string", - "description": "RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.", - "default": [], - "x-example": null - } - }, - "required": [ - "grant_type" - ] - } - } - } - } - } - }, - "\/organization\/keys": { - "get": { - "summary": "List organization keys", - "operationId": "organizationListKeys", + ] + }, + "put": { + "summary": "Update project mock phone", + "operationId": "projectUpdateMockPhone", "tags": [ - "organization" + "project" ], - "description": "Get a list of all API keys from the current organization.", + "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", "responses": { "200": { - "description": "API Keys List", + "description": "Mock Number", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/keyList" + "$ref": "#\/components\/schemas\/mockNumber" } } } @@ -31728,15 +44335,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listKeys", - "group": "keys", + "method": "updateMockPhone", + "group": "mocks", "cookies": false, "type": "", - "demo": "organization\/list-keys.md", + "demo": "project\/update-mock-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.read", + "scope": "mocks.write", "platforms": [ "console", "server" @@ -31756,61 +44363,60 @@ ], "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: expire, accessedAt, name, scopes", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "format": "phone", + "x-example": "+12065550100" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "otp": { + "type": "string", + "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", + "x-example": "<OTP>" + } + }, + "required": [ + "otp" + ] + } + } + } + } }, - "post": { - "summary": "Create organization key", - "operationId": "organizationCreateKey", + "delete": { + "summary": "Delete project mock phone", + "operationId": "projectDeleteMockPhone", "tags": [ - "organization" + "project" ], - "description": "Create a new organization API key.", + "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", "responses": { - "201": { - "description": "Key", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/key" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createKey", - "group": "keys", + "method": "deleteMockPhone", + "group": "mocks", "cookies": false, "type": "", - "demo": "organization\/create-key.md", + "demo": "project\/delete-mock-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", + "scope": "mocks.write", "platforms": [ "console", "server" @@ -31828,92 +44434,36 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<KEY_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "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", - "enum": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ], - "x-enum-name": "OrganizationKeyScopes", - "x-enum-keys": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ] - } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - }, - "required": [ - "keyId", - "name", - "scopes" - ] - } - } + "parameters": [ + { + "name": "number", + "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", + "required": true, + "schema": { + "type": "string", + "format": "phone", + "x-example": "+12065550100" + }, + "in": "path" } - } + ] } }, - "\/organization\/keys\/{keyId}": { + "\/project\/oauth2": { "get": { - "summary": "Get organization key", - "operationId": "organizationGetKey", + "summary": "List project OAuth2 providers", + "operationId": "projectListOAuth2Providers", "tags": [ - "organization" + "project" ], - "description": "Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.", + "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", "responses": { "200": { - "description": "Key", + "description": "OAuth2 Providers List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/oAuth2ProviderList" } } } @@ -31921,15 +44471,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getKey", - "group": "keys", + "method": "listOAuth2Providers", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/get-key.md", + "demo": "project\/list-o-auth-2-providers.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.read", + "scope": "project.oauth2.read", "platforms": [ "console", "server" @@ -31949,31 +44499,47 @@ ], "parameters": [ { - "name": "keyId", - "description": "Key unique ID.", - "required": true, + "name": "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": "string", - "x-example": "<KEY_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] - }, + } + }, + "\/project\/oauth2-server": { "put": { - "summary": "Update organization key", - "operationId": "organizationUpdateKey", + "summary": "Update OAuth2 server", + "operationId": "projectUpdateOAuth2Server", "tags": [ - "organization" + "project" ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "description": "Update the OAuth2 server (OIDC provider) configuration.", "responses": { "200": { - "description": "Key", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/project" } } } @@ -31981,15 +44547,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateKey", - "group": "keys", + "method": "updateOAuth2Server", + "group": null, "cookies": false, "type": "", - "demo": "organization\/update-key.md", + "demo": "project\/update-o-auth-2-server.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -32007,148 +44573,144 @@ "Key": [] } ], - "parameters": [ - { - "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": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the OAuth2 server.", + "x-example": false + }, + "authorizationUrl": { "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "URL to your application with consent screen.", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "scopes": { + "type": "array", + "description": "List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "authorizationDetailsTypes": { + "type": "array", + "description": "List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "accessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "refreshTokenDuration": { + "type": "integer", + "description": "Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "publicAccessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "publicRefreshTokenDuration": { + "type": "integer", + "description": "Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "installationAccessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "confidentialPkce": { + "type": "boolean", + "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", + "x-example": false, + "x-nullable": true + }, + "verificationUrl": { + "type": "string", + "description": "URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "userCodeLength": { + "type": "integer", + "description": "Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.", + "x-example": 6, + "format": "int32", + "x-nullable": true + }, + "userCodeFormat": { + "type": "string", + "description": "Character set for device flow user codes: `numeric` (digits only \u2014 best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits \u2014 highest entropy per character). Defaults to `alphanumeric`.", + "default": "alphanumeric", + "x-example": "numeric" }, - "scopes": { + "deviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, + "defaultScopes": { "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", + "description": "List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.", + "default": [], "x-example": null, "items": { - "type": "string", - "enum": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ], - "x-enum-name": "OrganizationKeyScopes", - "x-enum-keys": [ - "projects.read", - "projects.write", - "devKeys.read", - "devKeys.write", - "organization.keys.read", - "organization.keys.write", - "domains.read", - "domains.write", - "keys.read", - "keys.write" - ] + "type": "string" } - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true } }, "required": [ - "name", - "scopes" + "enabled", + "authorizationUrl" ] } } } } - }, - "delete": { - "summary": "Delete organization key", - "operationId": "organizationDeleteKey", - "tags": [ - "organization" - ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteKey", - "group": "keys", - "cookies": false, - "type": "", - "demo": "organization\/delete-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "organization.keys.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ] } }, - "\/organization\/projects": { - "get": { - "summary": "List organization projects", - "operationId": "organizationListProjects", + "\/project\/oauth2\/amazon": { + "patch": { + "summary": "Update project OAuth2 Amazon", + "operationId": "projectUpdateOAuth2Amazon", "tags": [ - "organization" + "project" ], - "description": "Get a list of all projects. You can use the query params to filter your results.", + "description": "Update the project OAuth2 Amazon configuration.", "responses": { "200": { - "description": "Projects List", + "description": "OAuth2Amazon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/projectList" + "$ref": "#\/components\/schemas\/oAuth2Amazon" } } } @@ -32156,15 +44718,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listProjects", - "group": "projects", + "method": "updateOAuth2Amazon", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/list-projects.md", + "demo": "project\/update-o-auth-2-amazon.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -32182,58 +44744,52 @@ "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, teamId, labels, search", - "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "post": { - "summary": "Create organization project", - "operationId": "organizationCreateProject", + } + } + }, + "\/project\/oauth2\/apple": { + "patch": { + "summary": "Update project OAuth2 Apple", + "operationId": "projectUpdateOAuth2Apple", "tags": [ - "organization" + "project" ], - "description": "Create a new project.", + "description": "Update the project OAuth2 Apple configuration.", "responses": { - "201": { - "description": "Project", + "200": { + "description": "OAuth2Apple", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Apple" } } } @@ -32241,15 +44797,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createProject", - "group": "projects", + "method": "updateOAuth2Apple", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/create-project.md", + "demo": "project\/update-o-auth-2-apple.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -32273,64 +44829,58 @@ "schema": { "type": "object", "properties": { - "projectId": { + "serviceId": { "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 + "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", + "x-example": "<SERVICE_ID>", + "x-nullable": true }, - "name": { + "keyId": { "type": "string", - "description": "Project name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", + "x-example": "<KEY_ID>", + "x-nullable": true }, - "region": { + "teamId": { "type": "string", - "description": "Project Region.", - "x-example": "fra", - "enum": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ], - "x-enum-name": "Region", - "x-enum-keys": [ - "fra", - "nyc", - "syd", - "sfo", - "sgp", - "tor" - ] + "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", + "x-example": "<TEAM_ID>", + "x-nullable": true + }, + "p8File": { + "type": "string", + "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", + "x-example": "<P8_FILE>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "projectId", - "name" - ] + } } } } } } }, - "\/organization\/projects\/{projectId}": { - "get": { - "summary": "Get organization project", - "operationId": "organizationGetProject", + "\/project\/oauth2\/appwrite": { + "patch": { + "summary": "Update project OAuth2 Appwrite", + "operationId": "projectUpdateOAuth2Appwrite", "tags": [ - "organization" + "project" ], - "description": "Get a project.", + "description": "Update the project OAuth2 Appwrite configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Appwrite", "content": { - "": { + "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Appwrite" } } } @@ -32338,15 +44888,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getProject", - "group": "projects", + "method": "updateOAuth2Appwrite", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/get-project.md", + "demo": "project\/update-o-auth-2-appwrite.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -32364,33 +44914,52 @@ "Key": [] } ], - "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": { + "clientId": { + "type": "string", + "description": "'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, + } + } + }, + "\/project\/oauth2\/auth0": { "patch": { - "summary": "Update organization project", - "operationId": "organizationUpdateProject", + "summary": "Update project OAuth2 Auth0", + "operationId": "projectUpdateOAuth2Auth0", "tags": [ - "organization" + "project" ], - "description": "Update a project by its unique ID.", + "description": "Update the project OAuth2 Auth0 configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Auth0", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Auth0" } } } @@ -32398,15 +44967,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateProject", - "group": "projects", + "method": "updateOAuth2Auth0", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/update-project.md", + "demo": "project\/update-o-auth-2-auth-0.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -32424,61 +44993,74 @@ "Key": [] } ], - "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": { + "clientId": { "type": "string", - "description": "Project name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Auth0 instance. For example: example.us.auth0.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "name" - ] + } } } } } - }, - "delete": { - "summary": "Delete organization project", - "operationId": "organizationDeleteProject", + } + }, + "\/project\/oauth2\/authentik": { + "patch": { + "summary": "Update project OAuth2 Authentik", + "operationId": "projectUpdateOAuth2Authentik", "tags": [ - "organization" + "project" ], - "description": "Delete a project by its unique ID.", + "description": "Update the project OAuth2 Authentik configuration.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2Authentik", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteProject", - "group": "projects", + "method": "updateOAuth2Authentik", + "group": "oauth2", "cookies": false, "type": "", - "demo": "organization\/delete-project.md", + "demo": "project\/update-o-auth-2-authentik.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -32496,35 +45078,58 @@ "Key": [] } ], - "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": { + "clientId": { + "type": "string", + "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of Authentik instance. For example: example.authentik.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/ping": { - "get": { - "summary": "Test the connection between the Appwrite and the SDK.", - "operationId": "pingGet", + "\/project\/oauth2\/autodesk": { + "patch": { + "summary": "Update project OAuth2 Autodesk", + "operationId": "projectUpdateOAuth2Autodesk", "tags": [ - "ping" + "project" ], - "description": "Send a ping to project as part of onboarding.", + "description": "Update the project OAuth2 Autodesk configuration.", "responses": { "200": { - "description": "Any", + "description": "OAuth2Autodesk", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/any" + "$ref": "#\/components\/schemas\/oAuth2Autodesk" } } } @@ -32532,19 +45137,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "updateOAuth2Autodesk", + "group": "oauth2", "cookies": false, "type": "", - "demo": "ping\/get.md", + "demo": "project\/update-o-auth-2-autodesk.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "global", + "scope": "project.oauth2.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, @@ -32556,28 +45160,55 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [], - "Session": [] + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/presences": { - "get": { - "summary": "List presences", - "operationId": "presencesList", + "\/project\/oauth2\/bitbucket": { + "patch": { + "summary": "Update project OAuth2 Bitbucket", + "operationId": "projectUpdateOAuth2Bitbucket", "tags": [ - "presences" + "project" ], - "description": "List presence logs. Expired entries are filtered out automatically.\n", + "description": "Update the project OAuth2 Bitbucket configuration.", "responses": { "200": { - "description": "Presences List", + "description": "OAuth2Bitbucket", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/presenceList" + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" } } } @@ -32585,23 +45216,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "presences", + "method": "updateOAuth2Bitbucket", + "group": "oauth2", "cookies": false, "type": "", - "demo": "presences\/list.md", + "demo": "project\/update-o-auth-2-bitbucket.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", + "scope": "project.oauth2.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/list.md", "auth": { "Project": [], "Key": [] @@ -32610,66 +45239,55 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", + "x-example": "<KEY>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", + "x-example": "<SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/presences\/{presenceId}": { - "get": { - "summary": "Get presence", - "operationId": "presencesGet", + "\/project\/oauth2\/bitly": { + "patch": { + "summary": "Update project OAuth2 Bitly", + "operationId": "projectUpdateOAuth2Bitly", "tags": [ - "presences" + "project" ], - "description": "Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.\n", + "description": "Update the project OAuth2 Bitly configuration.", "responses": { "200": { - "description": "Presence", + "description": "OAuth2Bitly", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/presence" + "$ref": "#\/components\/schemas\/oAuth2Bitly" } } } @@ -32677,23 +45295,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "presences", + "method": "updateOAuth2Bitly", + "group": "oauth2", "cookies": false, "type": "", - "demo": "presences\/get.md", + "demo": "project\/update-o-auth-2-bitly.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.read", + "scope": "project.oauth2.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/get.md", "auth": { "Project": [], "Key": [] @@ -32702,38 +45318,55 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "put": { - "summary": "Upsert presence", - "operationId": "presencesUpsert", + } + } + }, + "\/project\/oauth2\/box": { + "patch": { + "summary": "Update project OAuth2 Box", + "operationId": "projectUpdateOAuth2Box", "tags": [ - "presences" + "project" ], - "description": "Create or update a presence log by its user ID.\n", + "description": "Update the project OAuth2 Box configuration.", "responses": { "200": { - "description": "Presence", + "description": "OAuth2Box", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/presence" + "$ref": "#\/components\/schemas\/oAuth2Box" } } } @@ -32741,76 +45374,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsert", - "group": "presences", + "method": "updateOAuth2Box", + "group": "oauth2", "cookies": false, "type": "", - "demo": "presences\/upsert.md", + "demo": "project\/update-o-auth-2-box.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.write", + "scope": "project.oauth2.write", "platforms": [ - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/upsert.md", - "methods": [ - { - "name": "upsert", - "namespace": "presences", - "desc": "Upsert presence", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "permissions", - "expiresAt", - "metadata" - ], - "required": [ - "presenceId", - "userId", - "status" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "Create or update a presence log by its user ID.\n", - "demo": "presences\/upsert.md", - "public": true - } - ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -32819,59 +45406,46 @@ "schema": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "status": { + "clientId": { "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "x-example": "<CLIENT_ID>", + "x-nullable": true }, - "expiresAt": { + "clientSecret": { "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" + "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": [], - "x-example": "{}" + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "status" - ] + } } } } } - }, + } + }, + "\/project\/oauth2\/dailymotion": { "patch": { - "summary": "Update presence", - "operationId": "presencesUpdate", + "summary": "Update project OAuth2 Dailymotion", + "operationId": "projectUpdateOAuth2Dailymotion", "tags": [ - "presences" + "project" ], - "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", + "description": "Update the project OAuth2 Dailymotion configuration.", "responses": { "200": { - "description": "Presence", + "description": "OAuth2Dailymotion", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/presence" + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" } } } @@ -32879,76 +45453,30 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "presences", + "method": "updateOAuth2Dailymotion", + "group": "oauth2", "cookies": false, "type": "", - "demo": "presences\/update.md", + "demo": "project\/update-o-auth-2-dailymotion.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.write", + "scope": "project.oauth2.write", "platforms": [ - "client", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/update.md", - "methods": [ - { - "name": "update", - "namespace": "presences", - "desc": "Update presence", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "presenceId", - "userId", - "status", - "expiresAt", - "metadata", - "permissions", - "purge" - ], - "required": [ - "presenceId", - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/presence" - } - ], - "description": "Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.\n", - "demo": "presences\/update.md", - "public": true - } - ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [] - } - ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -32957,79 +45485,68 @@ "schema": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "status": { + "apiKey": { "type": "string", - "description": "Presence status.", - "x-example": "<STATUS>" + "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", + "x-example": "<API_KEY>", + "x-nullable": true }, - "expiresAt": { + "apiSecret": { "type": "string", - "description": "Presence expiry datetime.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - }, - "metadata": { - "type": "object", - "description": "Presence metadata object.", - "default": {}, - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", + "x-example": "<API_SECRET>", + "x-nullable": true }, - "purge": { + "enabled": { "type": "boolean", - "description": "When true, purge cached responses used by list presences endpoint.", - "default": false, - "x-example": false + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } } } } } } - }, - "delete": { - "summary": "Delete presence", - "operationId": "presencesDelete", + } + }, + "\/project\/oauth2\/discord": { + "patch": { + "summary": "Update project OAuth2 Discord", + "operationId": "projectUpdateOAuth2Discord", "tags": [ - "presences" + "project" ], - "description": "Delete a presence log by its unique ID.\n", + "description": "Update the project OAuth2 Discord configuration.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2Discord", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Discord" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "presences", + "method": "updateOAuth2Discord", + "group": "oauth2", "cookies": false, "type": "", - "demo": "presences\/delete.md", + "demo": "project\/update-o-auth-2-discord.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "presences.write", + "scope": "project.oauth2.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/presences\/delete.md", "auth": { "Project": [], "Key": [] @@ -33038,40 +45555,55 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "presenceId", - "description": "Presence unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PRESENCE_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/project": { - "get": { - "summary": "Get project", - "operationId": "projectGet", + "\/project\/oauth2\/disqus": { + "patch": { + "summary": "Update project OAuth2 Disqus", + "operationId": "projectUpdateOAuth2Disqus", "tags": [ "project" ], - "description": "Get a project.", + "description": "Update the project OAuth2 Disqus configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Disqus", "content": { - "": { + "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Disqus" } } } @@ -33079,15 +45611,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": null, + "method": "updateOAuth2Disqus", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/get.md", + "demo": "project\/update-o-auth-2-disqus.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33104,31 +45636,69 @@ "Project": [], "Key": [] } - ] - }, - "delete": { - "summary": "Delete project", - "operationId": "projectDelete", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "x-example": "<PUBLIC_KEY>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/dropbox": { + "patch": { + "summary": "Update project OAuth2 Dropbox", + "operationId": "projectUpdateOAuth2Dropbox", "tags": [ "project" ], - "description": "Delete a project.", + "description": "Update the project OAuth2 Dropbox configuration.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2Dropbox", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": null, + "method": "updateOAuth2Dropbox", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/delete.md", + "demo": "project\/update-o-auth-2-dropbox.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33145,24 +45715,53 @@ "Project": [], "Key": [] } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appKey": { + "type": "string", + "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", + "x-example": "<APP_KEY>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } } }, - "\/project\/auth-methods\/{methodId}": { + "\/project\/oauth2\/etsy": { "patch": { - "summary": "Update project auth method status", - "operationId": "projectUpdateAuthMethod", + "summary": "Update project OAuth2 Etsy", + "operationId": "projectUpdateOAuth2Etsy", "tags": [ "project" ], - "description": "Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project. ", + "description": "Update the project OAuth2 Etsy configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Etsy", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Etsy" } } } @@ -33170,15 +45769,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateAuthMethod", - "group": null, + "method": "updateOAuth2Etsy", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-auth-method.md", + "demo": "project\/update-o-auth-2-etsy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33196,73 +45795,52 @@ "Key": [] } ], - "parameters": [ - { - "name": "methodId", - "description": "Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone", - "required": true, - "schema": { - "type": "string", - "x-example": "email-password", - "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ], - "x-enum-name": "ProjectAuthMethodId", - "x-enum-keys": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" - ] - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { + "keyString": { + "type": "string", + "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", + "x-example": "<KEY_STRING>", + "x-nullable": true + }, + "sharedSecret": { + "type": "string", + "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", + "x-example": "<SHARED_SECRET>", + "x-nullable": true + }, "enabled": { "type": "boolean", - "description": "Auth method status.", - "x-example": false + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "enabled" - ] + } } } } } } }, - "\/project\/keys": { - "get": { - "summary": "List project keys", - "operationId": "projectListKeys", + "\/project\/oauth2\/facebook": { + "patch": { + "summary": "Update project OAuth2 Facebook", + "operationId": "projectUpdateOAuth2Facebook", "tags": [ "project" ], - "description": "Get a list of all API keys from the current project.", + "description": "Update the project OAuth2 Facebook configuration.", "responses": { "200": { - "description": "API Keys List", + "description": "OAuth2Facebook", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/keyList" + "$ref": "#\/components\/schemas\/oAuth2Facebook" } } } @@ -33270,15 +45848,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listKeys", - "group": "keys", + "method": "updateOAuth2Facebook", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/list-keys.md", + "demo": "project\/update-o-auth-2-facebook.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33296,47 +45874,52 @@ "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: expire, accessedAt, name, scopes", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", + "x-example": "<APP_ID>", + "x-nullable": true + }, + "appSecret": { + "type": "string", + "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", + "x-example": "<APP_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "post": { - "summary": "Create project key", - "operationId": "projectCreateKey", + } + } + }, + "\/project\/oauth2\/figma": { + "patch": { + "summary": "Update project OAuth2 Figma", + "operationId": "projectUpdateOAuth2Figma", "tags": [ "project" ], - "description": "Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create an ephemeral API key if you need a short-lived key instead.", + "description": "Update the project OAuth2 Figma configuration.", "responses": { - "201": { - "description": "Key", + "200": { + "description": "OAuth2Figma", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/oAuth2Figma" } } } @@ -33344,15 +45927,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createKey", - "group": "keys", + "method": "updateOAuth2Figma", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/create-key.md", + "demo": "project\/update-o-auth-2-figma.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33360,276 +45943,62 @@ "packaging": false, "public": true, "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "keyId": { - "type": "string", - "description": "Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<KEY_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "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", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", + "x-example": "<CLIENT_ID>", + "x-nullable": true }, - "expire": { + "clientSecret": { "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, "x-nullable": true } - }, - "required": [ - "keyId", - "name", - "scopes" - ] + } } } } } } }, - "\/project\/keys\/ephemeral": { - "post": { - "summary": "Create ephemeral project key", - "operationId": "projectCreateEphemeralKey", + "\/project\/oauth2\/fusionauth": { + "patch": { + "summary": "Update project OAuth2 FusionAuth", + "operationId": "projectUpdateOAuth2FusionAuth", "tags": [ "project" ], - "description": "Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.\n\nYou can also create a standard API key if you need a longer-lived key instead.", + "description": "Update the project OAuth2 FusionAuth configuration.", "responses": { - "201": { - "description": "Ephemeral Key", + "200": { + "description": "OAuth2FusionAuth", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ephemeralKey" + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" } } } @@ -33637,15 +46006,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEphemeralKey", - "group": "keys", + "method": "updateOAuth2FusionAuth", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/create-ephemeral-key.md", + "demo": "project\/update-o-auth-2-fusion-auth.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33669,245 +46038,52 @@ "schema": { "type": "object", "properties": { - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } + "clientId": { + "type": "string", + "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", + "x-example": "<CLIENT_ID>", + "x-nullable": true }, - "duration": { - "type": "integer", - "description": "Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.", - "x-example": "600", - "format": "int32" + "clientSecret": { + "type": "string", + "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "scopes", - "duration" - ] + } } } } } } }, - "\/project\/keys\/{keyId}": { - "get": { - "summary": "Get project key", - "operationId": "projectGetKey", + "\/project\/oauth2\/github": { + "patch": { + "summary": "Update project OAuth2 GitHub", + "operationId": "projectUpdateOAuth2GitHub", "tags": [ "project" ], - "description": "Get a key by its unique ID. ", + "description": "Update the project OAuth2 GitHub configuration.", "responses": { "200": { - "description": "Key", + "description": "OAuth2GitHub", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/oAuth2Github" } } } @@ -33915,15 +46091,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getKey", - "group": "keys", + "method": "updateOAuth2GitHub", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/get-key.md", + "demo": "project\/update-o-auth-2-git-hub.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -33941,33 +46117,237 @@ "Key": [] } ], - "parameters": [ + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/gitlab": { + "patch": { + "summary": "Update project OAuth2 Gitlab", + "operationId": "projectUpdateOAuth2Gitlab", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Gitlab configuration.", + "responses": { + "200": { + "description": "OAuth2Gitlab", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Gitlab", + "group": "oauth2", + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-gitlab.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "secret": { + "type": "string", + "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "x-example": "<SECRET>", + "x-nullable": true + }, + "endpoint": { + "type": "string", + "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/google": { + "patch": { + "summary": "Update project OAuth2 Google", + "operationId": "projectUpdateOAuth2Google", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Google configuration.", + "responses": { + "200": { + "description": "OAuth2Google", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Google" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateOAuth2Google", + "group": "oauth2", + "cookies": false, + "type": "", + "demo": "project\/update-o-auth-2-google.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "prompt": { + "type": "array", + "description": "Array of Google OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. Must not be specified with other values. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "none", + "consent", + "select_account" + ], + "x-enum-name": "ProjectOAuth2GooglePrompt", + "x-enum-keys": [ + "none", + "consent", + "select_account" + ] + }, + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "put": { - "summary": "Update project key", - "operationId": "projectUpdateKey", + } + } + }, + "\/project\/oauth2\/keycloak": { + "patch": { + "summary": "Update project OAuth2 Keycloak", + "operationId": "projectUpdateOAuth2Keycloak", "tags": [ "project" ], - "description": "Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.", + "description": "Update the project OAuth2 Keycloak configuration.", "responses": { "200": { - "description": "Key", + "description": "OAuth2Keycloak", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/oAuth2Keycloak" } } } @@ -33975,15 +46355,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateKey", - "group": "keys", + "method": "updateOAuth2Keycloak", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-key.md", + "demo": "project\/update-o-auth-2-keycloak.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34001,276 +46381,80 @@ "Key": [] } ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "name": { + "clientId": { "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", + "x-example": "<CLIENT_ID>", + "x-nullable": true }, - "scopes": { - "type": "array", - "description": "Key scopes list. Maximum of 100 scopes are allowed.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ], - "x-enum-name": "ProjectKeyScopes", - "x-enum-keys": [ - "project.read", - "project.write", - "keys.read", - "keys.write", - "platforms.read", - "platforms.write", - "mocks.read", - "mocks.write", - "policies.read", - "policies.write", - "project.policies.read", - "project.policies.write", - "templates.read", - "templates.write", - "oauth2.read", - "oauth2.write", - "users.read", - "users.write", - "sessions.read", - "sessions.write", - "teams.read", - "teams.write", - "databases.read", - "databases.write", - "tables.read", - "tables.write", - "columns.read", - "columns.write", - "indexes.read", - "indexes.write", - "rows.read", - "rows.write", - "collections.read", - "collections.write", - "attributes.read", - "attributes.write", - "documents.read", - "documents.write", - "buckets.read", - "buckets.write", - "files.read", - "files.write", - "tokens.read", - "tokens.write", - "functions.read", - "functions.write", - "executions.read", - "executions.write", - "execution.read", - "execution.write", - "sites.read", - "sites.write", - "log.read", - "log.write", - "providers.read", - "providers.write", - "topics.read", - "topics.write", - "subscribers.read", - "subscribers.write", - "targets.read", - "targets.write", - "messages.read", - "messages.write", - "rules.read", - "rules.write", - "webhooks.read", - "webhooks.write", - "locale.read", - "avatars.read", - "health.read", - "assistant.read", - "migrations.read", - "migrations.write", - "schedules.read", - "schedules.write", - "vcs.read", - "vcs.write", - "insights.read", - "insights.write", - "reports.read", - "reports.write", - "presences.read", - "presences.write", - "backups.policies.read", - "backups.policies.write", - "archives.read", - "archives.write", - "restorations.read", - "restorations.write", - "dedicatedDatabases.execute", - "domains.read", - "domains.write", - "events.read", - "apps.read", - "apps.write", - "usage.read" - ] - } + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true }, - "expire": { + "endpoint": { "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "description": "Domain of Keycloak instance. For example: keycloak.example.com", + "x-example": "<ENDPOINT>", + "x-nullable": true + }, + "realmName": { + "type": "string", + "description": "Keycloak realm name. For example: appwrite-realm", + "x-example": "<REALM_NAME>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, "x-nullable": true } - }, - "required": [ - "name", - "scopes" - ] + } } } } } - }, - "delete": { - "summary": "Delete project key", - "operationId": "projectDeleteKey", + } + }, + "\/project\/oauth2\/kick": { + "patch": { + "summary": "Update project OAuth2 Kick", + "operationId": "projectUpdateOAuth2Kick", "tags": [ "project" ], - "description": "Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.", + "description": "Update the project OAuth2 Kick configuration.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "OAuth2Kick", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Kick" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteKey", - "group": "keys", + "method": "updateOAuth2Kick", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/delete-key.md", + "demo": "project\/update-o-auth-2-kick.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "keys.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34288,35 +46472,52 @@ "Key": [] } ], - "parameters": [ - { - "name": "keyId", - "description": "Key ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<KEY_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/project\/labels": { - "put": { - "summary": "Update project labels", - "operationId": "projectUpdateLabels", + "\/project\/oauth2\/linkedin": { + "patch": { + "summary": "Update project OAuth2 Linkedin", + "operationId": "projectUpdateOAuth2Linkedin", "tags": [ "project" ], - "description": "Update the project labels. Labels can be used to easily filter projects in an organization.", + "description": "Update the project OAuth2 Linkedin configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Linkedin", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Linkedin" } } } @@ -34324,15 +46525,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLabels", - "group": null, + "method": "updateOAuth2Linkedin", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-labels.md", + "demo": "project\/update-o-auth-2-linkedin.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34356,39 +46557,46 @@ "schema": { "type": "object", "properties": { - "labels": { - "type": "array", - "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } + "clientId": { + "type": "string", + "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "primaryClientSecret": { + "type": "string", + "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", + "x-example": "<PRIMARY_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "labels" - ] + } } } } } } }, - "\/project\/mock-phones": { - "get": { - "summary": "List project mock phones", - "operationId": "projectListMockPhones", + "\/project\/oauth2\/microsoft": { + "patch": { + "summary": "Update project OAuth2 Microsoft", + "operationId": "projectUpdateOAuth2Microsoft", "tags": [ "project" ], - "description": "Get a list of all mock phones in the project. This endpoint returns an array of all mock phones and their OTPs.", + "description": "Update the project OAuth2 Microsoft configuration.", "responses": { "200": { - "description": "Mock Numbers List", + "description": "OAuth2Microsoft", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mockNumberList" + "$ref": "#\/components\/schemas\/oAuth2Microsoft" } } } @@ -34396,15 +46604,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMockPhones", - "group": "mocks", + "method": "updateOAuth2Microsoft", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/list-mock-phones.md", + "demo": "project\/update-o-auth-2-microsoft.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34422,47 +46630,58 @@ "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). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "applicationId": { + "type": "string", + "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", + "x-example": "<APPLICATION_ID>", + "x-nullable": true + }, + "applicationSecret": { + "type": "string", + "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "x-example": "<APPLICATION_SECRET>", + "x-nullable": true + }, + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", + "x-example": "<TENANT>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "post": { - "summary": "Create project mock phone", - "operationId": "projectCreateMockPhone", + } + } + }, + "\/project\/oauth2\/notion": { + "patch": { + "summary": "Update project OAuth2 Notion", + "operationId": "projectUpdateOAuth2Notion", "tags": [ "project" ], - "description": "Create a new mock phone for your project. Use this endpoint to register a mock phone number and its sign-in OTP for your testers.", + "description": "Update the project OAuth2 Notion configuration.", "responses": { - "201": { - "description": "Mock Number", + "200": { + "description": "OAuth2Notion", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mockNumber" + "$ref": "#\/components\/schemas\/oAuth2Notion" } } } @@ -34470,15 +46689,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMockPhone", - "group": "mocks", + "method": "updateOAuth2Notion", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/create-mock-phone.md", + "demo": "project\/update-o-auth-2-notion.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34502,43 +46721,46 @@ "schema": { "type": "object", "properties": { - "number": { + "oauthClientId": { "type": "string", - "description": "Phone number to associate with the mock phone. Must be a valid E.164 formatted phone number.", - "x-example": "+12065550100", - "format": "phone" + "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", + "x-example": "<OAUTH_CLIENT_ID>", + "x-nullable": true }, - "otp": { + "oauthClientSecret": { "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" + "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", + "x-example": "<OAUTH_CLIENT_SECRET>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "number", - "otp" - ] + } } } } } } }, - "\/project\/mock-phones\/{number}": { - "get": { - "summary": "Get project mock phone", - "operationId": "projectGetMockPhone", + "\/project\/oauth2\/oidc": { + "patch": { + "summary": "Update project OAuth2 Oidc", + "operationId": "projectUpdateOAuth2Oidc", "tags": [ "project" ], - "description": "Get a mock phone by its unique number. This endpoint returns the mock phone's OTP.", + "description": "Update the project OAuth2 Oidc configuration.", "responses": { "200": { - "description": "Mock Number", + "description": "OAuth2Oidc", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mockNumber" + "$ref": "#\/components\/schemas\/oAuth2Oidc" } } } @@ -34546,15 +46768,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getMockPhone", - "group": "mocks", + "method": "updateOAuth2Oidc", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/get-mock-phone.md", + "demo": "project\/update-o-auth-2-oidc.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34572,34 +46794,109 @@ "Key": [] } ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "tokenURL": { + "type": "string", + "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "userInfoURL": { + "type": "string", + "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", + "x-example": "https:\/\/example.com", + "format": "url", + "x-nullable": true + }, + "prompt": { + "type": "array", + "description": "Array of OpenID Connect prompt values controlling the authentication and consent screens. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account.", + "x-example": null, + "items": { + "type": "string", + "enum": [ + "none", + "login", + "consent", + "select_account" + ], + "x-enum-name": "ProjectOAuth2OidcPrompt", + "x-enum-keys": [ + "none", + "login", + "consent", + "select_account" + ] + }, + "x-nullable": true + }, + "maxAge": { + "type": "integer", + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] - }, - "put": { - "summary": "Update project mock phone", - "operationId": "projectUpdateMockPhone", + } + } + }, + "\/project\/oauth2\/okta": { + "patch": { + "summary": "Update project OAuth2 Okta", + "operationId": "projectUpdateOAuth2Okta", "tags": [ "project" ], - "description": "Update a mock phone by its unique number. Use this endpoint to update the mock phone's OTP.", + "description": "Update the project OAuth2 Okta configuration.", "responses": { "200": { - "description": "Mock Number", + "description": "OAuth2Okta", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mockNumber" + "$ref": "#\/components\/schemas\/oAuth2Okta" } } } @@ -34607,15 +46904,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMockPhone", - "group": "mocks", + "method": "updateOAuth2Okta", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-mock-phone.md", + "demo": "project\/update-o-auth-2-okta.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34633,109 +46930,64 @@ "Key": [] } ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "otp": { + "clientId": { "type": "string", - "description": "One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.", - "x-example": "<OTP>" + "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "clientSecret": { + "type": "string", + "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "x-example": "<CLIENT_SECRET>", + "x-nullable": true + }, + "domain": { + "type": "string", + "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", + "x-example": null, + "x-nullable": true + }, + "authorizationServerId": { + "type": "string", + "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", + "x-example": "<AUTHORIZATION_SERVER_ID>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "otp" - ] + } } } } } - }, - "delete": { - "summary": "Delete project mock phone", - "operationId": "projectDeleteMockPhone", - "tags": [ - "project" - ], - "description": "Delete a mock phone by its unique number. This endpoint removes the mock phone and its OTP configuration from the project.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteMockPhone", - "group": "mocks", - "cookies": false, - "type": "", - "demo": "project\/delete-mock-phone.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "mocks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "number", - "description": "Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.", - "required": true, - "schema": { - "type": "string", - "format": "phone", - "x-example": "+12065550100" - }, - "in": "path" - } - ] } }, - "\/project\/oauth2": { - "get": { - "summary": "List project OAuth2 providers", - "operationId": "projectListOAuth2Providers", + "\/project\/oauth2\/paypal": { + "patch": { + "summary": "Update project OAuth2 Paypal", + "operationId": "projectUpdateOAuth2Paypal", "tags": [ "project" ], - "description": "Get a list of all OAuth2 providers supported by the server, along with the project's configuration for each. Credential fields are write-only and always returned empty.", + "description": "Update the project OAuth2 Paypal configuration.", "responses": { "200": { - "description": "OAuth2 Providers List", + "description": "OAuth2Paypal", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2ProviderList" + "$ref": "#\/components\/schemas\/oAuth2Paypal" } } } @@ -34743,15 +46995,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listOAuth2Providers", + "method": "updateOAuth2Paypal", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/list-o-auth-2-providers.md", + "demo": "project\/update-o-auth-2-paypal.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34769,49 +47021,52 @@ "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). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", + "x-nullable": true + }, + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "x-example": false, + "x-nullable": true + } + } + } + } } - ] + } } }, - "\/project\/oauth2-server": { - "put": { - "summary": "Update OAuth2 server", - "operationId": "projectUpdateOAuth2Server", + "\/project\/oauth2\/paypalSandbox": { + "patch": { + "summary": "Update project OAuth2 PaypalSandbox", + "operationId": "projectUpdateOAuth2PaypalSandbox", "tags": [ "project" ], - "description": "Update the OAuth2 server (OIDC provider) configuration.", + "description": "Update the project OAuth2 PaypalSandbox configuration.", "responses": { "200": { - "description": "Project", + "description": "OAuth2Paypal", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/oAuth2Paypal" } } } @@ -34819,15 +47074,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Server", - "group": null, + "method": "updateOAuth2PaypalSandbox", + "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-server.md", + "demo": "project\/update-o-auth-2-paypal-sandbox.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -34851,122 +47106,46 @@ "schema": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Enable or disable the OAuth2 server.", - "x-example": false - }, - "authorizationUrl": { + "clientId": { "type": "string", - "description": "URL to your application with consent screen.", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "scopes": { - "type": "array", - "description": "List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "authorizationDetailsTypes": { - "type": "array", - "description": "List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "accessTokenDuration": { - "type": "integer", - "description": "Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.", - "x-example": 60, - "format": "int32", - "x-nullable": true - }, - "refreshTokenDuration": { - "type": "integer", - "description": "Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.", - "x-example": 60, - "format": "int32", - "x-nullable": true - }, - "publicAccessTokenDuration": { - "type": "integer", - "description": "Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.", - "x-example": 60, - "format": "int32", + "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "publicRefreshTokenDuration": { - "type": "integer", - "description": "Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.", - "x-example": 60, - "format": "int32", + "secretKey": { + "type": "string", + "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", + "x-example": "<SECRET_KEY>", "x-nullable": true }, - "confidentialPkce": { + "enabled": { "type": "boolean", - "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "x-example": false, "x-nullable": true - }, - "verificationUrl": { - "type": "string", - "description": "URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "userCodeLength": { - "type": "integer", - "description": "Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.", - "x-example": 6, - "format": "int32", - "x-nullable": true - }, - "userCodeFormat": { - "type": "string", - "description": "Character set for device flow user codes: `numeric` (digits only \u2014 best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits \u2014 highest entropy per character). Defaults to `alphanumeric`.", - "default": "alphanumeric", - "x-example": "numeric" - }, - "deviceCodeDuration": { - "type": "integer", - "description": "Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.", - "x-example": 60, - "format": "int32", - "x-nullable": true } - }, - "required": [ - "enabled", - "authorizationUrl" - ] + } } } } } } }, - "\/project\/oauth2\/amazon": { + "\/project\/oauth2\/podio": { "patch": { - "summary": "Update project OAuth2 Amazon", - "operationId": "projectUpdateOAuth2Amazon", + "summary": "Update project OAuth2 Podio", + "operationId": "projectUpdateOAuth2Podio", "tags": [ "project" ], - "description": "Update the project OAuth2 Amazon configuration.", + "description": "Update the project OAuth2 Podio configuration.", "responses": { "200": { - "description": "OAuth2Amazon", + "description": "OAuth2Podio", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Amazon" + "$ref": "#\/components\/schemas\/oAuth2Podio" } } } @@ -34974,15 +47153,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Amazon", + "method": "updateOAuth2Podio", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-amazon.md", + "demo": "project\/update-o-auth-2-podio.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35008,13 +47187,13 @@ "properties": { "clientId": { "type": "string", - "description": "'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", "x-example": "<CLIENT_ID>", "x-nullable": true }, "clientSecret": { "type": "string", - "description": "'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55", + "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", "x-example": "<CLIENT_SECRET>", "x-nullable": true }, @@ -35031,21 +47210,21 @@ } } }, - "\/project\/oauth2\/apple": { + "\/project\/oauth2\/salesforce": { "patch": { - "summary": "Update project OAuth2 Apple", - "operationId": "projectUpdateOAuth2Apple", + "summary": "Update project OAuth2 Salesforce", + "operationId": "projectUpdateOAuth2Salesforce", "tags": [ "project" ], - "description": "Update the project OAuth2 Apple configuration.", + "description": "Update the project OAuth2 Salesforce configuration.", "responses": { "200": { - "description": "OAuth2Apple", + "description": "OAuth2Salesforce", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Apple" + "$ref": "#\/components\/schemas\/oAuth2Salesforce" } } } @@ -35053,15 +47232,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Apple", + "method": "updateOAuth2Salesforce", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-apple.md", + "demo": "project\/update-o-auth-2-salesforce.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35085,28 +47264,16 @@ "schema": { "type": "object", "properties": { - "serviceId": { - "type": "string", - "description": "'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web", - "x-example": "<SERVICE_ID>", - "x-nullable": true - }, - "keyId": { - "type": "string", - "description": "'Key ID' of Apple OAuth2 app. For example: P4000000N8", - "x-example": "<KEY_ID>", - "x-nullable": true - }, - "teamId": { + "customerKey": { "type": "string", - "description": "'Team ID' of Apple OAuth2 app. For example: D4000000R6", - "x-example": "<TEAM_ID>", + "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "x-example": "<CUSTOMER_KEY>", "x-nullable": true }, - "p8File": { + "customerSecret": { "type": "string", - "description": "Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", - "x-example": "<P8_FILE>", + "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", + "x-example": "<CUSTOMER_SECRET>", "x-nullable": true }, "enabled": { @@ -35122,21 +47289,21 @@ } } }, - "\/project\/oauth2\/auth0": { + "\/project\/oauth2\/slack": { "patch": { - "summary": "Update project OAuth2 Auth0", - "operationId": "projectUpdateOAuth2Auth0", + "summary": "Update project OAuth2 Slack", + "operationId": "projectUpdateOAuth2Slack", "tags": [ "project" ], - "description": "Update the project OAuth2 Auth0 configuration.", + "description": "Update the project OAuth2 Slack configuration.", "responses": { "200": { - "description": "OAuth2Auth0", + "description": "OAuth2Slack", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Auth0" + "$ref": "#\/components\/schemas\/oAuth2Slack" } } } @@ -35144,15 +47311,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Auth0", + "method": "updateOAuth2Slack", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-auth-0.md", + "demo": "project\/update-o-auth-2-slack.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35178,22 +47345,16 @@ "properties": { "clientId": { "type": "string", - "description": "'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", "x-example": "<CLIENT_ID>", "x-nullable": true }, "clientSecret": { "type": "string", - "description": "'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", "x-example": "<CLIENT_SECRET>", "x-nullable": true }, - "endpoint": { - "type": "string", - "description": "Domain of Auth0 instance. For example: example.us.auth0.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, "enabled": { "type": "boolean", "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", @@ -35207,21 +47368,21 @@ } } }, - "\/project\/oauth2\/authentik": { + "\/project\/oauth2\/spotify": { "patch": { - "summary": "Update project OAuth2 Authentik", - "operationId": "projectUpdateOAuth2Authentik", + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", "tags": [ "project" ], - "description": "Update the project OAuth2 Authentik configuration.", + "description": "Update the project OAuth2 Spotify configuration.", "responses": { "200": { - "description": "OAuth2Authentik", + "description": "OAuth2Spotify", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Authentik" + "$ref": "#\/components\/schemas\/oAuth2Spotify" } } } @@ -35229,15 +47390,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Authentik", + "method": "updateOAuth2Spotify", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-authentik.md", + "demo": "project\/update-o-auth-2-spotify.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35263,22 +47424,16 @@ "properties": { "clientId": { "type": "string", - "description": "'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv", + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", "x-example": "<CLIENT_ID>", "x-nullable": true }, "clientSecret": { "type": "string", - "description": "'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", "x-example": "<CLIENT_SECRET>", "x-nullable": true }, - "endpoint": { - "type": "string", - "description": "Domain of Authentik instance. For example: example.authentik.com", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, "enabled": { "type": "boolean", "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", @@ -35292,21 +47447,21 @@ } } }, - "\/project\/oauth2\/autodesk": { + "\/project\/oauth2\/stripe": { "patch": { - "summary": "Update project OAuth2 Autodesk", - "operationId": "projectUpdateOAuth2Autodesk", + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", "tags": [ "project" ], - "description": "Update the project OAuth2 Autodesk configuration.", + "description": "Update the project OAuth2 Stripe configuration.", "responses": { "200": { - "description": "OAuth2Autodesk", + "description": "OAuth2Stripe", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" + "$ref": "#\/components\/schemas\/oAuth2Stripe" } } } @@ -35314,15 +47469,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Autodesk", + "method": "updateOAuth2Stripe", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-autodesk.md", + "demo": "project\/update-o-auth-2-stripe.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35348,14 +47503,14 @@ "properties": { "clientId": { "type": "string", - "description": "'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", "x-example": "<CLIENT_ID>", "x-nullable": true }, - "clientSecret": { + "apiSecretKey": { "type": "string", - "description": "'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW", - "x-example": "<CLIENT_SECRET>", + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "x-example": "<API_SECRET_KEY>", "x-nullable": true }, "enabled": { @@ -35371,21 +47526,21 @@ } } }, - "\/project\/oauth2\/bitbucket": { + "\/project\/oauth2\/tradeshift": { "patch": { - "summary": "Update project OAuth2 Bitbucket", - "operationId": "projectUpdateOAuth2Bitbucket", + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", "tags": [ "project" ], - "description": "Update the project OAuth2 Bitbucket configuration.", + "description": "Update the project OAuth2 Tradeshift configuration.", "responses": { "200": { - "description": "OAuth2Bitbucket", + "description": "OAuth2Tradeshift", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" } } } @@ -35393,15 +47548,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Bitbucket", + "method": "updateOAuth2Tradeshift", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-bitbucket.md", + "demo": "project\/update-o-auth-2-tradeshift.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35425,16 +47580,16 @@ "schema": { "type": "object", "properties": { - "key": { + "oauth2ClientId": { "type": "string", - "description": "'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc", - "x-example": "<KEY>", + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", "x-nullable": true }, - "secret": { + "oauth2ClientSecret": { "type": "string", - "description": "'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx", - "x-example": "<SECRET>", + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -35450,21 +47605,21 @@ } } }, - "\/project\/oauth2\/bitly": { + "\/project\/oauth2\/tradeshiftBox": { "patch": { - "summary": "Update project OAuth2 Bitly", - "operationId": "projectUpdateOAuth2Bitly", + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", "tags": [ "project" ], - "description": "Update the project OAuth2 Bitly configuration.", + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", "responses": { "200": { - "description": "OAuth2Bitly", + "description": "OAuth2Tradeshift", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Bitly" + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" } } } @@ -35472,15 +47627,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Bitly", + "method": "updateOAuth2TradeshiftSandbox", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-bitly.md", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35504,16 +47659,16 @@ "schema": { "type": "object", "properties": { - "clientId": { + "oauth2ClientId": { "type": "string", - "description": "'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b", - "x-example": "<CLIENT_ID>", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "x-example": "<OAUTH2_CLIENT_ID>", "x-nullable": true }, - "clientSecret": { + "oauth2ClientSecret": { "type": "string", - "description": "'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095", - "x-example": "<CLIENT_SECRET>", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "x-example": "<OAUTH2_CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -35529,21 +47684,21 @@ } } }, - "\/project\/oauth2\/box": { + "\/project\/oauth2\/twitch": { "patch": { - "summary": "Update project OAuth2 Box", - "operationId": "projectUpdateOAuth2Box", + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", "tags": [ "project" ], - "description": "Update the project OAuth2 Box configuration.", + "description": "Update the project OAuth2 Twitch configuration.", "responses": { "200": { - "description": "OAuth2Box", + "description": "OAuth2Twitch", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Box" + "$ref": "#\/components\/schemas\/oAuth2Twitch" } } } @@ -35551,15 +47706,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Box", + "method": "updateOAuth2Twitch", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-box.md", + "demo": "project\/update-o-auth-2-twitch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35585,13 +47740,13 @@ "properties": { "clientId": { "type": "string", - "description": "'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y", + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", "x-example": "<CLIENT_ID>", "x-nullable": true }, "clientSecret": { "type": "string", - "description": "'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif", + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", "x-example": "<CLIENT_SECRET>", "x-nullable": true }, @@ -35608,21 +47763,21 @@ } } }, - "\/project\/oauth2\/dailymotion": { + "\/project\/oauth2\/wordpress": { "patch": { - "summary": "Update project OAuth2 Dailymotion", - "operationId": "projectUpdateOAuth2Dailymotion", + "summary": "Update project OAuth2 WordPress", + "operationId": "projectUpdateOAuth2WordPress", "tags": [ "project" ], - "description": "Update the project OAuth2 Dailymotion configuration.", + "description": "Update the project OAuth2 WordPress configuration.", "responses": { "200": { - "description": "OAuth2Dailymotion", + "description": "OAuth2WordPress", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + "$ref": "#\/components\/schemas\/oAuth2WordPress" } } } @@ -35630,15 +47785,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Dailymotion", + "method": "updateOAuth2WordPress", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-dailymotion.md", + "demo": "project\/update-o-auth-2-word-press.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35662,16 +47817,16 @@ "schema": { "type": "object", "properties": { - "apiKey": { + "clientId": { "type": "string", - "description": "'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f", - "x-example": "<API_KEY>", + "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "apiSecret": { + "clientSecret": { "type": "string", - "description": "'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639", - "x-example": "<API_SECRET>", + "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", + "x-example": "<CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -35687,21 +47842,21 @@ } } }, - "\/project\/oauth2\/discord": { + "\/project\/oauth2\/x": { "patch": { - "summary": "Update project OAuth2 Discord", - "operationId": "projectUpdateOAuth2Discord", + "summary": "Update project OAuth2 X", + "operationId": "projectUpdateOAuth2X", "tags": [ "project" ], - "description": "Update the project OAuth2 Discord configuration.", + "description": "Update the project OAuth2 X configuration.", "responses": { "200": { - "description": "OAuth2Discord", + "description": "OAuth2X", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Discord" + "$ref": "#\/components\/schemas\/oAuth2X" } } } @@ -35709,15 +47864,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Discord", + "method": "updateOAuth2X", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-discord.md", + "demo": "project\/update-o-auth-2x.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35741,16 +47896,16 @@ "schema": { "type": "object", "properties": { - "clientId": { + "customerKey": { "type": "string", - "description": "'Client ID' of Discord OAuth2 app. For example: 950722000000343754", - "x-example": "<CLIENT_ID>", + "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", + "x-example": "<CUSTOMER_KEY>", "x-nullable": true }, - "clientSecret": { + "secretKey": { "type": "string", - "description": "'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D", - "x-example": "<CLIENT_SECRET>", + "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", + "x-example": "<SECRET_KEY>", "x-nullable": true }, "enabled": { @@ -35766,21 +47921,21 @@ } } }, - "\/project\/oauth2\/disqus": { + "\/project\/oauth2\/yahoo": { "patch": { - "summary": "Update project OAuth2 Disqus", - "operationId": "projectUpdateOAuth2Disqus", + "summary": "Update project OAuth2 Yahoo", + "operationId": "projectUpdateOAuth2Yahoo", "tags": [ "project" ], - "description": "Update the project OAuth2 Disqus configuration.", + "description": "Update the project OAuth2 Yahoo configuration.", "responses": { "200": { - "description": "OAuth2Disqus", + "description": "OAuth2Yahoo", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Disqus" + "$ref": "#\/components\/schemas\/oAuth2Yahoo" } } } @@ -35788,15 +47943,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Disqus", + "method": "updateOAuth2Yahoo", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-disqus.md", + "demo": "project\/update-o-auth-2-yahoo.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35820,16 +47975,16 @@ "schema": { "type": "object", "properties": { - "publicKey": { + "clientId": { "type": "string", - "description": "'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "x-example": "<PUBLIC_KEY>", + "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "secretKey": { + "clientSecret": { "type": "string", - "description": "'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9", - "x-example": "<SECRET_KEY>", + "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", + "x-example": "<CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -35845,21 +48000,21 @@ } } }, - "\/project\/oauth2\/dropbox": { + "\/project\/oauth2\/yandex": { "patch": { - "summary": "Update project OAuth2 Dropbox", - "operationId": "projectUpdateOAuth2Dropbox", + "summary": "Update project OAuth2 Yandex", + "operationId": "projectUpdateOAuth2Yandex", "tags": [ "project" ], - "description": "Update the project OAuth2 Dropbox configuration.", + "description": "Update the project OAuth2 Yandex configuration.", "responses": { "200": { - "description": "OAuth2Dropbox", + "description": "OAuth2Yandex", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" + "$ref": "#\/components\/schemas\/oAuth2Yandex" } } } @@ -35867,15 +48022,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Dropbox", + "method": "updateOAuth2Yandex", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-dropbox.md", + "demo": "project\/update-o-auth-2-yandex.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35899,16 +48054,16 @@ "schema": { "type": "object", "properties": { - "appKey": { + "clientId": { "type": "string", - "description": "'App Key' of Dropbox OAuth2 app. For example: jl000000000009t", - "x-example": "<APP_KEY>", + "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "appSecret": { + "clientSecret": { "type": "string", - "description": "'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw", - "x-example": "<APP_SECRET>", + "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", + "x-example": "<CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -35924,21 +48079,21 @@ } } }, - "\/project\/oauth2\/etsy": { + "\/project\/oauth2\/zoho": { "patch": { - "summary": "Update project OAuth2 Etsy", - "operationId": "projectUpdateOAuth2Etsy", + "summary": "Update project OAuth2 Zoho", + "operationId": "projectUpdateOAuth2Zoho", "tags": [ "project" ], - "description": "Update the project OAuth2 Etsy configuration.", + "description": "Update the project OAuth2 Zoho configuration.", "responses": { "200": { - "description": "OAuth2Etsy", + "description": "OAuth2Zoho", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Etsy" + "$ref": "#\/components\/schemas\/oAuth2Zoho" } } } @@ -35946,15 +48101,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Etsy", + "method": "updateOAuth2Zoho", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-etsy.md", + "demo": "project\/update-o-auth-2-zoho.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -35978,16 +48133,16 @@ "schema": { "type": "object", "properties": { - "keyString": { + "clientId": { "type": "string", - "description": "'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2", - "x-example": "<KEY_STRING>", + "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "sharedSecret": { + "clientSecret": { "type": "string", - "description": "'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru", - "x-example": "<SHARED_SECRET>", + "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", + "x-example": "<CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -36003,21 +48158,21 @@ } } }, - "\/project\/oauth2\/facebook": { + "\/project\/oauth2\/zoom": { "patch": { - "summary": "Update project OAuth2 Facebook", - "operationId": "projectUpdateOAuth2Facebook", + "summary": "Update project OAuth2 Zoom", + "operationId": "projectUpdateOAuth2Zoom", "tags": [ "project" ], - "description": "Update the project OAuth2 Facebook configuration.", + "description": "Update the project OAuth2 Zoom configuration.", "responses": { "200": { - "description": "OAuth2Facebook", + "description": "OAuth2Zoom", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Facebook" + "$ref": "#\/components\/schemas\/oAuth2Zoom" } } } @@ -36025,15 +48180,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Facebook", + "method": "updateOAuth2Zoom", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-facebook.md", + "demo": "project\/update-o-auth-2-zoom.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.write", "platforms": [ "console", "server" @@ -36057,16 +48212,16 @@ "schema": { "type": "object", "properties": { - "appId": { + "clientId": { "type": "string", - "description": "'App ID' of Facebook OAuth2 app. For example: 260600000007694", - "x-example": "<APP_ID>", + "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", + "x-example": "<CLIENT_ID>", "x-nullable": true }, - "appSecret": { + "clientSecret": { "type": "string", - "description": "'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4", - "x-example": "<APP_SECRET>", + "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", + "x-example": "<CLIENT_SECRET>", "x-nullable": true }, "enabled": { @@ -36082,21 +48237,189 @@ } } }, - "\/project\/oauth2\/figma": { - "patch": { - "summary": "Update project OAuth2 Figma", - "operationId": "projectUpdateOAuth2Figma", + "\/project\/oauth2\/{providerId}": { + "get": { + "summary": "Get project OAuth2 provider", + "operationId": "projectGetOAuth2Provider", "tags": [ "project" ], - "description": "Update the project OAuth2 Figma configuration.", + "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", "responses": { "200": { - "description": "OAuth2Figma", + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Figma" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } } } } @@ -36104,15 +48427,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Figma", + "method": "getOAuth2Provider", "group": "oauth2", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-figma.md", + "demo": "project\/get-o-auth-2-provider.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "project.oauth2.read", "platforms": [ "console", "server" @@ -36130,52 +48453,128 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } + "parameters": [ + { + "name": "providerId", + "description": "OAuth2 provider key. For example: github, google, apple.", + "required": true, + "schema": { + "type": "string", + "x-example": "amazon", + "enum": [ + "amazon", + "apple", + "appwrite", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ], + "x-enum-name": "ProjectOAuthProviderId", + "x-enum-keys": [ + "amazon", + "apple", + "appwrite", + "auth0", + "authentik", + "autodesk", + "bitbucket", + "bitly", + "box", + "dailymotion", + "discord", + "disqus", + "dropbox", + "etsy", + "facebook", + "figma", + "fusionauth", + "github", + "gitlab", + "google", + "keycloak", + "kick", + "linkedin", + "microsoft", + "notion", + "oidc", + "okta", + "paypal", + "paypalSandbox", + "podio", + "salesforce", + "slack", + "spotify", + "stripe", + "tradeshift", + "tradeshiftBox", + "twitch", + "wordpress", + "x", + "yahoo", + "yammer", + "yandex", + "zoho", + "zoom" + ] + }, + "in": "path" } - } + ] } }, - "\/project\/oauth2\/fusionauth": { - "patch": { - "summary": "Update project OAuth2 FusionAuth", - "operationId": "projectUpdateOAuth2FusionAuth", + "\/project\/platforms": { + "get": { + "summary": "List project platforms", + "operationId": "projectListPlatforms", "tags": [ "project" ], - "description": "Update the project OAuth2 FusionAuth configuration.", + "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", "responses": { "200": { - "description": "OAuth2FusionAuth", + "description": "Platforms List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + "$ref": "#\/components\/schemas\/platformList" } } } @@ -36183,15 +48582,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2FusionAuth", - "group": "oauth2", + "method": "listPlatforms", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-fusion-auth.md", + "demo": "project\/list-platforms.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.read", "platforms": [ "console", "server" @@ -36209,58 +48608,49 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { - "type": "string", - "description": "Domain of FusionAuth instance. For example: example.fusionauth.io", - "x-example": "<ENDPOINT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } + "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: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/project\/oauth2\/github": { - "patch": { - "summary": "Update project OAuth2 GitHub", - "operationId": "projectUpdateOAuth2GitHub", + "\/project\/platforms\/android": { + "post": { + "summary": "Create project Android platform", + "operationId": "projectCreateAndroidPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 GitHub configuration.", + "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", "responses": { - "200": { - "description": "OAuth2GitHub", + "201": { + "description": "Platform Android", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Github" + "$ref": "#\/components\/schemas\/platformAndroid" } } } @@ -36268,15 +48658,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2GitHub", - "group": "oauth2", + "method": "createAndroidPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-git-hub.md", + "demo": "project\/create-android-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36300,46 +48690,51 @@ "schema": { "type": "object", "properties": { - "clientId": { + "platformId": { "type": "string", - "description": "'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "clientSecret": { + "name": { "type": "string", - "description": "'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "applicationId": { + "type": "string", + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" } - } + }, + "required": [ + "platformId", + "name", + "applicationId" + ] } } } } } }, - "\/project\/oauth2\/gitlab": { - "patch": { - "summary": "Update project OAuth2 Gitlab", - "operationId": "projectUpdateOAuth2Gitlab", + "\/project\/platforms\/android\/{platformId}": { + "put": { + "summary": "Update project Android platform", + "operationId": "projectUpdateAndroidPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Gitlab configuration.", + "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", "responses": { "200": { - "description": "OAuth2Gitlab", + "description": "Platform Android", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" + "$ref": "#\/components\/schemas\/platformAndroid" } } } @@ -36347,15 +48742,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Gitlab", - "group": "oauth2", + "method": "updateAndroidPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-gitlab.md", + "demo": "project\/update-android-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36373,59 +48768,60 @@ "Key": [] } ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "applicationId": { - "type": "string", - "description": "'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "x-example": "<APPLICATION_ID>", - "x-nullable": true - }, - "secret": { + "name": { "type": "string", - "description": "'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "x-example": "<SECRET>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "endpoint": { + "applicationId": { "type": "string", - "description": "Endpoint URL of self-hosted GitLab instance. For example: https:\/\/gitlab.com", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Android application ID. Max length: 256 chars.", + "x-example": "<APPLICATION_ID>" } - } + }, + "required": [ + "name", + "applicationId" + ] } } } } } }, - "\/project\/oauth2\/google": { - "patch": { - "summary": "Update project OAuth2 Google", - "operationId": "projectUpdateOAuth2Google", + "\/project\/platforms\/apple": { + "post": { + "summary": "Create project Apple platform", + "operationId": "projectCreateApplePlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Google configuration.", + "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", "responses": { - "200": { - "description": "OAuth2Google", + "201": { + "description": "Platform Apple", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Google" + "$ref": "#\/components\/schemas\/platformApple" } } } @@ -36433,15 +48829,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Google", - "group": "oauth2", + "method": "createApplePlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-google.md", + "demo": "project\/create-apple-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36465,66 +48861,51 @@ "schema": { "type": "object", "properties": { - "clientId": { + "platformId": { "type": "string", - "description": "'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "clientSecret": { + "name": { "type": "string", - "description": "'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "prompt": { - "type": "array", - "description": "Array of Google OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. Must not be specified with other values. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account.", - "x-example": null, - "items": { - "type": "string", - "enum": [ - "none", - "consent", - "select_account" - ], - "x-enum-name": "ProjectOAuth2GooglePrompt", - "x-enum-keys": [ - "none", - "consent", - "select_account" - ] - }, - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "bundleIdentifier": { + "type": "string", + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" } - } + }, + "required": [ + "platformId", + "name", + "bundleIdentifier" + ] } } } } } }, - "\/project\/oauth2\/keycloak": { - "patch": { - "summary": "Update project OAuth2 Keycloak", - "operationId": "projectUpdateOAuth2Keycloak", + "\/project\/platforms\/apple\/{platformId}": { + "put": { + "summary": "Update project Apple platform", + "operationId": "projectUpdateApplePlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Keycloak configuration.", + "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", "responses": { "200": { - "description": "OAuth2Keycloak", + "description": "Platform Apple", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" + "$ref": "#\/components\/schemas\/platformApple" } } } @@ -36532,15 +48913,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Keycloak", - "group": "oauth2", + "method": "updateApplePlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-keycloak.md", + "demo": "project\/update-apple-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36558,64 +48939,60 @@ "Key": [] } ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "endpoint": { + "name": { "type": "string", - "description": "Domain of Keycloak instance. For example: keycloak.example.com", - "x-example": "<ENDPOINT>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "realmName": { + "bundleIdentifier": { "type": "string", - "description": "Keycloak realm name. For example: appwrite-realm", - "x-example": "<REALM_NAME>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Apple bundle identifier. Max length: 256 chars.", + "x-example": "<BUNDLE_IDENTIFIER>" } - } + }, + "required": [ + "name", + "bundleIdentifier" + ] } } } } } }, - "\/project\/oauth2\/kick": { - "patch": { - "summary": "Update project OAuth2 Kick", - "operationId": "projectUpdateOAuth2Kick", + "\/project\/platforms\/linux": { + "post": { + "summary": "Create project Linux platform", + "operationId": "projectCreateLinuxPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Kick configuration.", + "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", "responses": { - "200": { - "description": "OAuth2Kick", + "201": { + "description": "Platform Linux", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Kick" + "$ref": "#\/components\/schemas\/platformLinux" } } } @@ -36623,15 +49000,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Kick", - "group": "oauth2", + "method": "createLinuxPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-kick.md", + "demo": "project\/create-linux-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36655,46 +49032,51 @@ "schema": { "type": "object", "properties": { - "clientId": { + "platformId": { "type": "string", - "description": "'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "clientSecret": { + "name": { "type": "string", - "description": "'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "packageName": { + "type": "string", + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" } - } + }, + "required": [ + "platformId", + "name", + "packageName" + ] } } } } } }, - "\/project\/oauth2\/linkedin": { - "patch": { - "summary": "Update project OAuth2 Linkedin", - "operationId": "projectUpdateOAuth2Linkedin", + "\/project\/platforms\/linux\/{platformId}": { + "put": { + "summary": "Update project Linux platform", + "operationId": "projectUpdateLinuxPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Linkedin configuration.", + "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", "responses": { "200": { - "description": "OAuth2Linkedin", + "description": "Platform Linux", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" + "$ref": "#\/components\/schemas\/platformLinux" } } } @@ -36702,15 +49084,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Linkedin", - "group": "oauth2", + "method": "updateLinuxPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-linkedin.md", + "demo": "project\/update-linux-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36728,52 +49110,60 @@ "Key": [] } ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "clientId": { + "name": { "type": "string", - "description": "'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "primaryClientSecret": { + "packageName": { "type": "string", - "description": "'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000.\/HtlYw==", - "x-example": "<PRIMARY_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Linux package name. Max length: 256 chars.", + "x-example": "<PACKAGE_NAME>" } - } + }, + "required": [ + "name", + "packageName" + ] } } } } } }, - "\/project\/oauth2\/microsoft": { - "patch": { - "summary": "Update project OAuth2 Microsoft", - "operationId": "projectUpdateOAuth2Microsoft", + "\/project\/platforms\/web": { + "post": { + "summary": "Create project web platform", + "operationId": "projectCreateWebPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Microsoft configuration.", + "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", "responses": { - "200": { - "description": "OAuth2Microsoft", + "201": { + "description": "Platform Web", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" + "$ref": "#\/components\/schemas\/platformWeb" } } } @@ -36781,15 +49171,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Microsoft", - "group": "oauth2", + "method": "createWebPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-microsoft.md", + "demo": "project\/create-web-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36813,52 +49203,51 @@ "schema": { "type": "object", "properties": { - "applicationId": { + "platformId": { "type": "string", - "description": "'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444", - "x-example": "<APPLICATION_ID>", - "x-nullable": true + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "applicationSecret": { + "name": { "type": "string", - "description": "'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "x-example": "<APPLICATION_SECRET>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "tenant": { + "hostname": { "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common", - "x-example": "<TENANT>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" } - } + }, + "required": [ + "platformId", + "name", + "hostname" + ] } } } } } }, - "\/project\/oauth2\/notion": { - "patch": { - "summary": "Update project OAuth2 Notion", - "operationId": "projectUpdateOAuth2Notion", + "\/project\/platforms\/web\/{platformId}": { + "put": { + "summary": "Update project web platform", + "operationId": "projectUpdateWebPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Notion configuration.", + "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", "responses": { "200": { - "description": "OAuth2Notion", + "description": "Platform Web", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Notion" + "$ref": "#\/components\/schemas\/platformWeb" } } } @@ -36866,15 +49255,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Notion", - "group": "oauth2", + "method": "updateWebPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-notion.md", + "demo": "project\/update-web-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36892,52 +49281,60 @@ "Key": [] } ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "oauthClientId": { + "name": { "type": "string", - "description": "'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3", - "x-example": "<OAUTH_CLIENT_ID>", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "oauthClientSecret": { + "hostname": { "type": "string", - "description": "'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9", - "x-example": "<OAUTH_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Platform web hostname. Max length: 256 chars.", + "x-example": "app.example.com" } - } + }, + "required": [ + "name", + "hostname" + ] } } } } } }, - "\/project\/oauth2\/oidc": { - "patch": { - "summary": "Update project OAuth2 Oidc", - "operationId": "projectUpdateOAuth2Oidc", + "\/project\/platforms\/windows": { + "post": { + "summary": "Create project Windows platform", + "operationId": "projectCreateWindowsPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Oidc configuration.", + "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", "responses": { - "200": { - "description": "OAuth2Oidc", + "201": { + "description": "Platform Windows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Oidc" + "$ref": "#\/components\/schemas\/platformWindows" } } } @@ -36945,15 +49342,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Oidc", - "group": "oauth2", + "method": "createWindowsPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-oidc.md", + "demo": "project\/create-windows-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -36977,74 +49374,51 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https:\/\/myoauth.com\/.well-known\/openid-configuration", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "authorizationURL": { + "platformId": { "type": "string", - "description": "OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/authorize", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true + "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<PLATFORM_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "tokenURL": { + "name": { "type": "string", - "description": "OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/token", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "userInfoURL": { + "packageIdentifierName": { "type": "string", - "description": "OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https:\/\/myoauth.com\/oauth2\/userinfo", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" } - } + }, + "required": [ + "platformId", + "name", + "packageIdentifierName" + ] } } } } } }, - "\/project\/oauth2\/okta": { - "patch": { - "summary": "Update project OAuth2 Okta", - "operationId": "projectUpdateOAuth2Okta", + "\/project\/platforms\/windows\/{platformId}": { + "put": { + "summary": "Update project Windows platform", + "operationId": "projectUpdateWindowsPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Okta configuration.", + "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", "responses": { "200": { - "description": "OAuth2Okta", + "description": "Platform Windows", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Okta" + "$ref": "#\/components\/schemas\/platformWindows" } } } @@ -37052,15 +49426,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Okta", - "group": "oauth2", + "method": "updateWindowsPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-okta.md", + "demo": "project\/update-windows-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.write", "platforms": [ "console", "server" @@ -37078,64 +49452,86 @@ "Key": [] } ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "domain": { + "name": { "type": "string", - "description": "Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https:\/\/trial-6400025.okta.com\/", - "x-example": null, - "x-nullable": true + "description": "Platform name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "authorizationServerId": { + "packageIdentifierName": { "type": "string", - "description": "Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z", - "x-example": "<AUTHORIZATION_SERVER_ID>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Windows package identifier name. Max length: 256 chars.", + "x-example": "<PACKAGE_IDENTIFIER_NAME>" } - } + }, + "required": [ + "name", + "packageIdentifierName" + ] } } } } } }, - "\/project\/oauth2\/paypal": { - "patch": { - "summary": "Update project OAuth2 Paypal", - "operationId": "projectUpdateOAuth2Paypal", + "\/project\/platforms\/{platformId}": { + "get": { + "summary": "Get project platform", + "operationId": "projectGetPlatform", "tags": [ "project" ], - "description": "Update the project OAuth2 Paypal configuration.", + "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", "responses": { "200": { - "description": "OAuth2Paypal", + "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } } } } @@ -37143,15 +49539,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Paypal", - "group": "oauth2", + "method": "getPlatform", + "group": "platforms", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-paypal.md", + "demo": "project\/get-platform.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": "platforms.read", "platforms": [ "console", "server" @@ -37169,52 +49565,88 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" } - } + ] + }, + "delete": { + "summary": "Delete project platform", + "operationId": "projectDeletePlatform", + "tags": [ + "project" + ], + "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deletePlatform", + "group": "platforms", + "cookies": false, + "type": "", + "demo": "project\/delete-platform.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "platforms.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "platformId", + "description": "Platform ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<PLATFORM_ID>" + }, + "in": "path" + } + ] } }, - "\/project\/oauth2\/paypalSandbox": { - "patch": { - "summary": "Update project OAuth2 PaypalSandbox", - "operationId": "projectUpdateOAuth2PaypalSandbox", + "\/project\/policies": { + "get": { + "summary": "List project policies", + "operationId": "projectListPolicies", "tags": [ "project" ], - "description": "Update the project OAuth2 PaypalSandbox configuration.", + "description": "Get a list of all project policies and their current configuration.", "responses": { "200": { - "description": "OAuth2Paypal", + "description": "Policies List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Paypal" + "$ref": "#\/components\/schemas\/policyList" } } } @@ -37222,15 +49654,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2PaypalSandbox", - "group": "oauth2", + "method": "listPolicies", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-paypal-sandbox.md", + "demo": "project\/list-policies.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.read", + "project.policies.read" + ], "platforms": [ "console", "server" @@ -37248,52 +49683,49 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true - } - } - } - } + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/project\/oauth2\/podio": { + "\/project\/policies\/deny-aliased-email": { "patch": { - "summary": "Update project OAuth2 Podio", - "operationId": "projectUpdateOAuth2Podio", + "summary": "Update deny aliased email policy", + "operationId": "projectUpdateDenyAliasedEmailPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Podio configuration.", + "description": "Configures if aliased emails such as subaddresses and emails with suffixes are denied during new users sign-ups and email updates.", "responses": { "200": { - "description": "OAuth2Podio", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Podio" + "$ref": "#\/components\/schemas\/project" } } } @@ -37301,15 +49733,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Podio", - "group": "oauth2", + "method": "updateDenyAliasedEmailPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-podio.md", + "demo": "project\/update-deny-aliased-email-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37333,46 +49768,36 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Set whether or not to block aliased emails during signup and email updates.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/salesforce": { + "\/project\/policies\/deny-corporate-email": { "patch": { - "summary": "Update project OAuth2 Salesforce", - "operationId": "projectUpdateOAuth2Salesforce", + "summary": "Update deny non-corporate email policy", + "operationId": "projectUpdateDenyCorporateEmailPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Salesforce configuration.", + "description": "Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates.", "responses": { "200": { - "description": "OAuth2Salesforce", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" + "$ref": "#\/components\/schemas\/project" } } } @@ -37380,15 +49805,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Salesforce", - "group": "oauth2", + "method": "updateDenyCorporateEmailPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-salesforce.md", + "demo": "project\/update-deny-corporate-email-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37412,46 +49840,36 @@ "schema": { "type": "object", "properties": { - "customerKey": { - "type": "string", - "description": "'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "customerSecret": { - "type": "string", - "description": "'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2", - "x-example": "<CUSTOMER_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Set whether or not to restrict sign-ups and email updates to corporate email addresses only.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/slack": { + "\/project\/policies\/deny-disposable-email": { "patch": { - "summary": "Update project OAuth2 Slack", - "operationId": "projectUpdateOAuth2Slack", + "summary": "Update deny disposable email policy", + "operationId": "projectUpdateDenyDisposableEmailPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Slack configuration.", + "description": "Configures if disposable emails from known temporary domains are denied during new users sign-ups and email updates.", "responses": { "200": { - "description": "OAuth2Slack", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Slack" + "$ref": "#\/components\/schemas\/project" } } } @@ -37459,15 +49877,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Slack", - "group": "oauth2", + "method": "updateDenyDisposableEmailPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-slack.md", + "demo": "project\/update-deny-disposable-email-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37491,46 +49912,36 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Set whether or not to block disposable email addresses during signup and email updates.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/spotify": { + "\/project\/policies\/deny-free-email": { "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", + "summary": "Update deny free email policy", + "operationId": "projectUpdateDenyFreeEmailPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Spotify configuration.", + "description": "Configures if emails from free providers such as Gmail or Yahoo are denied during new users sign-ups and email updates.", "responses": { "200": { - "description": "OAuth2Spotify", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Spotify" + "$ref": "#\/components\/schemas\/project" } } } @@ -37538,15 +49949,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Spotify", - "group": "oauth2", + "method": "updateDenyFreeEmailPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-spotify.md", + "demo": "project\/update-deny-free-email-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37570,46 +49984,36 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Set whether or not to block free email addresses during signup and email updates.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/stripe": { + "\/project\/policies\/membership-privacy": { "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", + "summary": "Update membership privacy policy", + "operationId": "projectUpdateMembershipPrivacyPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Stripe configuration.", + "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", "responses": { "200": { - "description": "OAuth2Stripe", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Stripe" + "$ref": "#\/components\/schemas\/project" } } } @@ -37617,15 +50021,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Stripe", - "group": "oauth2", + "method": "updateMembershipPrivacyPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-stripe.md", + "demo": "project\/update-membership-privacy-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37649,23 +50056,35 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "userId": { + "type": "boolean", + "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", + "x-example": false }, - "apiSecretKey": { - "type": "string", - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", - "x-example": "<API_SECRET_KEY>", - "x-nullable": true + "userEmail": { + "type": "boolean", + "description": "Set to true if you want make user email visible to all team members, or false to hide it.", + "x-example": false }, - "enabled": { + "userPhone": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", + "x-example": false + }, + "userName": { + "type": "boolean", + "description": "Set to true if you want make user name visible to all team members, or false to hide it.", + "x-example": false + }, + "userMFA": { + "type": "boolean", + "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", + "x-example": false + }, + "userAccessedAt": { + "type": "boolean", + "description": "Set to true if you want make user last access time visible to all team members, or false to hide it.", + "x-example": false } } } @@ -37674,21 +50093,21 @@ } } }, - "\/project\/oauth2\/tradeshift": { + "\/project\/policies\/password-dictionary": { "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", + "summary": "Update password dictionary policy", + "operationId": "projectUpdatePasswordDictionaryPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Tradeshift configuration.", + "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", "responses": { "200": { - "description": "OAuth2Tradeshift", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + "$ref": "#\/components\/schemas\/project" } } } @@ -37696,15 +50115,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Tradeshift", - "group": "oauth2", + "method": "updatePasswordDictionaryPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-tradeshift.md", + "demo": "project\/update-password-dictionary-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37728,46 +50150,36 @@ "schema": { "type": "object", "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/tradeshiftBox": { + "\/project\/policies\/password-history": { "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "summary": "Update password history policy", + "operationId": "projectUpdatePasswordHistoryPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", "responses": { "200": { - "description": "OAuth2Tradeshift", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + "$ref": "#\/components\/schemas\/project" } } } @@ -37775,15 +50187,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2TradeshiftSandbox", - "group": "oauth2", + "method": "updatePasswordHistoryPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "demo": "project\/update-password-history-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37807,46 +50222,38 @@ "schema": { "type": "object", "properties": { - "oauth2ClientId": { - "type": "string", - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", - "x-example": "<OAUTH2_CLIENT_ID>", - "x-nullable": true - }, - "oauth2ClientSecret": { - "type": "string", - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", - "x-example": "<OAUTH2_CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, + "total": { + "type": "integer", + "description": "Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.", + "x-example": 1, + "format": "int32", "x-nullable": true } - } + }, + "required": [ + "total" + ] } } } } } }, - "\/project\/oauth2\/twitch": { + "\/project\/policies\/password-personal-data": { "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", + "summary": "Update password personal data policy", + "operationId": "projectUpdatePasswordPersonalDataPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Twitch configuration.", + "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", "responses": { "200": { - "description": "OAuth2Twitch", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Twitch" + "$ref": "#\/components\/schemas\/project" } } } @@ -37854,15 +50261,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Twitch", - "group": "oauth2", + "method": "updatePasswordPersonalDataPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-twitch.md", + "demo": "project\/update-password-personal-data-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37886,46 +50296,36 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/wordpress": { + "\/project\/policies\/password-strength": { "patch": { - "summary": "Update project OAuth2 WordPress", - "operationId": "projectUpdateOAuth2WordPress", + "summary": "Update password strength policy", + "operationId": "projectUpdatePasswordStrengthPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 WordPress configuration.", + "description": "Update the password strength requirements for users in the project.", "responses": { "200": { - "description": "OAuth2WordPress", + "description": "Policy Password Strength", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2WordPress" + "$ref": "#\/components\/schemas\/policyPasswordStrength" } } } @@ -37933,15 +50333,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2WordPress", - "group": "oauth2", + "method": "updatePasswordStrengthPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-word-press.md", + "demo": "project\/update-password-strength-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -37965,23 +50368,31 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of WordPress OAuth2 app. For example: 130005", - "x-example": "<CLIENT_ID>", - "x-nullable": true + "min": { + "type": "integer", + "description": "Minimum password length. Value must be between 8 and 256. Default is 8.", + "x-example": 8, + "format": "int32" }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true + "uppercase": { + "type": "boolean", + "description": "Whether passwords must include at least one uppercase letter.", + "x-example": false }, - "enabled": { + "lowercase": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": false + }, + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": false + }, + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": false } } } @@ -37990,21 +50401,21 @@ } } }, - "\/project\/oauth2\/x": { + "\/project\/policies\/session-alert": { "patch": { - "summary": "Update project OAuth2 X", - "operationId": "projectUpdateOAuth2X", + "summary": "Update session alert policy", + "operationId": "projectUpdateSessionAlertPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 X configuration.", + "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", "responses": { "200": { - "description": "OAuth2X", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2X" + "$ref": "#\/components\/schemas\/project" } } } @@ -38012,15 +50423,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2X", - "group": "oauth2", + "method": "updateSessionAlertPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2x.md", + "demo": "project\/update-session-alert-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -38044,46 +50458,36 @@ "schema": { "type": "object", "properties": { - "customerKey": { - "type": "string", - "description": "'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT", - "x-example": "<CUSTOMER_KEY>", - "x-nullable": true - }, - "secretKey": { - "type": "string", - "description": "'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9", - "x-example": "<SECRET_KEY>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/yahoo": { + "\/project\/policies\/session-duration": { "patch": { - "summary": "Update project OAuth2 Yahoo", - "operationId": "projectUpdateOAuth2Yahoo", + "summary": "Update session duration policy", + "operationId": "projectUpdateSessionDurationPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Yahoo configuration.", + "description": "Update maximum duration how long sessions created within a project should stay active for.", "responses": { "200": { - "description": "OAuth2Yahoo", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" + "$ref": "#\/components\/schemas\/project" } } } @@ -38091,15 +50495,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Yahoo", - "group": "oauth2", + "method": "updateSessionDurationPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-yahoo.md", + "demo": "project\/update-session-duration-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -38123,46 +50530,37 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "duration": { + "type": "integer", + "description": "Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.", + "x-example": 60, + "format": "int32" } - } + }, + "required": [ + "duration" + ] } } } } } }, - "\/project\/oauth2\/yandex": { + "\/project\/policies\/session-invalidation": { "patch": { - "summary": "Update project OAuth2 Yandex", - "operationId": "projectUpdateOAuth2Yandex", + "summary": "Update session invalidation policy", + "operationId": "projectUpdateSessionInvalidationPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Yandex configuration.", + "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", "responses": { "200": { - "description": "OAuth2Yandex", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Yandex" + "$ref": "#\/components\/schemas\/project" } } } @@ -38170,15 +50568,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Yandex", - "group": "oauth2", + "method": "updateSessionInvalidationPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-yandex.md", + "demo": "project\/update-session-invalidation-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -38202,46 +50603,36 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, "enabled": { "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "x-example": false } - } + }, + "required": [ + "enabled" + ] } } } } } }, - "\/project\/oauth2\/zoho": { + "\/project\/policies\/session-limit": { "patch": { - "summary": "Update project OAuth2 Zoho", - "operationId": "projectUpdateOAuth2Zoho", + "summary": "Update session limit policy", + "operationId": "projectUpdateSessionLimitPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Zoho configuration.", + "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", "responses": { "200": { - "description": "OAuth2Zoho", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoho" + "$ref": "#\/components\/schemas\/project" } } } @@ -38249,15 +50640,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Zoho", - "group": "oauth2", + "method": "updateSessionLimitPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-zoho.md", + "demo": "project\/update-session-limit-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -38281,46 +50675,37 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, - "x-nullable": true + "total": { + "type": "integer", + "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 100.", + "x-example": 1, + "format": "int32" } - } + }, + "required": [ + "total" + ] } } } } } }, - "\/project\/oauth2\/zoom": { + "\/project\/policies\/user-limit": { "patch": { - "summary": "Update project OAuth2 Zoom", - "operationId": "projectUpdateOAuth2Zoom", + "summary": "Update user limit policy", + "operationId": "projectUpdateUserLimitPolicy", "tags": [ "project" ], - "description": "Update the project OAuth2 Zoom configuration.", + "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", "responses": { "200": { - "description": "OAuth2Zoom", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Zoom" + "$ref": "#\/components\/schemas\/project" } } } @@ -38328,15 +50713,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateOAuth2Zoom", - "group": "oauth2", + "method": "updateUserLimitPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/update-o-auth-2-zoom.md", + "demo": "project\/update-user-limit-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.write", + "scope": [ + "policies.write", + "project.policies.write" + ], "platforms": [ "console", "server" @@ -38360,212 +50748,98 @@ "schema": { "type": "object", "properties": { - "clientId": { - "type": "string", - "description": "'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ", - "x-example": "<CLIENT_ID>", - "x-nullable": true - }, - "clientSecret": { - "type": "string", - "description": "'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON", - "x-example": "<CLIENT_SECRET>", - "x-nullable": true - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", - "x-example": false, + "total": { + "type": "integer", + "description": "Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.", + "x-example": 0, + "format": "int32", "x-nullable": true } - } + }, + "required": [ + "total" + ] } } } } } }, - "\/project\/oauth2\/{providerId}": { + "\/project\/policies\/{policyId}": { "get": { - "summary": "Get project OAuth2 provider", - "operationId": "projectGetOAuth2Provider", + "summary": "Get project policy", + "operationId": "projectGetPolicy", "tags": [ "project" ], - "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", + "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", "responses": { "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft", + "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Strength, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy, or Policy Deny Aliased Email, or Policy Deny Disposable Email, or Policy Deny Free Email, or Policy Deny Corporate Email", "content": { "application\/json": { "schema": { "oneOf": [ { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" + "$ref": "#\/components\/schemas\/policyPasswordDictionary" }, { - "$ref": "#\/components\/schemas\/oAuth2Facebook" + "$ref": "#\/components\/schemas\/policyPasswordHistory" }, { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + "$ref": "#\/components\/schemas\/policyPasswordStrength" }, { - "$ref": "#\/components\/schemas\/oAuth2Paypal" + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" }, { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" + "$ref": "#\/components\/schemas\/policySessionAlert" }, { - "$ref": "#\/components\/schemas\/oAuth2Authentik" + "$ref": "#\/components\/schemas\/policySessionDuration" }, { - "$ref": "#\/components\/schemas\/oAuth2Auth0" + "$ref": "#\/components\/schemas\/policySessionInvalidation" }, { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + "$ref": "#\/components\/schemas\/policySessionLimit" }, { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" + "$ref": "#\/components\/schemas\/policyUserLimit" }, { - "$ref": "#\/components\/schemas\/oAuth2Oidc" + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" }, { - "$ref": "#\/components\/schemas\/oAuth2Apple" + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" }, { - "$ref": "#\/components\/schemas\/oAuth2Okta" + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" }, { - "$ref": "#\/components\/schemas\/oAuth2Kick" + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" }, { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" + "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" } ], "discriminator": { "propertyName": "$id", "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-strength": "#\/components\/schemas\/policyPasswordStrength", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", + "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" } } } @@ -38575,15 +50849,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "getOAuth2Provider", - "group": "oauth2", + "method": "getPolicy", + "group": "policies", "cookies": false, "type": "", - "demo": "project\/get-o-auth-2-provider.md", + "demo": "project\/get-policy.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "oauth2.read", + "scope": [ + "policies.read", + "project.policies.read" + ], "platforms": [ "console", "server" @@ -38603,102 +50880,44 @@ ], "parameters": [ { - "name": "providerId", - "description": "OAuth2 provider key. For example: github, google, apple.", + "name": "policyId", + "description": "Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.", "required": true, "schema": { "type": "string", - "x-example": "amazon", + "x-example": "password-dictionary", "enum": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" + "password-dictionary", + "password-history", + "password-strength", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email", + "deny-corporate-email" ], - "x-enum-name": "ProjectOAuthProviderId", + "x-enum-name": "ProjectPolicyId", "x-enum-keys": [ - "amazon", - "apple", - "auth0", - "authentik", - "autodesk", - "bitbucket", - "bitly", - "box", - "dailymotion", - "discord", - "disqus", - "dropbox", - "etsy", - "facebook", - "figma", - "fusionauth", - "github", - "gitlab", - "google", - "keycloak", - "kick", - "linkedin", - "microsoft", - "notion", - "oidc", - "okta", - "paypal", - "paypalSandbox", - "podio", - "salesforce", - "slack", - "spotify", - "stripe", - "tradeshift", - "tradeshiftBox", - "twitch", - "wordpress", - "x", - "yahoo", - "yammer", - "yandex", - "zoho", - "zoom" + "password-dictionary", + "password-history", + "password-strength", + "password-personal-data", + "session-alert", + "session-duration", + "session-invalidation", + "session-limit", + "user-limit", + "membership-privacy", + "deny-aliased-email", + "deny-disposable-email", + "deny-free-email", + "deny-corporate-email" ] }, "in": "path" @@ -38706,21 +50925,21 @@ ] } }, - "\/project\/platforms": { - "get": { - "summary": "List project platforms", - "operationId": "projectListPlatforms", + "\/project\/protocols\/{protocolId}": { + "patch": { + "summary": "Update project protocol", + "operationId": "projectUpdateProtocol", "tags": [ "project" ], - "description": "Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.", + "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", "responses": { "200": { - "description": "Platforms List", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformList" + "$ref": "#\/components\/schemas\/project" } } } @@ -38728,15 +50947,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listPlatforms", - "group": "platforms", + "method": "updateProtocol", + "group": null, "cookies": false, "type": "", - "demo": "project\/list-platforms.md", + "demo": "project\/update-protocol.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", + "scope": "project.write", "platforms": [ "console", "server" @@ -38756,47 +50975,63 @@ ], "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: type, name, hostname, bundleIdentifier, applicationId, packageIdentifierName, packageName", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "protocolId", + "description": "Protocol name. Can be one of: rest, graphql, websocket", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "rest", + "enum": [ + "rest", + "graphql", + "websocket" + ], + "x-enum-name": "ProjectProtocolId", + "x-enum-keys": [ + "rest", + "graphql", + "websocket" + ] }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Protocol status.", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } } }, - "\/project\/platforms\/android": { - "post": { - "summary": "Create project Android platform", - "operationId": "projectCreateAndroidPlatform", + "\/project\/services\/{serviceId}": { + "patch": { + "summary": "Update project service", + "operationId": "projectUpdateService", "tags": [ "project" ], - "description": "Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.", + "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", "responses": { - "201": { - "description": "Platform Android", + "200": { + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" + "$ref": "#\/components\/schemas\/project" } } } @@ -38804,15 +51039,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createAndroidPlatform", - "group": "platforms", + "method": "updateService", + "group": null, "cookies": false, "type": "", - "demo": "project\/create-android-platform.md", + "demo": "project\/update-service.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -38830,35 +51065,75 @@ "Key": [] } ], + "parameters": [ + { + "name": "serviceId", + "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2", + "required": true, + "schema": { + "type": "string", + "x-example": "account", + "enum": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging", + "advisor", + "oauth2" + ], + "x-enum-name": "ProjectServiceId", + "x-enum-keys": [ + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging", + "advisor", + "oauth2" + ] + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "applicationId": { - "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" + "enabled": { + "type": "boolean", + "description": "Service status.", + "x-example": false } }, "required": [ - "platformId", - "name", - "applicationId" + "enabled" ] } } @@ -38866,21 +51141,21 @@ } } }, - "\/project\/platforms\/android\/{platformId}": { - "put": { - "summary": "Update project Android platform", - "operationId": "projectUpdateAndroidPlatform", + "\/project\/smtp": { + "patch": { + "summary": "Update project SMTP configuration", + "operationId": "projectUpdateSMTP", "tags": [ "project" ], - "description": "Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.", + "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", "responses": { "200": { - "description": "Platform Android", + "description": "Project", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformAndroid" + "$ref": "#\/components\/schemas\/project" } } } @@ -38888,15 +51163,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateAndroidPlatform", - "group": "platforms", + "method": "updateSMTP", + "group": "smtp", "cookies": false, "type": "", - "demo": "project\/update-android-platform.md", + "demo": "project\/update-smtp.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -38914,76 +51189,116 @@ "Key": [] } ], - "parameters": [ - { - "name": "platformId", - "description": "Platform ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "name": { + "host": { "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "SMTP server hostname (domain)", + "x-example": null, + "x-nullable": true }, - "applicationId": { + "port": { + "type": "integer", + "description": "SMTP server port", + "x-example": null, + "format": "int32", + "x-nullable": true + }, + "username": { "type": "string", - "description": "Android application ID. Max length: 256 chars.", - "x-example": "<APPLICATION_ID>" + "description": "SMTP server username. Pass an empty string to clear a previously set value.", + "x-example": "<USERNAME>", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "SMTP server password. Pass an empty string to clear a previously set value. This property is stored securely and cannot be read in future (write-only).", + "x-example": "password", + "format": "password", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email address shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "senderName": { + "type": "string", + "description": "Name shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Email used when user replies to the email. Pass an empty string to clear a previously set value.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Name used when user replies to the email. Pass an empty string to clear a previously set value.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true + }, + "secure": { + "type": "string", + "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", + "x-example": "tls", + "enum": [ + "tls", + "ssl" + ], + "x-enum-name": "ProjectSMTPSecure", + "x-enum-keys": [ + "tls", + "ssl" + ], + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", + "x-example": false, + "x-nullable": true } - }, - "required": [ - "name", - "applicationId" - ] + } } } } } } }, - "\/project\/platforms\/apple": { + "\/project\/smtp\/tests": { "post": { - "summary": "Create project Apple platform", - "operationId": "projectCreateApplePlatform", + "summary": "Create project SMTP test", + "operationId": "projectCreateSMTPTest", "tags": [ "project" ], - "description": "Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.", + "description": "Send a test email to verify SMTP configuration. ", "responses": { - "201": { - "description": "Platform Apple", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformApple" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createApplePlatform", - "group": "platforms", + "method": "createSMTPTest", + "group": "smtp", "cookies": false, "type": "", - "demo": "project\/create-apple-platform.md", + "demo": "project\/create-smtp-test.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -39007,29 +51322,17 @@ "schema": { "type": "object", "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "emails": { + "type": "array", + "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "x-example": null, + "items": { + "type": "string" } - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" } }, "required": [ - "platformId", - "name", - "bundleIdentifier" + "emails" ] } } @@ -39037,21 +51340,21 @@ } } }, - "\/project\/platforms\/apple\/{platformId}": { - "put": { - "summary": "Update project Apple platform", - "operationId": "projectUpdateApplePlatform", + "\/project\/templates\/email": { + "get": { + "summary": "List project email templates", + "operationId": "projectListEmailTemplates", "tags": [ "project" ], - "description": "Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.", + "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", "responses": { "200": { - "description": "Platform Apple", + "description": "Email Templates List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformApple" + "$ref": "#\/components\/schemas\/emailTemplateList" } } } @@ -39059,15 +51362,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateApplePlatform", - "group": "platforms", + "method": "listEmailTemplates", + "group": "templates", "cookies": false, "type": "", - "demo": "project\/update-apple-platform.md", + "demo": "project\/list-email-templates.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "templates.read", "platforms": [ "console", "server" @@ -39087,58 +51390,45 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", - "required": true, + "name": "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": "string", - "x-example": "<PLATFORM_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "bundleIdentifier": { - "type": "string", - "description": "Apple bundle identifier. Max length: 256 chars.", - "x-example": "<BUNDLE_IDENTIFIER>" - } - }, - "required": [ - "name", - "bundleIdentifier" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/project\/platforms\/linux": { - "post": { - "summary": "Create project Linux platform", - "operationId": "projectCreateLinuxPlatform", + ] + }, + "patch": { + "summary": "Update project email template", + "operationId": "projectUpdateEmailTemplate", "tags": [ "project" ], - "description": "Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.", + "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", "responses": { - "201": { - "description": "Platform Linux", + "200": { + "description": "EmailTemplate", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformLinux" + "$ref": "#\/components\/schemas\/emailTemplate" } } } @@ -39146,15 +51436,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createLinuxPlatform", - "group": "platforms", + "method": "updateEmailTemplate", + "group": "templates", "cookies": false, "type": "", - "demo": "project\/create-linux-platform.md", + "demo": "project\/update-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "templates.write", "platforms": [ "console", "server" @@ -39178,29 +51468,343 @@ "schema": { "type": "object", "properties": { - "platformId": { + "templateId": { + "type": "string", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "ProjectEmailTemplateId", + "x-enum-keys": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ] + }, + "locale": { + "type": "string", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "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": "ProjectEmailTemplateLocale", + "x-enum-keys": [ + "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" + ] + }, + "subject": { "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Subject of the email template. Can be up to 255 characters.", + "x-example": "<SUBJECT>", + "x-nullable": true }, - "name": { + "message": { "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", + "x-example": "<MESSAGE>", + "x-nullable": true }, - "packageName": { + "senderName": { "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" + "description": "Name of the email sender.", + "x-example": "<SENDER_NAME>", + "x-nullable": true + }, + "senderEmail": { + "type": "string", + "description": "Email of the sender. Pass an empty string to clear a previously set value.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToEmail": { + "type": "string", + "description": "Reply to email. Pass an empty string to clear a previously set value.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "replyToName": { + "type": "string", + "description": "Reply to name.", + "x-example": "<REPLY_TO_NAME>", + "x-nullable": true } }, "required": [ - "platformId", - "name", - "packageName" + "templateId" ] } } @@ -39208,21 +51812,21 @@ } } }, - "\/project\/platforms\/linux\/{platformId}": { - "put": { - "summary": "Update project Linux platform", - "operationId": "projectUpdateLinuxPlatform", + "\/project\/templates\/email\/{templateId}": { + "get": { + "summary": "Get project email template", + "operationId": "projectGetEmailTemplate", "tags": [ "project" ], - "description": "Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.", + "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", "responses": { "200": { - "description": "Platform Linux", + "description": "EmailTemplate", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformLinux" + "$ref": "#\/components\/schemas\/emailTemplate" } } } @@ -39230,15 +51834,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLinuxPlatform", - "group": "platforms", + "method": "getEmailTemplate", + "group": "templates", "cookies": false, "type": "", - "demo": "project\/update-linux-platform.md", + "demo": "project\/get-email-template.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "templates.read", "platforms": [ "console", "server" @@ -39258,142 +51862,329 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", + "name": "templateId", + "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", "required": true, "schema": { "type": "string", - "x-example": "<PLATFORM_ID>" + "x-example": "verification", + "enum": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ], + "x-enum-name": "ProjectEmailTemplateId", + "x-enum-keys": [ + "verification", + "magicSession", + "recovery", + "invitation", + "mfaChallenge", + "sessionAlert", + "otpSession" + ] }, "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageName": { - "type": "string", - "description": "Linux package name. Max length: 256 chars.", - "x-example": "<PACKAGE_NAME>" - } - }, - "required": [ - "name", - "packageName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/web": { - "post": { - "summary": "Create project web platform", - "operationId": "projectCreateWebPlatform", - "tags": [ - "project" - ], - "description": "Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.", - "responses": { - "201": { - "description": "Platform Web", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/platformWeb" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createWebPlatform", - "group": "platforms", - "cookies": false, - "type": "", - "demo": "project\/create-web-platform.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ + }, { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "platformId", - "name", - "hostname" - ] - } - } + "name": "locale", + "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "required": false, + "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": "ProjectEmailTemplateLocale", + "x-enum-keys": [ + "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" + ] + }, + "in": "query" } - } + ] } }, - "\/project\/platforms\/web\/{platformId}": { - "put": { - "summary": "Update project web platform", - "operationId": "projectUpdateWebPlatform", + "\/project\/variables": { + "get": { + "summary": "List project variables", + "operationId": "projectListVariables", "tags": [ "project" ], - "description": "Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.", + "description": "Get a list of all project environment variables.", "responses": { "200": { - "description": "Platform Web", + "description": "Variables List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformWeb" + "$ref": "#\/components\/schemas\/variableList" } } } @@ -39401,15 +52192,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateWebPlatform", - "group": "platforms", + "method": "listVariables", + "group": "variables", "cookies": false, "type": "", - "demo": "project\/update-web-platform.md", + "demo": "project\/list-variables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.read", "platforms": [ "console", "server" @@ -39429,58 +52220,45 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, resourceType, resourceId, secret", + "required": false, "schema": { - "type": "string", - "x-example": "<PLATFORM_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "hostname": { - "type": "string", - "description": "Platform web hostname. Max length: 256 chars.", - "x-example": "app.example.com" - } - }, - "required": [ - "name", - "hostname" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/project\/platforms\/windows": { + ] + }, "post": { - "summary": "Create project Windows platform", - "operationId": "projectCreateWindowsPlatform", + "summary": "Create project variable", + "operationId": "projectCreateVariable", "tags": [ "project" ], - "description": "Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.", + "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", "responses": { "201": { - "description": "Platform Windows", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformWindows" + "$ref": "#\/components\/schemas\/variable" } } } @@ -39488,15 +52266,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createWindowsPlatform", - "group": "platforms", + "method": "createVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "project\/create-windows-platform.md", + "demo": "project\/create-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -39520,29 +52298,35 @@ "schema": { "type": "object", "properties": { - "platformId": { + "variableId": { "type": "string", - "description": "Platform ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<PLATFORM_ID>", + "description": "Variable 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": "<VARIABLE_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, - "name": { + "key": { "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Variable key. Max length: 255 chars.", + "x-example": "<KEY>" }, - "packageIdentifierName": { + "value": { "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "default": true, + "x-example": false } }, "required": [ - "platformId", - "name", - "packageIdentifierName" + "variableId", + "key", + "value" ] } } @@ -39550,21 +52334,21 @@ } } }, - "\/project\/platforms\/windows\/{platformId}": { - "put": { - "summary": "Update project Windows platform", - "operationId": "projectUpdateWindowsPlatform", + "\/project\/variables\/{variableId}": { + "get": { + "summary": "Get project variable", + "operationId": "projectGetVariable", "tags": [ "project" ], - "description": "Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.", + "description": "Get a variable by its unique ID. ", "responses": { "200": { - "description": "Platform Windows", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/platformWindows" + "$ref": "#\/components\/schemas\/variable" } } } @@ -39572,15 +52356,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateWindowsPlatform", - "group": "platforms", + "method": "getVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "project\/update-windows-platform.md", + "demo": "project\/get-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.read", "platforms": [ "console", "server" @@ -39600,84 +52384,31 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<PLATFORM_ID>" + "x-example": "<VARIABLE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name. Max length: 256 chars.", - "x-example": "<PACKAGE_IDENTIFIER_NAME>" - } - }, - "required": [ - "name", - "packageIdentifierName" - ] - } - } - } - } - } - }, - "\/project\/platforms\/{platformId}": { - "get": { - "summary": "Get project platform", - "operationId": "projectGetPlatform", + ] + }, + "put": { + "summary": "Update project variable", + "operationId": "projectUpdateVariable", "tags": [ "project" ], - "description": "Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.", + "description": "Update variable by its unique ID.", "responses": { "200": { - "description": "Platform Web, or Platform Apple, or Platform Android, or Platform Windows, or Platform Linux", + "description": "Variable", "content": { "application\/json": { "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } + "$ref": "#\/components\/schemas\/variable" } } } @@ -39685,15 +52416,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPlatform", - "group": "platforms", + "method": "updateVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "project\/get-platform.md", + "demo": "project\/update-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.read", + "scope": "project.write", "platforms": [ "console", "server" @@ -39713,24 +52444,53 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<PLATFORM_ID>" + "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>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } }, "delete": { - "summary": "Delete project platform", - "operationId": "projectDeletePlatform", + "summary": "Delete project variable", + "operationId": "projectDeleteVariable", "tags": [ "project" ], - "description": "Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.", + "description": "Delete a variable by its unique ID. ", "responses": { "204": { "description": "No content" @@ -39738,15 +52498,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "deletePlatform", - "group": "platforms", + "method": "deleteVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "project\/delete-platform.md", + "demo": "project\/delete-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "platforms.write", + "scope": "project.write", "platforms": [ "console", "server" @@ -39766,33 +52526,33 @@ ], "parameters": [ { - "name": "platformId", - "description": "Platform ID.", + "name": "variableId", + "description": "Variable unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<PLATFORM_ID>" + "x-example": "<VARIABLE_ID>" }, "in": "path" } ] } }, - "\/project\/policies": { + "\/proxy\/rules": { "get": { - "summary": "List project policies", - "operationId": "projectListPolicies", + "summary": "List rules", + "operationId": "proxyListRules", "tags": [ - "project" + "proxy" ], - "description": "Get a list of all project policies and their current configuration.", + "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", "responses": { "200": { - "description": "Policies List", + "description": "Rule List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/policyList" + "$ref": "#\/components\/schemas\/proxyRuleList" } } } @@ -39800,18 +52560,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listPolicies", - "group": "policies", + "method": "listRules", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/list-policies.md", + "demo": "proxy\/list-rules.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.read", - "project.policies.read" - ], + "scope": "rules.read", "platforms": [ "console", "server" @@ -39832,7 +52589,7 @@ "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", + "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, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", "required": false, "schema": { "type": "array", @@ -39857,21 +52614,21 @@ ] } }, - "\/project\/policies\/deny-aliased-email": { - "patch": { - "summary": "Update deny aliased email policy", - "operationId": "projectUpdateDenyAliasedEmailPolicy", + "\/proxy\/rules\/api": { + "post": { + "summary": "Create API rule", + "operationId": "proxyCreateAPIRule", "tags": [ - "project" + "proxy" ], - "description": "Configures if aliased emails such as subaddresses and emails with suffixes are denied during new users sign-ups and email updates.", + "description": "Create a new proxy rule for serving Appwrite's API on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", "responses": { - "200": { - "description": "Project", + "201": { + "description": "Rule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/proxyRule" } } } @@ -39879,18 +52636,165 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDenyAliasedEmailPolicy", - "group": "policies", + "method": "createAPIRule", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/update-deny-aliased-email-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" + "demo": "proxy\/create-api-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + } + }, + "required": [ + "domain" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/function": { + "post": { + "summary": "Create function rule", + "operationId": "proxyCreateFunctionRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for executing Appwrite Function on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createFunctionRule", + "group": "rules", + "cookies": false, + "type": "", + "demo": "proxy\/create-function-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", + "platforms": [ + "console", + "server" ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "functionId": { + "type": "string", + "description": "ID of function to be executed.", + "x-example": "<FUNCTION_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "default": "", + "x-example": "<BRANCH>" + } + }, + "required": [ + "domain", + "functionId" + ] + } + } + } + } + } + }, + "\/proxy\/rules\/redirect": { + "post": { + "summary": "Create redirect rule", + "operationId": "proxyCreateRedirectRule", + "tags": [ + "proxy" + ], + "description": "Create a new proxy rule for to redirect from custom domain to another domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "responses": { + "201": { + "description": "Rule", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/proxyRule" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRedirectRule", + "group": "rules", + "cookies": false, + "type": "", + "demo": "proxy\/create-redirect-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", "platforms": [ "console", "server" @@ -39914,14 +52818,61 @@ "schema": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to block aliased emails during signup and email updates.", - "x-example": false + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "url": { + "type": "string", + "description": "Target URL of redirection", + "x-example": "https:\/\/example.com", + "format": "url" + }, + "statusCode": { + "type": "string", + "description": "Status code of redirection", + "x-example": "301", + "enum": [ + "301", + "302", + "307", + "308" + ], + "x-enum-name": "StatusCode", + "x-enum-keys": [ + "MovedPermanently", + "Found", + "TemporaryRedirect", + "PermanentRedirect" + ] + }, + "resourceId": { + "type": "string", + "description": "ID of parent resource.", + "x-example": "<RESOURCE_ID>" + }, + "resourceType": { + "type": "string", + "description": "Type of parent resource.", + "x-example": "site", + "enum": [ + "site", + "function" + ], + "x-enum-name": "ProxyResourceType", + "x-enum-keys": [ + "Site", + "Function" + ] } }, "required": [ - "enabled" + "domain", + "url", + "statusCode", + "resourceId", + "resourceType" ] } } @@ -39929,21 +52880,21 @@ } } }, - "\/project\/policies\/deny-corporate-email": { - "patch": { - "summary": "Update deny non-corporate email policy", - "operationId": "projectUpdateDenyCorporateEmailPolicy", + "\/proxy\/rules\/site": { + "post": { + "summary": "Create site rule", + "operationId": "proxyCreateSiteRule", "tags": [ - "project" + "proxy" ], - "description": "Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates.", + "description": "Create a new proxy rule for serving Appwrite Site on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", "responses": { - "200": { - "description": "Project", + "201": { + "description": "Rule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/proxyRule" } } } @@ -39951,18 +52902,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDenyCorporateEmailPolicy", - "group": "policies", + "method": "createSiteRule", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/update-deny-corporate-email-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "demo": "proxy\/create-site-rule.md", + "rate-limit": 10, + "rate-time": 60, + "rate-key": "userId:{userId}, url:{url}", + "scope": "rules.write", "platforms": [ "console", "server" @@ -39986,14 +52934,26 @@ "schema": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to restrict sign-ups and email updates to corporate email addresses only.", - "x-example": false + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": null + }, + "siteId": { + "type": "string", + "description": "ID of site to be executed.", + "x-example": "<SITE_ID>" + }, + "branch": { + "type": "string", + "description": "Name of VCS branch to deploy changes automatically", + "default": "", + "x-example": "<BRANCH>" } }, "required": [ - "enabled" + "domain", + "siteId" ] } } @@ -40001,21 +52961,21 @@ } } }, - "\/project\/policies\/deny-disposable-email": { - "patch": { - "summary": "Update deny disposable email policy", - "operationId": "projectUpdateDenyDisposableEmailPolicy", + "\/proxy\/rules\/{ruleId}": { + "get": { + "summary": "Get rule", + "operationId": "proxyGetRule", "tags": [ - "project" + "proxy" ], - "description": "Configures if disposable emails from known temporary domains are denied during new users sign-ups and email updates.", + "description": "Get a proxy rule by its unique ID.", "responses": { "200": { - "description": "Project", + "description": "Rule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/proxyRule" } } } @@ -40023,18 +52983,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDenyDisposableEmailPolicy", - "group": "policies", + "method": "getRule", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/update-deny-disposable-email-policy.md", + "demo": "proxy\/get-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "rules.read", "platforms": [ "console", "server" @@ -40052,61 +53009,42 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to block disposable email addresses during signup and email updates.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" } - } - } - }, - "\/project\/policies\/deny-free-email": { - "patch": { - "summary": "Update deny free email policy", - "operationId": "projectUpdateDenyFreeEmailPolicy", + ] + }, + "delete": { + "summary": "Delete rule", + "operationId": "proxyDeleteRule", "tags": [ - "project" + "proxy" ], - "description": "Configures if emails from free providers such as Gmail or Yahoo are denied during new users sign-ups and email updates.", + "description": "Delete a proxy rule by its unique ID.", "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateDenyFreeEmailPolicy", - "group": "policies", + "method": "deleteRule", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/update-deny-free-email-policy.md", + "demo": "proxy\/delete-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "rules.write", "platforms": [ "console", "server" @@ -40124,42 +53062,35 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Set whether or not to block free email addresses during signup and email updates.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" } - } + ] } }, - "\/project\/policies\/membership-privacy": { + "\/proxy\/rules\/{ruleId}\/status": { "patch": { - "summary": "Update membership privacy policy", - "operationId": "projectUpdateMembershipPrivacyPolicy", + "summary": "Update rule status", + "operationId": "proxyUpdateRuleStatus", "tags": [ - "project" + "proxy" ], - "description": "Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..", + "description": "If not succeeded yet, retry verification process of a proxy rule domain. This endpoint triggers domain verification by checking DNS records. If verification is successful, a TLS certificate will be automatically provisioned for the domain asynchronously in the background.", "responses": { "200": { - "description": "Project", + "description": "Rule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/proxyRule" } } } @@ -40167,18 +53098,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMembershipPrivacyPolicy", - "group": "policies", + "method": "updateRuleStatus", + "group": "rules", "cookies": false, "type": "", - "demo": "project\/update-membership-privacy-policy.md", + "demo": "proxy\/update-rule-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "rules.write", "platforms": [ "console", "server" @@ -40196,64 +53124,35 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "boolean", - "description": "Set to true if you want make user ID visible to all team members, or false to hide it.", - "x-example": false - }, - "userEmail": { - "type": "boolean", - "description": "Set to true if you want make user email visible to all team members, or false to hide it.", - "x-example": false - }, - "userPhone": { - "type": "boolean", - "description": "Set to true if you want make user phone number visible to all team members, or false to hide it.", - "x-example": false - }, - "userName": { - "type": "boolean", - "description": "Set to true if you want make user name visible to all team members, or false to hide it.", - "x-example": false - }, - "userMFA": { - "type": "boolean", - "description": "Set to true if you want make user MFA status visible to all team members, or false to hide it.", - "x-example": false - }, - "userAccessedAt": { - "type": "boolean", - "description": "Set to true if you want make user last access time visible to all team members, or false to hide it.", - "x-example": false - } - } - } - } + "parameters": [ + { + "name": "ruleId", + "description": "Rule ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<RULE_ID>" + }, + "in": "path" } - } + ] } }, - "\/project\/policies\/password-dictionary": { - "patch": { - "summary": "Update password dictionary policy", - "operationId": "projectUpdatePasswordDictionaryPolicy", + "\/reports": { + "get": { + "summary": "List reports", + "operationId": "advisorListReports", "tags": [ - "project" + "advisor" ], - "description": "Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.", + "description": "Get a list of all the project's analyzer reports. You can use the query params to filter your results.\n", "responses": { "200": { - "description": "Project", + "description": "Reports List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/reportList" } } } @@ -40261,24 +53160,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePasswordDictionaryPolicy", - "group": "policies", + "method": "listReports", + "group": "reports", "cookies": false, "type": "", - "demo": "project\/update-password-dictionary-policy.md", + "demo": "advisor\/list-reports.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "reports.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/list-reports.md", "auth": { "Project": [], "Key": [] @@ -40290,42 +53187,49 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "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: appId, type, targetType, target, analyzedAt", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/project\/policies\/password-history": { - "patch": { - "summary": "Update password history policy", - "operationId": "projectUpdatePasswordHistoryPolicy", + "\/reports\/{reportId}": { + "get": { + "summary": "Get report", + "operationId": "advisorGetReport", "tags": [ - "project" + "advisor" ], - "description": "Updates one of password strength policies. Based on total length configured, previous password hashes are stored, and users cannot choose a new password that is already stored in the passwird history list, when updating an user password, or setting new one through password recovery.\n\nKeep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.", + "description": "Get an analyzer report by its unique ID. The response includes the report's metadata and the nested insights it produced.\n", "responses": { "200": { - "description": "Project", + "description": "Report", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/report" } } } @@ -40333,24 +53237,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePasswordHistoryPolicy", - "group": "policies", + "method": "getReport", + "group": "reports", "cookies": false, "type": "", - "demo": "project\/update-password-history-policy.md", + "demo": "advisor\/get-report.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "reports.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/get-report.md", "auth": { "Project": [], "Key": [] @@ -40362,69 +53264,49 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } + "parameters": [ + { + "name": "reportId", + "description": "Report ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPORT_ID>" + }, + "in": "path" } - } - } - }, - "\/project\/policies\/password-personal-data": { - "patch": { - "summary": "Update password personal data policy", - "operationId": "projectUpdatePasswordPersonalDataPolicy", + ] + }, + "delete": { + "summary": "Delete report", + "operationId": "advisorDeleteReport", "tags": [ - "project" + "advisor" ], - "description": "Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number.", + "description": "Delete an analyzer report by its unique ID. Nested insights and CTA metadata are removed asynchronously by the deletes worker.\n", "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updatePasswordPersonalDataPolicy", - "group": "policies", + "method": "deleteReport", + "group": "reports", "cookies": false, "type": "", - "demo": "project\/update-password-personal-data-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "demo": "advisor\/delete-report.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "projectId:{projectId},userId:{userId}", + "scope": "reports.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/delete-report.md", "auth": { "Project": [], "Key": [] @@ -40436,42 +53318,35 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "parameters": [ + { + "name": "reportId", + "description": "Report ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPORT_ID>" + }, + "in": "path" } - } + ] } - }, - "\/project\/policies\/password-strength": { - "patch": { - "summary": "Update password strength policy", - "operationId": "projectUpdatePasswordStrengthPolicy", + }, + "\/reports\/{reportId}\/insights": { + "get": { + "summary": "List insights", + "operationId": "advisorListInsights", "tags": [ - "project" + "advisor" ], - "description": "Update the password strength requirements for users in the project.", + "description": "List the insights produced under a single analyzer report. You can use the query params to filter your results further.\n", "responses": { "200": { - "description": "Policy Password Strength", + "description": "Insights List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/policyPasswordStrength" + "$ref": "#\/components\/schemas\/insightList" } } } @@ -40479,24 +53354,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePasswordStrengthPolicy", - "group": "policies", + "method": "listInsights", + "group": "insights", "cookies": false, "type": "", - "demo": "project\/update-password-strength-policy.md", + "demo": "advisor\/list-insights.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "insights.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/list-insights.md", "auth": { "Project": [], "Key": [] @@ -40508,60 +53381,59 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "min": { - "type": "integer", - "description": "Minimum password length. Value must be between 8 and 256. Default is 8.", - "x-example": 8, - "format": "int32" - }, - "uppercase": { - "type": "boolean", - "description": "Whether passwords must include at least one uppercase letter.", - "x-example": false - }, - "lowercase": { - "type": "boolean", - "description": "Whether passwords must include at least one lowercase letter.", - "x-example": false - }, - "number": { - "type": "boolean", - "description": "Whether passwords must include at least one number.", - "x-example": false - }, - "symbols": { - "type": "boolean", - "description": "Whether passwords must include at least one symbol.", - "x-example": false - } - } - } - } + "parameters": [ + { + "name": "reportId", + "description": "Parent report ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPORT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/project\/policies\/session-alert": { - "patch": { - "summary": "Update session alert policy", - "operationId": "projectUpdateSessionAlertPolicy", + "\/reports\/{reportId}\/insights\/{insightId}": { + "get": { + "summary": "Get insight", + "operationId": "advisorGetInsight", "tags": [ - "project" + "advisor" ], - "description": "Updating this policy allows you to control if email alert is sent upon session creation. When enabled, and user signs into their account, they will be sent an email notification. There is an exception, the first session after a new sign up does not trigger an alert, even if the policy is enabled.", + "description": "Get an insight by its unique ID, scoped to its parent report.\n", "responses": { "200": { - "description": "Project", + "description": "Insight", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/insight" } } } @@ -40569,24 +53441,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSessionAlertPolicy", - "group": "policies", + "method": "getInsight", + "group": "insights", "cookies": false, "type": "", - "demo": "project\/update-session-alert-policy.md", + "demo": "advisor\/get-insight.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "insights.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/get-insight.md", "auth": { "Project": [], "Key": [] @@ -40598,42 +53468,45 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "parameters": [ + { + "name": "reportId", + "description": "Parent report ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<REPORT_ID>" + }, + "in": "path" + }, + { + "name": "insightId", + "description": "Insight ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<INSIGHT_ID>" + }, + "in": "path" } - } + ] } }, - "\/project\/policies\/session-duration": { - "patch": { - "summary": "Update session duration policy", - "operationId": "projectUpdateSessionDurationPolicy", + "\/sites": { + "get": { + "summary": "List sites", + "operationId": "sitesList", "tags": [ - "project" + "sites" ], - "description": "Update maximum duration how long sessions created within a project should stay active for.", + "description": "Get a list of all the project's sites. You can use the query params to filter your results.", "responses": { "200": { - "description": "Project", + "description": "Sites List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/siteList" } } } @@ -40641,18 +53514,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSessionDurationPolicy", - "group": "policies", + "method": "list", + "group": "sites", "cookies": false, "type": "", - "demo": "project\/update-session-duration-policy.md", + "demo": "sites\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "sites.read", "platforms": [ "console", "server" @@ -40670,43 +53540,58 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "description": "Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.", - "x-example": 5, - "format": "int32" - } - }, - "required": [ - "duration" - ] - } - } + "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, framework, deploymentId, buildCommand, installCommand, outputDirectory, 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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/project\/policies\/session-invalidation": { - "patch": { - "summary": "Update session invalidation policy", - "operationId": "projectUpdateSessionInvalidationPolicy", + ] + }, + "post": { + "summary": "Create site", + "operationId": "sitesCreate", "tags": [ - "project" + "sites" ], - "description": "Updating this policy allows you to control if existing sessions should be invalidated when a password of a user is changed. When enabled, and user changes their password, they will be logged out of all their devices.", + "description": "Create a new site.", "responses": { - "200": { - "description": "Project", + "201": { + "description": "Site", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/site" } } } @@ -40714,18 +53599,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSessionInvalidationPolicy", - "group": "policies", + "method": "create", + "group": "sites", "cookies": false, "type": "", - "demo": "project\/update-session-invalidation-policy.md", + "demo": "sites\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], + "scope": "sites.write", "platforms": [ "console", "server" @@ -40749,162 +53631,395 @@ "schema": { "type": "object", "properties": { + "siteId": { + "type": "string", + "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<SITE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "framework": { + "type": "string", + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": "Framework", + "x-enum-keys": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ] + }, "enabled": { "type": "boolean", - "description": "Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { + "type": "string", + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" + }, + "buildCommand": { + "type": "string", + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" + }, + "startCommand": { + "type": "string", + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" + }, + "buildRuntime": { + "type": "string", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", + "enum": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ], + "x-enum-name": "BuildRuntime", + "x-enum-keys": [ + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" + ], + "x-enum-name": "Adapter", + "x-enum-keys": [ + "static", + "ssr" + ] + }, + "installationId": { + "type": "string", + "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", + "default": "", + "x-example": "<INSTALLATION_ID>" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "providerRepositoryId": { + "type": "string", + "description": "Repository ID of the repo linked to the site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "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 site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/policies\/session-limit": { - "patch": { - "summary": "Update session limit policy", - "operationId": "projectUpdateSessionLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateSessionLimitPolicy", - "group": "policies", - "cookies": false, - "type": "", - "demo": "project\/update-session-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true - } - }, - "required": [ - "total" - ] - } - } - } - } - } - }, - "\/project\/policies\/user-limit": { - "patch": { - "summary": "Update user limit policy", - "operationId": "projectUpdateUserLimitPolicy", - "tags": [ - "project" - ], - "description": "Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.", - "responses": { - "200": { - "description": "Project", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/project" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateUserLimitPolicy", - "group": "policies", - "cookies": false, - "type": "", - "demo": "project\/update-user-limit-policy.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.write", - "project.policies.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "total": { + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { + "type": "array", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "default": {}, + "x-example": null + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { "type": "integer", - "description": "Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.", - "x-example": 1, - "format": "int32", - "x-nullable": true + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" } }, "required": [ - "total" + "siteId", + "name", + "framework", + "buildRuntime" ] } } @@ -40912,83 +54027,21 @@ } } }, - "\/project\/policies\/{policyId}": { + "\/sites\/frameworks": { "get": { - "summary": "Get project policy", - "operationId": "projectGetPolicy", + "summary": "List frameworks", + "operationId": "sitesListFrameworks", "tags": [ - "project" + "sites" ], - "description": "Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.", + "description": "Get a list of all frameworks that are currently available on the server instance.", "responses": { "200": { - "description": "Policy Password Dictionary, or Policy Password History, or Policy Password Strength, or Policy Password Personal Data, or Policy Session Alert, or Policy Session Duration, or Policy Session Invalidation, or Policy Session Limit, or Policy User Limit, or Policy Membership Privacy, or Policy Deny Aliased Email, or Policy Deny Disposable Email, or Policy Deny Free Email, or Policy Deny Corporate Email", + "description": "Frameworks List", "content": { "application\/json": { "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordHistory" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordStrength" - }, - { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" - }, - { - "$ref": "#\/components\/schemas\/policySessionAlert" - }, - { - "$ref": "#\/components\/schemas\/policySessionDuration" - }, - { - "$ref": "#\/components\/schemas\/policySessionInvalidation" - }, - { - "$ref": "#\/components\/schemas\/policySessionLimit" - }, - { - "$ref": "#\/components\/schemas\/policyUserLimit" - }, - { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" - }, - { - "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" - }, - { - "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" - }, - { - "$ref": "#\/components\/schemas\/policyDenyFreeEmail" - }, - { - "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-strength": "#\/components\/schemas\/policyPasswordStrength", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", - "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", - "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", - "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", - "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" - } - } + "$ref": "#\/components\/schemas\/frameworkList" } } } @@ -40996,18 +54049,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPolicy", - "group": "policies", + "method": "listFrameworks", + "group": "frameworks", "cookies": false, "type": "", - "demo": "project\/get-policy.md", + "demo": "sites\/list-frameworks.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "policies.read", - "project.policies.read" - ], + "scope": "public", "platforms": [ "console", "server" @@ -41024,69 +54074,24 @@ "Project": [], "Key": [] } - ], - "parameters": [ - { - "name": "policyId", - "description": "Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.", - "required": true, - "schema": { - "type": "string", - "x-example": "password-dictionary", - "enum": [ - "password-dictionary", - "password-history", - "password-strength", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy", - "deny-aliased-email", - "deny-disposable-email", - "deny-free-email", - "deny-corporate-email" - ], - "x-enum-name": "ProjectPolicyId", - "x-enum-keys": [ - "password-dictionary", - "password-history", - "password-strength", - "password-personal-data", - "session-alert", - "session-duration", - "session-invalidation", - "session-limit", - "user-limit", - "membership-privacy", - "deny-aliased-email", - "deny-disposable-email", - "deny-free-email", - "deny-corporate-email" - ] - }, - "in": "path" - } ] } }, - "\/project\/protocols\/{protocolId}": { - "patch": { - "summary": "Update project protocol", - "operationId": "projectUpdateProtocol", + "\/sites\/specifications": { + "get": { + "summary": "List specifications", + "operationId": "sitesListSpecifications", "tags": [ - "project" + "sites" ], - "description": "Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project. ", + "description": "List allowed site specifications for this instance.", "responses": { "200": { - "description": "Project", + "description": "Specifications List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/specificationList" } } } @@ -41094,18 +54099,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateProtocol", - "group": null, + "method": "listSpecifications", + "group": "frameworks", "cookies": false, "type": "", - "demo": "project\/update-protocol.md", + "demo": "sites\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.read", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, @@ -41122,79 +54127,50 @@ ], "parameters": [ { - "name": "protocolId", - "description": "Protocol name. Can be one of: rest, graphql, websocket", - "required": true, + "name": "type", + "description": "Specification type to list. Can be one of: runtimes, builds.", + "required": false, "schema": { "type": "string", - "x-example": "rest", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": "ProjectProtocolId", - "x-enum-keys": [ - "rest", - "graphql", - "websocket" - ] + "x-example": "runtimes", + "default": "runtimes" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } + "in": "query" } - } + ] } }, - "\/project\/services\/{serviceId}": { - "patch": { - "summary": "Update project service", - "operationId": "projectUpdateService", + "\/sites\/{siteId}": { + "get": { + "summary": "Get site", + "operationId": "sitesGet", "tags": [ - "project" + "sites" ], - "description": "Update properties of a specific service. Use this endpoint to enable or disable a service in your project. ", + "description": "Get a site by its unique ID.", "responses": { "200": { - "description": "Project", + "description": "Site", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/site" } } } } }, "deprecated": false, - "x-appwrite": { - "method": "updateService", - "group": null, + "x-appwrite": { + "method": "get", + "group": "sites", "cookies": false, "type": "", - "demo": "project\/update-service.md", + "demo": "sites\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.read", "platforms": [ "console", "server" @@ -41214,95 +54190,31 @@ ], "parameters": [ { - "name": "serviceId", - "description": "Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2", + "name": "siteId", + "description": "Site ID.", "required": true, "schema": { "type": "string", - "x-example": "account", - "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging", - "advisor", - "oauth2" - ], - "x-enum-name": "ProjectServiceId", - "x-enum-keys": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging", - "advisor", - "oauth2" - ] + "x-example": "<SITE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Service status.", - "x-example": false - } - }, - "required": [ - "enabled" - ] - } - } - } - } - } - }, - "\/project\/smtp": { - "patch": { - "summary": "Update project SMTP configuration", - "operationId": "projectUpdateSMTP", + ] + }, + "put": { + "summary": "Update site", + "operationId": "sitesUpdate", "tags": [ - "project" + "sites" ], - "description": "Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.", + "description": "Update site by its unique ID.", "responses": { "200": { - "description": "Project", + "description": "Site", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/project" + "$ref": "#\/components\/schemas\/site" } } } @@ -41310,15 +54222,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSMTP", - "group": "smtp", + "method": "update", + "group": "sites", "cookies": false, "type": "", - "demo": "project\/update-smtp.md", + "demo": "sites\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.write", "platforms": [ "console", "server" @@ -41336,262 +54248,432 @@ "Key": [] } ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "host": { + "name": { "type": "string", - "description": "SMTP server hostname (domain)", - "x-example": null, - "x-nullable": true - }, - "port": { - "type": "integer", - "description": "SMTP server port", - "x-example": null, - "format": "int32", - "x-nullable": true + "description": "Site name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "username": { + "framework": { "type": "string", - "description": "SMTP server username. Pass an empty string to clear a previously set value.", - "x-example": "<USERNAME>", - "x-nullable": true + "description": "Sites framework.", + "x-example": "analog", + "enum": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ], + "x-enum-name": "Framework", + "x-enum-keys": [ + "analog", + "angular", + "nextjs", + "react", + "nuxt", + "vue", + "sveltekit", + "astro", + "tanstack-start", + "remix", + "lynx", + "flutter", + "react-native", + "vite", + "other" + ] }, - "password": { - "type": "string", - "description": "SMTP server password. Pass an empty string to clear a previously set value. This property is stored securely and cannot be read in future (write-only).", - "x-example": "password", - "format": "password", - "x-nullable": true + "enabled": { + "type": "boolean", + "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", + "default": true, + "x-example": false }, - "senderEmail": { + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "default": true, + "x-example": false + }, + "timeout": { + "type": "integer", + "description": "Maximum request time in seconds.", + "default": 30, + "x-example": 1, + "format": "int32" + }, + "installCommand": { "type": "string", - "description": "Email address shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true + "description": "Install Command.", + "default": "", + "x-example": "<INSTALL_COMMAND>" }, - "senderName": { + "buildCommand": { "type": "string", - "description": "Name shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.", - "x-example": "<SENDER_NAME>", - "x-nullable": true + "description": "Build Command.", + "default": "", + "x-example": "<BUILD_COMMAND>" }, - "replyToEmail": { + "startCommand": { "type": "string", - "description": "Email used when user replies to the email. Pass an empty string to clear a previously set value.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true + "description": "Custom start command. Leave empty to use default.", + "default": "", + "x-example": "<START_COMMAND>" }, - "replyToName": { + "outputDirectory": { "type": "string", - "description": "Name used when user replies to the email. Pass an empty string to clear a previously set value.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true + "description": "Output Directory for site.", + "default": "", + "x-example": "<OUTPUT_DIRECTORY>" }, - "secure": { + "buildRuntime": { "type": "string", - "description": "Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.", - "x-example": "tls", + "description": "Runtime to use during build step.", + "x-example": "node-14.5", "enum": [ - "tls", - "ssl" + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" ], - "x-enum-name": "ProjectSMTPSecure", + "x-enum-name": "BuildRuntime", "x-enum-keys": [ - "tls", - "ssl" + "node-14.5", + "node-16.0", + "node-18.0", + "node-19.0", + "node-20.0", + "node-21.0", + "node-22", + "node-23", + "node-24", + "node-25", + "node-26", + "php-8.0", + "php-8.1", + "php-8.2", + "php-8.3", + "php-8.4", + "ruby-3.0", + "ruby-3.1", + "ruby-3.2", + "ruby-3.3", + "ruby-3.4", + "ruby-4.0", + "python-3.8", + "python-3.9", + "python-3.10", + "python-3.11", + "python-3.12", + "python-3.13", + "python-3.14", + "python-ml-3.11", + "python-ml-3.12", + "python-ml-3.13", + "deno-1.21", + "deno-1.24", + "deno-1.35", + "deno-1.40", + "deno-1.46", + "deno-2.0", + "deno-2.5", + "deno-2.6", + "dart-2.15", + "dart-2.16", + "dart-2.17", + "dart-2.18", + "dart-2.19", + "dart-3.0", + "dart-3.1", + "dart-3.3", + "dart-3.5", + "dart-3.8", + "dart-3.9", + "dart-3.10", + "dart-3.11", + "dart-3.12", + "dotnet-6.0", + "dotnet-7.0", + "dotnet-8.0", + "dotnet-10", + "java-8.0", + "java-11.0", + "java-17.0", + "java-18.0", + "java-21.0", + "java-22", + "java-25", + "swift-5.5", + "swift-5.8", + "swift-5.9", + "swift-5.10", + "swift-6.2", + "kotlin-1.6", + "kotlin-1.8", + "kotlin-1.9", + "kotlin-2.0", + "kotlin-2.3", + "cpp-17", + "cpp-20", + "bun-1.0", + "bun-1.1", + "bun-1.2", + "bun-1.3", + "go-1.23", + "go-1.24", + "go-1.25", + "go-1.26", + "rust-1.83", + "static-1", + "flutter-3.24", + "flutter-3.27", + "flutter-3.29", + "flutter-3.32", + "flutter-3.35", + "flutter-3.38", + "flutter-3.41", + "flutter-3.44" + ] + }, + "adapter": { + "type": "string", + "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", + "x-example": "static", + "enum": [ + "static", + "ssr" ], - "x-nullable": true + "x-enum-name": "Adapter", + "x-enum-keys": [ + "static", + "ssr" + ] }, - "enabled": { - "type": "boolean", - "description": "Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.", - "x-example": false, - "x-nullable": true - } - } - } - } - } - } - } - }, - "\/project\/smtp\/tests": { - "post": { - "summary": "Create project SMTP test", - "operationId": "projectCreateSMTPTest", - "tags": [ - "project" - ], - "description": "Send a test email to verify SMTP configuration. ", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createSMTPTest", - "group": "smtp", - "cookies": false, - "type": "", - "demo": "project\/create-smtp-test.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "emails": { + "fallbackFile": { + "type": "string", + "description": "Fallback file for single page application sites.", + "default": "", + "x-example": "<FALLBACK_FILE>" + }, + "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 site.", + "default": "", + "x-example": "<PROVIDER_REPOSITORY_ID>" + }, + "providerBranch": { + "type": "string", + "description": "Production branch for the repo linked to the site.", + "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 site? In silent mode, comments will not be made on commits and pull requests.", + "default": false, + "x-example": false + }, + "providerRootDirectory": { + "type": "string", + "description": "Path to site code in the linked repo.", + "default": "", + "x-example": "<PROVIDER_ROOT_DIRECTORY>" + }, + "providerBranches": { "type": "array", - "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", + "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", "x-example": null, "items": { "type": "string" - } + }, + "x-nullable": true + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", + "x-example": null, + "items": { + "type": "string" + }, + "x-nullable": true + }, + "buildSpecification": { + "type": "string", + "description": "Build specification for the site deployments.", + "x-example": null, + "x-nullable": true + }, + "runtimeSpecification": { + "type": "string", + "description": "Runtime specification for the SSR executions.", + "default": {}, + "x-example": null + }, + "deploymentRetention": { + "type": "integer", + "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", + "default": 0, + "x-example": 0, + "format": "int32" } }, "required": [ - "emails" + "name", + "framework" ] } } } } - } - }, - "\/project\/templates\/email": { - "get": { - "summary": "List project email templates", - "operationId": "projectListEmailTemplates", - "tags": [ - "project" - ], - "description": "Get a list of all custom email templates configured for the project. This endpoint returns an array of all configured email templates and their locales.", - "responses": { - "200": { - "description": "Email Templates List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplateList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listEmailTemplates", - "group": "templates", - "cookies": false, - "type": "", - "demo": "project\/list-email-templates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "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). Only supported methods are limit and offset", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - } - ] }, - "patch": { - "summary": "Update project email template", - "operationId": "projectUpdateEmailTemplate", + "delete": { + "summary": "Delete site", + "operationId": "sitesDelete", "tags": [ - "project" + "sites" ], - "description": "Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.", + "description": "Delete a site by its unique ID.", "responses": { - "200": { - "description": "EmailTemplate", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateEmailTemplate", - "group": "templates", + "method": "delete", + "group": "sites", "cookies": false, "type": "", - "demo": "project\/update-email-template.md", + "demo": "sites\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "templates.write", + "scope": "sites.write", "platforms": [ "console", "server" @@ -41603,355 +54685,100 @@ "Key": [] } }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "templateId": { - "type": "string", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "ProjectEmailTemplateId", - "x-enum-keys": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ] - }, - "locale": { - "type": "string", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", - "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": "ProjectEmailTemplateLocale", - "x-enum-keys": [ - "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" - ] - }, - "subject": { - "type": "string", - "description": "Subject of the email template. Can be up to 255 characters.", - "x-example": "<SUBJECT>", - "x-nullable": true - }, - "message": { - "type": "string", - "description": "Plain or HTML body of the email template message. Can be up to 10MB of content.", - "x-example": "<MESSAGE>", - "x-nullable": true - }, - "senderName": { - "type": "string", - "description": "Name of the email sender.", - "x-example": "<SENDER_NAME>", - "x-nullable": true - }, - "senderEmail": { - "type": "string", - "description": "Email of the sender. Pass an empty string to clear a previously set value.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToEmail": { - "type": "string", - "description": "Reply to email. Pass an empty string to clear a previously set value.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "replyToName": { + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployment": { + "patch": { + "summary": "Update site's deployment", + "operationId": "sitesUpdateSiteDeployment", + "tags": [ + "sites" + ], + "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "responses": { + "200": { + "description": "Site", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/site" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSiteDeployment", + "group": "sites", + "cookies": false, + "type": "", + "demo": "sites\/update-site-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { "type": "string", - "description": "Reply to name.", - "x-example": "<REPLY_TO_NAME>", - "x-nullable": true + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" } }, "required": [ - "templateId" + "deploymentId" ] } } @@ -41959,21 +54786,21 @@ } } }, - "\/project\/templates\/email\/{templateId}": { + "\/sites\/{siteId}\/deployments": { "get": { - "summary": "Get project email template", - "operationId": "projectGetEmailTemplate", + "summary": "List deployments", + "operationId": "sitesListDeployments", "tags": [ - "project" + "sites" ], - "description": "Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.", + "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", "responses": { "200": { - "description": "EmailTemplate", + "description": "Deployments List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/emailTemplate" + "$ref": "#\/components\/schemas\/deploymentList" } } } @@ -41981,15 +54808,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getEmailTemplate", - "group": "templates", + "method": "listDeployments", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/get-email-template.md", + "demo": "sites\/list-deployments.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "templates.read", + "scope": "sites.read", "platforms": [ "console", "server" @@ -42009,329 +54836,172 @@ ], "parameters": [ { - "name": "templateId", - "description": "Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession", + "name": "siteId", + "description": "Site ID.", "required": true, "schema": { "type": "string", - "x-example": "verification", - "enum": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ], - "x-enum-name": "ProjectEmailTemplateId", - "x-enum-keys": [ - "verification", - "magicSession", - "recovery", - "invitation", - "mfaChallenge", - "sessionAlert", - "otpSession" - ] + "x-example": "<SITE_ID>" }, "in": "path" }, { - "name": "locale", - "description": "Custom email template locale. If left empty, the fallback locale (en) will be used.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", + "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": "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": "ProjectEmailTemplateLocale", - "x-enum-keys": [ - "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-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } - ] + ] + }, + "post": { + "summary": "Create deployment", + "operationId": "sitesCreateDeployment", + "tags": [ + "sites" + ], + "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "responses": { + "202": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createDeployment", + "group": "deployments", + "cookies": false, + "type": "upload", + "demo": "sites\/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": true, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "installCommand": { + "type": "string", + "description": "Install Commands.", + "x-example": "<INSTALL_COMMAND>", + "x-nullable": true + }, + "buildCommand": { + "type": "string", + "description": "Build Commands.", + "x-example": "<BUILD_COMMAND>", + "x-nullable": true + }, + "outputDirectory": { + "type": "string", + "description": "Output Directory.", + "x-example": "<OUTPUT_DIRECTORY>", + "x-nullable": true + }, + "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, + "format": "binary" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "code" + ] + } + } + } + } } }, - "\/project\/variables": { - "get": { - "summary": "List project variables", - "operationId": "projectListVariables", + "\/sites\/{siteId}\/deployments\/duplicate": { + "post": { + "summary": "Create duplicate deployment", + "operationId": "sitesCreateDuplicateDeployment", "tags": [ - "project" + "sites" ], - "description": "Get a list of all project environment variables.", + "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "responses": { - "200": { - "description": "Variables List", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variableList" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -42339,15 +55009,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listVariables", - "group": "variables", + "method": "createDuplicateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/list-variables.md", + "demo": "sites\/create-duplicate-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", + "scope": "sites.write", "platforms": [ "console", "server" @@ -42367,45 +55037,52 @@ ], "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: key, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "siteId", + "description": "Site ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<SITE_ID>" }, - "in": "query" + "in": "path" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID.", + "x-example": "<DEPLOYMENT_ID>" + } + }, + "required": [ + "deploymentId" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/template": { "post": { - "summary": "Create project variable", - "operationId": "projectCreateVariable", + "summary": "Create template deployment", + "operationId": "sitesCreateTemplateDeployment", "tags": [ - "project" + "sites" ], - "description": "Create a new project environment variable. These variables can be accessed by all functions and sites in the project.", + "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", "responses": { - "201": { - "description": "Variable", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -42413,15 +55090,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVariable", - "group": "variables", + "method": "createTemplateDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/create-variable.md", + "demo": "sites\/create-template-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.write", "platforms": [ "console", "server" @@ -42439,41 +55116,73 @@ "Key": [] } ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "variableId": { + "repository": { "type": "string", - "description": "Variable 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": "<VARIABLE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Repository name of the template.", + "x-example": "<REPOSITORY>" }, - "key": { + "owner": { "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>" + "description": "The name of the owner of the template.", + "x-example": "<OWNER>" }, - "value": { + "rootDirectory": { "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>" + "description": "Path to site code in the template repo.", + "x-example": "<ROOT_DIRECTORY>" }, - "secret": { + "type": { + "type": "string", + "description": "Type for the reference provided. Can be commit, branch, or tag", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "TemplateReferenceType", + "x-enum-keys": [ + "branch", + "commit", + "tag" + ] + }, + "reference": { + "type": "string", + "description": "Reference value, can be a commit hash, branch name, or release tag", + "x-example": "<REFERENCE>" + }, + "activate": { "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "default": true, + "description": "Automatically activate the deployment when it is finished building.", + "default": false, "x-example": false } }, "required": [ - "variableId", - "key", - "value" + "repository", + "owner", + "rootDirectory", + "type", + "reference" ] } } @@ -42481,21 +55190,21 @@ } } }, - "\/project\/variables\/{variableId}": { - "get": { - "summary": "Get project variable", - "operationId": "projectGetVariable", + "\/sites\/{siteId}\/deployments\/vcs": { + "post": { + "summary": "Create VCS deployment", + "operationId": "sitesCreateVcsDeployment", "tags": [ - "project" + "sites" ], - "description": "Get a variable by its unique ID. ", + "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "responses": { - "200": { - "description": "Variable", + "202": { + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -42503,15 +55212,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getVariable", - "group": "variables", + "method": "createVcsDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/get-variable.md", + "demo": "sites\/create-vcs-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.read", + "scope": "sites.write", "platforms": [ "console", "server" @@ -42531,31 +55240,75 @@ ], "parameters": [ { - "name": "variableId", - "description": "Variable unique ID.", + "name": "siteId", + "description": "Site ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<SITE_ID>" }, "in": "path" } - ] - }, - "put": { - "summary": "Update project variable", - "operationId": "projectUpdateVariable", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of reference passed. Allowed values are: branch, commit", + "x-example": "branch", + "enum": [ + "branch", + "commit", + "tag" + ], + "x-enum-name": "VCSReferenceType", + "x-enum-keys": [ + "branch", + "commit", + "tag" + ] + }, + "reference": { + "type": "string", + "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", + "x-example": "<REFERENCE>" + }, + "activate": { + "type": "boolean", + "description": "Automatically activate the deployment when it is finished building.", + "default": false, + "x-example": false + } + }, + "required": [ + "type", + "reference" + ] + } + } + } + } + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}": { + "get": { + "summary": "Get deployment", + "operationId": "sitesGetDeployment", "tags": [ - "project" + "sites" ], - "description": "Update variable by its unique ID.", + "description": "Get a site deployment by its unique ID.", "responses": { "200": { - "description": "Variable", + "description": "Deployment", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/deployment" } } } @@ -42563,15 +55316,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVariable", - "group": "variables", + "method": "getDeployment", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/update-variable.md", + "demo": "sites\/get-deployment.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.read", "platforms": [ "console", "server" @@ -42591,69 +55344,232 @@ ], "parameters": [ { - "name": "variableId", - "description": "Variable unique ID.", + "name": "siteId", + "description": "Site ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" }, "in": "path" } + ] + }, + "delete": { + "summary": "Delete deployment", + "operationId": "sitesDeleteDeployment", + "tags": [ + "sites" + ], + "description": "Delete a site deployment by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteDeployment", + "group": "deployments", + "cookies": false, + "type": "", + "demo": "sites\/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true - }, - "value": { - "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", - "x-nullable": true - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only projects can read them during build and runtime.", - "x-example": false, - "x-nullable": true - } + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "get": { + "summary": "Get deployment download", + "operationId": "sitesGetDeploymentDownload", + "tags": [ + "sites" + ], + "description": "Get a site deployment 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", + "content": { + "*\/*": { + "schema": { + "type": "string", + "format": "binary" } } } } - } - }, - "delete": { - "summary": "Delete project variable", - "operationId": "projectDeleteVariable", + }, + "deprecated": false, + "x-appwrite": { + "method": "getDeploymentDownload", + "group": "deployments", + "cookies": false, + "type": "location", + "demo": "sites\/get-deployment-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "public", + "sites.read" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" + }, + "in": "path" + }, + { + "name": "type", + "description": "Deployment file to download. Can be: \"source\", \"output\".", + "required": false, + "schema": { + "type": "string", + "x-example": "source", + "enum": [ + "source", + "output" + ], + "x-enum-name": "DeploymentDownloadType", + "x-enum-keys": [ + "source", + "output" + ], + "default": "source" + }, + "in": "query" + }, + { + "name": "token", + "description": "Presigned source-download token for accessing this deployment without a session (jobs-service).", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" + } + ] + } + }, + "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { + "patch": { + "summary": "Update deployment status", + "operationId": "sitesUpdateDeploymentStatus", "tags": [ - "project" + "sites" ], - "description": "Delete a variable by its unique ID. ", + "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Deployment", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/deployment" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteVariable", - "group": "variables", + "method": "updateDeploymentStatus", + "group": "deployments", "cookies": false, "type": "", - "demo": "project\/delete-variable.md", + "demo": "sites\/update-deployment-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "project.write", + "scope": "sites.write", "platforms": [ "console", "server" @@ -42673,33 +55589,43 @@ ], "parameters": [ { - "name": "variableId", - "description": "Variable unique ID.", + "name": "siteId", + "description": "Site ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DEPLOYMENT_ID>" }, "in": "path" } ] } }, - "\/proxy\/rules": { + "\/sites\/{siteId}\/logs": { "get": { - "summary": "List rules", - "operationId": "proxyListRules", + "summary": "List logs", + "operationId": "sitesListLogs", "tags": [ - "proxy" + "sites" ], - "description": "Get a list of all the proxy rules. You can use the query params to filter your results.", + "description": "Get a list of all site logs. You can use the query params to filter your results.", "responses": { "200": { - "description": "Rule List", + "description": "Executions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/proxyRuleList" + "$ref": "#\/components\/schemas\/executionList" } } } @@ -42707,15 +55633,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRules", - "group": "rules", + "method": "listLogs", + "group": "logs", "cookies": false, "type": "", - "demo": "proxy\/list-rules.md", + "demo": "sites\/list-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", + "scope": "log.read", "platforms": [ "console", "server" @@ -42734,9 +55660,19 @@ } ], "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, { "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, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", "required": false, "schema": { "type": "array", @@ -42761,21 +55697,21 @@ ] } }, - "\/proxy\/rules\/api": { - "post": { - "summary": "Create API rule", - "operationId": "proxyCreateAPIRule", + "\/sites\/{siteId}\/logs\/{logId}": { + "get": { + "summary": "Get log", + "operationId": "sitesGetLog", "tags": [ - "proxy" + "sites" ], - "description": "Create a new proxy rule for serving Appwrite's API on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "description": "Get a site request log by its unique ID.", "responses": { - "201": { - "description": "Rule", + "200": { + "description": "Execution", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/proxyRule" + "$ref": "#\/components\/schemas\/execution" } } } @@ -42783,15 +55719,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "createAPIRule", - "group": "rules", + "method": "getLog", + "group": "logs", "cookies": false, "type": "", - "demo": "proxy\/create-api-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", + "demo": "sites\/get-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.read", "platforms": [ "console", "server" @@ -42809,261 +55745,61 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - } - }, - "required": [ - "domain" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/function": { - "post": { - "summary": "Create function rule", - "operationId": "proxyCreateFunctionRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for executing Appwrite Function on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFunctionRule", - "group": "rules", - "cookies": false, - "type": "", - "demo": "proxy\/create-function-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ + "parameters": [ { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "functionId": { - "type": "string", - "description": "ID of function to be executed.", - "x-example": "<FUNCTION_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "default": "", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "functionId" - ] - } - } - } - } - } - }, - "\/proxy\/rules\/redirect": { - "post": { - "summary": "Create redirect rule", - "operationId": "proxyCreateRedirectRule", - "tags": [ - "proxy" - ], - "description": "Create a new proxy rule for to redirect from custom domain to another domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", - "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createRedirectRule", - "group": "rules", - "cookies": false, - "type": "", - "demo": "proxy\/create-redirect-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, { - "Project": [], - "Key": [] - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "url": { - "type": "string", - "description": "Target URL of redirection", - "x-example": "https:\/\/example.com", - "format": "url" - }, - "statusCode": { - "type": "string", - "description": "Status code of redirection", - "x-example": "301", - "enum": [ - "301", - "302", - "307", - "308" - ], - "x-enum-name": "StatusCode", - "x-enum-keys": [ - "MovedPermanently", - "Found", - "TemporaryRedirect", - "PermanentRedirect" - ] - }, - "resourceId": { - "type": "string", - "description": "ID of parent resource.", - "x-example": "<RESOURCE_ID>" - }, - "resourceType": { - "type": "string", - "description": "Type of parent resource.", - "x-example": "site", - "enum": [ - "site", - "function" - ], - "x-enum-name": "ProxyResourceType", - "x-enum-keys": [ - "Site", - "Function" - ] - } - }, - "required": [ - "domain", - "url", - "statusCode", - "resourceId", - "resourceType" - ] - } - } + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" } - } - } - }, - "\/proxy\/rules\/site": { - "post": { - "summary": "Create site rule", - "operationId": "proxyCreateSiteRule", + ] + }, + "delete": { + "summary": "Delete log", + "operationId": "sitesDeleteLog", "tags": [ - "proxy" + "sites" ], - "description": "Create a new proxy rule for serving Appwrite Site on custom domain.\n\nRule ID is automatically generated as MD5 hash of a rule domain for performance purposes.", + "description": "Delete a site log by its unique ID.", "responses": { - "201": { - "description": "Rule", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/proxyRule" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createSiteRule", - "group": "rules", + "method": "deleteLog", + "group": "logs", "cookies": false, "type": "", - "demo": "proxy\/create-site-rule.md", - "rate-limit": 10, - "rate-time": 60, - "rate-key": "userId:{userId}, url:{url}", - "scope": "rules.write", + "demo": "sites\/delete-log.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "log.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -43075,54 +55811,45 @@ "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": null - }, - "siteId": { - "type": "string", - "description": "ID of site to be executed.", - "x-example": "<SITE_ID>" - }, - "branch": { - "type": "string", - "description": "Name of VCS branch to deploy changes automatically", - "default": "", - "x-example": "<BRANCH>" - } - }, - "required": [ - "domain", - "siteId" - ] - } - } + "parameters": [ + { + "name": "siteId", + "description": "Site ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "logId", + "description": "Log ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<LOG_ID>" + }, + "in": "path" } - } + ] } }, - "\/proxy\/rules\/{ruleId}": { + "\/sites\/{siteId}\/variables": { "get": { - "summary": "Get rule", - "operationId": "proxyGetRule", + "summary": "List variables", + "operationId": "sitesListVariables", "tags": [ - "proxy" + "sites" ], - "description": "Get a proxy rule by its unique ID.", + "description": "Get a list of all variables of a specific site.", "responses": { "200": { - "description": "Rule", + "description": "Variables List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/proxyRule" + "$ref": "#\/components\/schemas\/variableList" } } } @@ -43130,15 +55857,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRule", - "group": "rules", + "method": "listVariables", + "group": "variables", "cookies": false, "type": "", - "demo": "proxy\/get-rule.md", + "demo": "sites\/list-variables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rules.read", + "scope": "sites.read", "platforms": [ "console", "server" @@ -43158,86 +55885,55 @@ ], "parameters": [ { - "name": "ruleId", - "description": "Rule ID.", + "name": "siteId", + "description": "Site unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<RULE_ID>" + "x-example": "<SITE_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" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteRule", - "group": "rules", - "cookies": false, - "type": "", - "demo": "proxy\/delete-rule.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "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: key, resourceType, resourceId, secret", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, { - "name": "ruleId", - "description": "Rule ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "<RULE_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "in": "query" } ] - } - }, - "\/proxy\/rules\/{ruleId}\/status": { - "patch": { - "summary": "Update rule status", - "operationId": "proxyUpdateRuleStatus", + }, + "post": { + "summary": "Create variable", + "operationId": "sitesCreateVariable", "tags": [ - "proxy" + "sites" ], - "description": "If not succeeded yet, retry verification process of a proxy rule domain. This endpoint triggers domain verification by checking DNS records. If verification is successful, a TLS certificate will be automatically provisioned for the domain asynchronously in the background.", + "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "responses": { - "200": { - "description": "Rule", + "201": { + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/proxyRule" + "$ref": "#\/components\/schemas\/variable" } } } @@ -43245,15 +55941,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRuleStatus", - "group": "rules", + "method": "createVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "proxy\/update-rule-status.md", + "demo": "sites\/create-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rules.write", + "scope": "sites.write", "platforms": [ "console", "server" @@ -43273,33 +55969,73 @@ ], "parameters": [ { - "name": "ruleId", - "description": "Rule ID.", + "name": "siteId", + "description": "Site unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<RULE_ID>" + "x-example": "<SITE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "variableId": { + "type": "string", + "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<VARIABLE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "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>" + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "default": true, + "x-example": false + } + }, + "required": [ + "variableId", + "key", + "value" + ] + } + } + } + } } }, - "\/reports": { + "\/sites\/{siteId}\/variables\/{variableId}": { "get": { - "summary": "List reports", - "operationId": "advisorListReports", + "summary": "Get variable", + "operationId": "sitesGetVariable", "tags": [ - "advisor" + "sites" ], - "description": "Get a list of all the project's analyzer reports. You can use the query params to filter your results.\n", + "description": "Get a variable by its unique ID.", "responses": { "200": { - "description": "Reports List", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/reportList" + "$ref": "#\/components\/schemas\/variable" } } } @@ -43307,22 +56043,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listReports", - "group": "reports", + "method": "getVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "advisor\/list-reports.md", + "demo": "sites\/get-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "reports.read", + "scope": "sites.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/list-reports.md", "auth": { "Project": [], "Key": [] @@ -43336,47 +56071,41 @@ ], "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: appId, type, targetType, target, analyzedAt", - "required": false, + "name": "siteId", + "description": "Site unique ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<SITE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "variableId", + "description": "Variable unique ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<VARIABLE_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/reports\/{reportId}": { - "get": { - "summary": "Get report", - "operationId": "advisorGetReport", + }, + "put": { + "summary": "Update variable", + "operationId": "sitesUpdateVariable", "tags": [ - "advisor" + "sites" ], - "description": "Get an analyzer report by its unique ID. The response includes the report's metadata and the nested insights it produced.\n", + "description": "Update variable by its unique ID.", "responses": { "200": { - "description": "Report", + "description": "Variable", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/report" + "$ref": "#\/components\/schemas\/variable" } } } @@ -43384,22 +56113,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getReport", - "group": "reports", + "method": "updateVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "advisor\/get-report.md", + "demo": "sites\/update-variable.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "reports.read", + "scope": "sites.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/get-report.md", "auth": { "Project": [], "Key": [] @@ -43413,24 +56141,63 @@ ], "parameters": [ { - "name": "reportId", - "description": "Report ID.", + "name": "siteId", + "description": "Site unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<REPORT_ID>" + "x-example": "<SITE_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>", + "x-nullable": true + }, + "value": { + "type": "string", + "description": "Variable value. Max length: 8192 chars.", + "x-example": "<VALUE>", + "x-nullable": true + }, + "secret": { + "type": "boolean", + "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", + "x-example": false, + "x-nullable": true + } + } + } + } + } + } }, "delete": { - "summary": "Delete report", - "operationId": "advisorDeleteReport", + "summary": "Delete variable", + "operationId": "sitesDeleteVariable", "tags": [ - "advisor" + "sites" ], - "description": "Delete an analyzer report by its unique ID. Nested insights and CTA metadata are removed asynchronously by the deletes worker.\n", + "description": "Delete a variable by its unique ID.", "responses": { "204": { "description": "No content" @@ -43438,22 +56205,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteReport", - "group": "reports", + "method": "deleteVariable", + "group": "variables", "cookies": false, "type": "", - "demo": "advisor\/delete-report.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "projectId:{projectId},userId:{userId}", - "scope": "reports.write", + "demo": "sites\/delete-variable.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "sites.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/delete-report.md", "auth": { "Project": [], "Key": [] @@ -43467,33 +56233,43 @@ ], "parameters": [ { - "name": "reportId", - "description": "Report ID.", + "name": "siteId", + "description": "Site unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<REPORT_ID>" + "x-example": "<SITE_ID>" + }, + "in": "path" + }, + { + "name": "variableId", + "description": "Variable unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<VARIABLE_ID>" }, "in": "path" } ] } }, - "\/reports\/{reportId}\/insights": { + "\/storage\/buckets": { "get": { - "summary": "List insights", - "operationId": "advisorListInsights", + "summary": "List buckets", + "operationId": "storageListBuckets", "tags": [ - "advisor" + "storage" ], - "description": "List the insights produced under a single analyzer report. You can use the query params to filter your results further.\n", + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", "responses": { "200": { - "description": "Insights List", + "description": "Buckets List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/insightList" + "$ref": "#\/components\/schemas\/bucketList" } } } @@ -43501,22 +56277,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listInsights", - "group": "insights", + "method": "listBuckets", + "group": "buckets", "cookies": false, "type": "", - "demo": "advisor\/list-insights.md", + "demo": "storage\/list-buckets.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "insights.read", + "scope": "buckets.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/list-insights.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "auth": { "Project": [], "Key": [] @@ -43529,19 +56305,9 @@ } ], "parameters": [ - { - "name": "reportId", - "description": "Parent report ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<REPORT_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, transformations", "required": false, "schema": { "type": "array", @@ -43552,6 +56318,17 @@ }, "in": "query" }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -43564,23 +56341,21 @@ "in": "query" } ] - } - }, - "\/reports\/{reportId}\/insights\/{insightId}": { - "get": { - "summary": "Get insight", - "operationId": "advisorGetInsight", + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", "tags": [ - "advisor" + "storage" ], - "description": "Get an insight by its unique ID, scoped to its parent report.\n", + "description": "Create a new storage bucket.", "responses": { - "200": { - "description": "Insight", + "201": { + "description": "Bucket", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/insight" + "$ref": "#\/components\/schemas\/bucket" } } } @@ -43588,22 +56363,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getInsight", - "group": "insights", + "method": "createBucket", + "group": "buckets", "cookies": false, "type": "", - "demo": "advisor\/get-insight.md", + "demo": "storage\/create-bucket.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "insights.read", + "scope": "buckets.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/advisor\/get-insight.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "auth": { "Project": [], "Key": [] @@ -43615,45 +56390,123 @@ "Key": [] } ], - "parameters": [ - { - "name": "reportId", - "description": "Parent report ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<REPORT_ID>" - }, - "in": "path" - }, - { - "name": "insightId", - "description": "Insight ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<INSIGHT_ID>" - }, - "in": "path" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Bucket name", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "fileSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", + "default": {}, + "x-example": 1, + "format": "int32" + }, + "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 chosen 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": "Compression", + "x-enum-keys": [ + "none", + "gzip", + "zstd" + ] + }, + "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 + }, + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false + } + }, + "required": [ + "bucketId", + "name" + ] + } + } } - ] + } } }, - "\/sites": { + "\/storage\/buckets\/{bucketId}": { "get": { - "summary": "List sites", - "operationId": "sitesList", + "summary": "Get bucket", + "operationId": "storageGetBucket", "tags": [ - "sites" + "storage" ], - "description": "Get a list of all the project's sites. You can use the query params to filter your results.", + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", "responses": { "200": { - "description": "Sites List", + "description": "Bucket", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/siteList" + "$ref": "#\/components\/schemas\/bucket" } } } @@ -43661,21 +56514,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "sites", + "method": "getBucket", + "group": "buckets", "cookies": false, "type": "", - "demo": "sites\/list.md", + "demo": "storage\/get-bucket.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "buckets.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "auth": { "Project": [], "Key": [] @@ -43689,56 +56543,31 @@ ], "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, framework, deploymentId, buildCommand, installCommand, outputDirectory, 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<BUCKET_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create site", - "operationId": "sitesCreate", + "put": { + "summary": "Update bucket", + "operationId": "storageUpdateBucket", "tags": [ - "sites" + "storage" ], - "description": "Create a new site.", + "description": "Update a storage bucket by its unique ID.", "responses": { - "201": { - "description": "Site", + "200": { + "description": "Bucket", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/site" + "$ref": "#\/components\/schemas\/bucket" } } } @@ -43746,21 +56575,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "sites", + "method": "updateBucket", + "group": "buckets", "cookies": false, "type": "", - "demo": "sites\/create.md", + "demo": "storage\/update-bucket.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "buckets.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "auth": { "Project": [], "Key": [] @@ -43772,493 +56602,140 @@ "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": { - "siteId": { - "type": "string", - "description": "Site ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<SITE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, "name": { "type": "string", - "description": "Site name. Max length: 128 chars.", + "description": "Bucket name", "x-example": "<NAME>" }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": "Framework", - "x-enum-keys": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ] + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true }, - "enabled": { + "fileSecurity": { "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, + "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, "x-example": false }, - "logging": { + "enabled": { "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "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 }, - "timeout": { + "maximumFileSize": { "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, + "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", + "default": {}, "x-example": 1, "format": "int32" }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "BuildRuntime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "adapter": { + "compression": { "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", + "description": "Compression algorithm chosen 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": [ - "static", - "ssr" + "none", + "gzip", + "zstd" ], - "x-enum-name": "Adapter", + "x-enum-name": "Compression", "x-enum-keys": [ - "static", - "ssr" + "none", + "gzip", + "zstd" ] }, - "installationId": { - "type": "string", - "description": "Appwrite Installation ID for VCS (Version Control System) deployment.", - "default": "", - "x-example": "<INSTALLATION_ID>" - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "providerRepositoryId": { - "type": "string", - "description": "Repository ID of the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "default": "", - "x-example": "<PROVIDER_BRANCH>" - }, - "providerSilentMode": { + "encryption": { "type": "boolean", - "description": "Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, "x-example": false }, - "providerRootDirectory": { - "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" - }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "default": {}, - "x-example": null - }, - "runtimeSpecification": { - "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, - "x-example": null + "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 }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" + "transformations": { + "type": "boolean", + "description": "Are image transformations enabled?", + "default": true, + "x-example": false } }, - "required": [ - "siteId", - "name", - "framework", - "buildRuntime" - ] - } - } - } - } - } - }, - "\/sites\/frameworks": { - "get": { - "summary": "List frameworks", - "operationId": "sitesListFrameworks", - "tags": [ - "sites" - ], - "description": "Get a list of all frameworks that are currently available on the server instance.", - "responses": { - "200": { - "description": "Frameworks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/frameworkList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listFrameworks", - "group": "frameworks", - "cookies": false, - "type": "", - "demo": "sites\/list-frameworks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ] - } - }, - "\/sites\/specifications": { - "get": { - "summary": "List specifications", - "operationId": "sitesListSpecifications", + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete bucket", + "operationId": "storageDeleteBucket", "tags": [ - "sites" + "storage" ], - "description": "List allowed site specifications for this instance.", + "description": "Delete a storage bucket by its unique ID.", "responses": { - "200": { - "description": "Specifications List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/specificationList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listSpecifications", - "group": "frameworks", + "method": "deleteBucket", + "group": "buckets", "cookies": false, "type": "", - "demo": "sites\/list-specifications.md", + "demo": "storage\/delete-bucket.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "buckets.write", "platforms": [ - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "auth": { "Project": [], "Key": [] @@ -44272,34 +56749,33 @@ ], "parameters": [ { - "name": "type", - "description": "Specification type to list. Can be one of: runtimes, builds.", - "required": false, + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, "schema": { "type": "string", - "x-example": "runtimes", - "default": "runtimes" + "x-example": "<BUCKET_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/sites\/{siteId}": { + "\/storage\/buckets\/{bucketId}\/files": { "get": { - "summary": "Get site", - "operationId": "sitesGet", + "summary": "List files", + "operationId": "storageListFiles", "tags": [ - "sites" + "storage" ], - "description": "Get a site by its unique ID.", + "description": "Get a list of all the user files. You can use the query params to filter your results.", "responses": { "200": { - "description": "Site", + "description": "Files List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/site" + "$ref": "#\/components\/schemas\/fileList" } } } @@ -44307,59 +56783,98 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "sites", + "method": "listFiles", + "group": "files", "cookies": false, "type": "", - "demo": "sites\/get.md", + "demo": "storage\/list-files.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "files.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "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, folder, 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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, - "put": { - "summary": "Update site", - "operationId": "sitesUpdate", + "post": { + "summary": "Create file", + "operationId": "storageCreateFile", "tags": [ - "sites" + "storage" ], - "description": "Update site by its unique ID.", + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", "responses": { - "200": { - "description": "Site", + "201": { + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/site" + "$ref": "#\/components\/schemas\/file" } } } @@ -44367,502 +56882,184 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "sites", + "method": "createFile", + "group": "files", "cookies": false, - "type": "", - "demo": "sites\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "type": "upload", + "demo": "storage\/create-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", + "scope": "files.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<BUCKET_ID>" }, "in": "path" } ], "requestBody": { "content": { - "application\/json": { + "multipart\/form-data": { "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Site name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "framework": { - "type": "string", - "description": "Sites framework.", - "x-example": "analog", - "enum": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ], - "x-enum-name": "Framework", - "x-enum-keys": [ - "analog", - "angular", - "nextjs", - "react", - "nuxt", - "vue", - "sveltekit", - "astro", - "tanstack-start", - "remix", - "lynx", - "flutter", - "react-native", - "vite", - "other" - ] - }, - "enabled": { - "type": "boolean", - "description": "Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", - "default": true, - "x-example": false - }, - "timeout": { - "type": "integer", - "description": "Maximum request time in seconds.", - "default": 30, - "x-example": 1, - "format": "int32" - }, - "installCommand": { - "type": "string", - "description": "Install Command.", - "default": "", - "x-example": "<INSTALL_COMMAND>" - }, - "buildCommand": { - "type": "string", - "description": "Build Command.", - "default": "", - "x-example": "<BUILD_COMMAND>" - }, - "startCommand": { - "type": "string", - "description": "Custom start command. Leave empty to use default.", - "default": "", - "x-example": "<START_COMMAND>" - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory for site.", - "default": "", - "x-example": "<OUTPUT_DIRECTORY>" - }, - "buildRuntime": { - "type": "string", - "description": "Runtime to use during build step.", - "x-example": "node-14.5", - "enum": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ], - "x-enum-name": "BuildRuntime", - "x-enum-keys": [ - "node-14.5", - "node-16.0", - "node-18.0", - "node-19.0", - "node-20.0", - "node-21.0", - "node-22", - "node-23", - "node-24", - "node-25", - "php-8.0", - "php-8.1", - "php-8.2", - "php-8.3", - "php-8.4", - "ruby-3.0", - "ruby-3.1", - "ruby-3.2", - "ruby-3.3", - "ruby-3.4", - "ruby-4.0", - "python-3.8", - "python-3.9", - "python-3.10", - "python-3.11", - "python-3.12", - "python-3.13", - "python-3.14", - "python-ml-3.11", - "python-ml-3.12", - "python-ml-3.13", - "deno-1.21", - "deno-1.24", - "deno-1.35", - "deno-1.40", - "deno-1.46", - "deno-2.0", - "deno-2.5", - "deno-2.6", - "dart-2.15", - "dart-2.16", - "dart-2.17", - "dart-2.18", - "dart-2.19", - "dart-3.0", - "dart-3.1", - "dart-3.3", - "dart-3.5", - "dart-3.8", - "dart-3.9", - "dart-3.10", - "dart-3.11", - "dart-3.12", - "dotnet-6.0", - "dotnet-7.0", - "dotnet-8.0", - "dotnet-10", - "java-8.0", - "java-11.0", - "java-17.0", - "java-18.0", - "java-21.0", - "java-22", - "java-25", - "swift-5.5", - "swift-5.8", - "swift-5.9", - "swift-5.10", - "swift-6.2", - "kotlin-1.6", - "kotlin-1.8", - "kotlin-1.9", - "kotlin-2.0", - "kotlin-2.3", - "cpp-17", - "cpp-20", - "bun-1.0", - "bun-1.1", - "bun-1.2", - "bun-1.3", - "go-1.23", - "go-1.24", - "go-1.25", - "go-1.26", - "rust-1.83", - "static-1", - "flutter-3.24", - "flutter-3.27", - "flutter-3.29", - "flutter-3.32", - "flutter-3.35", - "flutter-3.38", - "flutter-3.41", - "flutter-3.44" - ] - }, - "adapter": { - "type": "string", - "description": "Framework adapter defining rendering strategy. Allowed values are: static, ssr", - "x-example": "static", - "enum": [ - "static", - "ssr" - ], - "x-enum-name": "Adapter", - "x-enum-keys": [ - "static", - "ssr" - ] - }, - "fallbackFile": { - "type": "string", - "description": "Fallback file for single page application sites.", - "default": "", - "x-example": "<FALLBACK_FILE>" - }, - "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 site.", - "default": "", - "x-example": "<PROVIDER_REPOSITORY_ID>" - }, - "providerBranch": { - "type": "string", - "description": "Production branch for the repo linked to the site.", - "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 site? In silent mode, comments will not be made on commits and pull requests.", - "default": false, - "x-example": false - }, - "providerRootDirectory": { + "fileId": { "type": "string", - "description": "Path to site code in the linked repo.", - "default": "", - "x-example": "<PROVIDER_ROOT_DIRECTORY>" + "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, + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.", + "file": { + "type": "string", + "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", "x-example": null, - "items": { - "type": "string" - }, - "x-nullable": true + "format": "binary" }, - "providerPaths": { + "permissions": { "type": "array", - "description": "List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.", - "x-example": null, + "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" }, "x-nullable": true }, - "buildSpecification": { - "type": "string", - "description": "Build specification for the site deployments.", - "x-example": null, - "x-nullable": true - }, - "runtimeSpecification": { + "folder": { "type": "string", - "description": "Runtime specification for the SSR executions.", - "default": {}, + "description": "Virtual folder to place the file in, for example \"photos\/2026\". Nest folders with `\/`. Defaults to the bucket root.", + "default": "", "x-example": null - }, - "deploymentRetention": { - "type": "integer", - "description": "Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.", - "default": 0, - "x-example": 0, - "format": "int32" } }, "required": [ - "name", - "framework" + "fileId", + "file" ] } } } } - }, - "delete": { - "summary": "Delete site", - "operationId": "sitesDelete", + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "get": { + "summary": "Get file", + "operationId": "storageGetFile", "tags": [ - "sites" + "storage" ], - "description": "Delete a site by its unique ID.", + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/file" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "sites", + "method": "getFile", + "group": "files", "cookies": false, "type": "", - "demo": "sites\/delete.md", + "demo": "storage\/get-file.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "files.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" }, "in": "path" } ] - } - }, - "\/sites\/{siteId}\/deployment": { - "patch": { - "summary": "Update site's deployment", - "operationId": "sitesUpdateSiteDeployment", + }, + "put": { + "summary": "Update file", + "operationId": "storageUpdateFile", "tags": [ - "sites" + "storage" ], - "description": "Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", "responses": { "200": { - "description": "Site", + "description": "File", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/site" + "$ref": "#\/components\/schemas\/file" } } } @@ -44870,40 +57067,54 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateSiteDeployment", - "group": "sites", + "method": "updateFile", + "group": "files", "cookies": false, "type": "", - "demo": "sites\/update-site-deployment.md", + "demo": "storage\/update-file.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "files.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Bucket unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" }, "in": "path" } @@ -44914,36 +57125,110 @@ "schema": { "type": "object", "properties": { - "deploymentId": { + "name": { "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" + "description": "File name.", + "x-example": "<NAME>" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true } - }, - "required": [ - "deploymentId" - ] + } } } } } + }, + "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteFile", + "group": "files", + "cookies": false, + "type": "", + "demo": "storage\/delete-file.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "files.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + } + ] } }, - "\/sites\/{siteId}\/deployments": { + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { "get": { - "summary": "List deployments", - "operationId": "sitesListDeployments", + "summary": "Get file for download", + "operationId": "storageGetFileDownload", "tags": [ - "sites" + "storage" ], - "description": "Get a list of all the site's code deployments. You can use the query params to filter your results.", + "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": "Deployments List", + "description": "File", "content": { - "application\/json": { + "*\/*": { "schema": { - "$ref": "#\/components\/schemas\/deploymentList" + "type": "string", + "format": "binary" } } } @@ -44951,94 +57236,89 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDeployments", - "group": "deployments", + "method": "getFileDownload", + "group": "files", "cookies": false, - "type": "", - "demo": "sites\/list-deployments.md", + "type": "location", + "demo": "storage\/get-file-download.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "files.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "auth": { "Project": [], - "Key": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type", - "required": false, + "name": "fileId", + "description": "File ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<FILE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", + "name": "token", + "description": "File token for accessing this file.", "required": false, "schema": { "type": "string", - "x-example": "<SEARCH>", + "x-example": "<TOKEN>", "default": "" }, "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] - }, - "post": { - "summary": "Create deployment", - "operationId": "sitesCreateDeployment", + } + }, + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { + "get": { + "summary": "Get file preview", + "operationId": "storageGetFilePreview", "tags": [ - "sites" + "storage" ], - "description": "Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.", + "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": { - "202": { - "description": "Deployment", + "200": { + "description": "Image", "content": { - "application\/json": { + "image\/*": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "type": "string", + "format": "binary" } } } @@ -45046,105 +57326,256 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDeployment", - "group": "deployments", + "method": "getFilePreview", + "group": "files", "cookies": false, - "type": "upload", - "demo": "sites\/create-deployment.md", + "type": "location", + "demo": "storage\/get-file-preview.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "files.read", "platforms": [ "console", + "client", "server" ], - "packaging": true, + "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "auth": { "Project": [], - "Key": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", - "required": true, + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "required": true, + "schema": { + "type": "string", + "x-example": "<BUCKET_ID>" + }, + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "schema": { + "type": "string", + "x-example": "center", + "enum": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "x-enum-name": "ImageGravity", + "x-enum-keys": [ + "center", + "top-left", + "top", + "top-right", + "left", + "right", + "bottom-left", + "bottom", + "bottom-right" + ], + "default": "center" + }, + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": -1, + "default": -1 + }, + "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", + "png", + "webp", + "heic", + "avif", + "gif" + ], + "x-enum-name": "ImageFormat", + "x-enum-keys": [ + "jpg", + "jpeg", + "png", + "webp", + "heic", + "avif", + "gif" + ] + }, + "in": "query" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<TOKEN>", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "multipart\/form-data": { - "schema": { - "type": "object", - "properties": { - "installCommand": { - "type": "string", - "description": "Install Commands.", - "x-example": "<INSTALL_COMMAND>", - "x-nullable": true - }, - "buildCommand": { - "type": "string", - "description": "Build Commands.", - "x-example": "<BUILD_COMMAND>", - "x-nullable": true - }, - "outputDirectory": { - "type": "string", - "description": "Output Directory.", - "x-example": "<OUTPUT_DIRECTORY>", - "x-nullable": true - }, - "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, - "format": "binary" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "code" - ] - } - } + "in": "query" } - } + ] } }, - "\/sites\/{siteId}\/deployments\/duplicate": { - "post": { - "summary": "Create duplicate deployment", - "operationId": "sitesCreateDuplicateDeployment", + "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { + "get": { + "summary": "Get file for view", + "operationId": "storageGetFileView", "tags": [ - "sites" + "storage" ], - "description": "Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", + "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": { - "202": { - "description": "Deployment", + "200": { + "description": "File", "content": { - "application\/json": { + "*\/*": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "type": "string", + "format": "binary" } } } @@ -45152,80 +57583,88 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDuplicateDeployment", - "group": "deployments", + "method": "getFileView", + "group": "files", "cookies": false, - "type": "", - "demo": "sites\/create-duplicate-deployment.md", + "type": "location", + "demo": "storage\/get-file-view.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "files.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "auth": { "Project": [], - "Key": [] + "Session": [], + "ImpersonateUserId": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [], + "ImpersonateUserId": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<BUCKET_ID>" }, "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<FILE_ID>" + }, + "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TOKEN>", + "default": "" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "deploymentId": { - "type": "string", - "description": "Deployment ID.", - "x-example": "<DEPLOYMENT_ID>" - } - }, - "required": [ - "deploymentId" - ] - } - } - } - } + ] } }, - "\/sites\/{siteId}\/deployments\/template": { - "post": { - "summary": "Create template deployment", - "operationId": "sitesCreateTemplateDeployment", + "\/tablesdb": { + "get": { + "summary": "List databases", + "operationId": "tablesDBList", "tags": [ - "sites" + "tablesDB" ], - "description": "Create a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/products\/sites\/templates) to find the template details.", + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", "responses": { - "202": { - "description": "Deployment", + "200": { + "description": "Databases List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/databaseList" } } } @@ -45233,21 +57672,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTemplateDeployment", - "group": "deployments", + "method": "list", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "sites\/create-template-deployment.md", + "demo": "tablesdb\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", "auth": { "Project": [], "Key": [] @@ -45261,93 +57701,56 @@ ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: 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": "<SITE_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "description": "Repository name of the template.", - "x-example": "<REPOSITORY>" - }, - "owner": { - "type": "string", - "description": "The name of the owner of the template.", - "x-example": "<OWNER>" - }, - "rootDirectory": { - "type": "string", - "description": "Path to site code in the template repo.", - "x-example": "<ROOT_DIRECTORY>" - }, - "type": { - "type": "string", - "description": "Type for the reference provided. Can be commit, branch, or tag", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "TemplateReferenceType", - "x-enum-keys": [ - "branch", - "commit", - "tag" - ] - }, - "reference": { - "type": "string", - "description": "Reference value, can be a commit hash, branch name, or release tag", - "x-example": "<REFERENCE>" - }, - "activate": { - "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, - "x-example": false - } - }, - "required": [ - "repository", - "owner", - "rootDirectory", - "type", - "reference" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/sites\/{siteId}\/deployments\/vcs": { + ] + }, "post": { - "summary": "Create VCS deployment", - "operationId": "sitesCreateVcsDeployment", + "summary": "Create database", + "operationId": "tablesDBCreate", "tags": [ - "sites" + "tablesDB" ], - "description": "Create a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", + "description": "Create a new Database.\n", "responses": { - "202": { - "description": "Deployment", + "201": { + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/database" } } } @@ -45355,21 +57758,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVcsDeployment", - "group": "deployments", + "method": "create", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "sites\/create-vcs-deployment.md", + "demo": "tablesdb\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", "auth": { "Project": [], "Key": [] @@ -45381,213 +57785,76 @@ "Key": [] } ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "type": { + "databaseId": { "type": "string", - "description": "Type of reference passed. Allowed values are: branch, commit", - "x-example": "branch", - "enum": [ - "branch", - "commit", - "tag" - ], - "x-enum-name": "VCSReferenceType", - "x-enum-keys": [ - "branch", - "commit", - "tag" - ] + "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-appwrite": { + "idGenerator": "ID.unique" + } }, - "reference": { + "name": { "type": "string", - "description": "VCS reference to create deployment from. Depending on type this can be: branch name, commit hash", - "x-example": "<REFERENCE>" + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "activate": { + "enabled": { "type": "boolean", - "description": "Automatically activate the deployment when it is finished building.", - "default": false, + "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": [ - "type", - "reference" - ] - } - } - } - } - } - }, - "\/sites\/{siteId}\/deployments\/{deploymentId}": { - "get": { - "summary": "Get deployment", - "operationId": "sitesGetDeployment", - "tags": [ - "sites" - ], - "description": "Get a site deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployment", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/deployment" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "getDeployment", - "group": "deployments", - "cookies": false, - "type": "", - "demo": "sites\/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete deployment", - "operationId": "sitesDeleteDeployment", - "tags": [ - "sites" - ], - "description": "Delete a site deployment by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDeployment", - "group": "deployments", - "cookies": false, - "type": "", - "demo": "sites\/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" + }, + "specification": { + "type": "string", + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true + } + }, + "required": [ + "databaseId", + "name" + ] + } + } } - ] + } } }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/download": { + "\/tablesdb\/specifications": { "get": { - "summary": "Get deployment download", - "operationId": "sitesGetDeploymentDownload", + "summary": "List specifications", + "operationId": "tablesDBListSpecifications", "tags": [ - "sites" + "tablesDB" ], - "description": "Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "File", + "description": "SpecificationList", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } @@ -45595,15 +57862,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDeploymentDownload", - "group": "deployments", + "method": "listSpecifications", + "group": "tablesdb", "cookies": false, - "type": "location", - "demo": "sites\/get-deployment-download.md", + "type": "", + "demo": "tablesdb\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "databases.read", "platforms": [ "console", "server" @@ -45612,77 +57879,32 @@ "public": true, "auth": { "Project": [], - "Key": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] - } - ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Deployment file to download. Can be: \"source\", \"output\".", - "required": false, - "schema": { - "type": "string", - "x-example": "source", - "enum": [ - "source", - "output" - ], - "x-enum-name": "DeploymentDownloadType", - "x-enum-keys": [ - "source", - "output" - ], - "default": "source" - }, - "in": "query" + "Key": [] } ] } }, - "\/sites\/{siteId}\/deployments\/{deploymentId}\/status": { - "patch": { - "summary": "Update deployment status", - "operationId": "sitesUpdateDeploymentStatus", + "\/tablesdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "tablesDBListTransactions", "tags": [ - "sites" + "tablesDB" ], - "description": "Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", + "description": "List transactions across all databases.", "responses": { "200": { - "description": "Deployment", + "description": "Transaction List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/deployment" + "$ref": "#\/components\/schemas\/transactionList" } } } @@ -45690,21 +57912,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDeploymentStatus", - "group": "deployments", + "method": "listTransactions", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/update-deployment-status.md", + "demo": "tablesdb\/list-transactions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": [ + "documents.read", + "rows.read" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", "auth": { "Project": [], "Key": [] @@ -45713,48 +57940,41 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, "schema": { - "type": "string", - "x-example": "<DEPLOYMENT_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" } ] - } - }, - "\/sites\/{siteId}\/logs": { - "get": { - "summary": "List logs", - "operationId": "sitesListLogs", + }, + "post": { + "summary": "Create transaction", + "operationId": "tablesDBCreateTransaction", "tags": [ - "sites" + "tablesDB" ], - "description": "Get a list of all site logs. You can use the query params to filter your results.", + "description": "Create a new transaction.", "responses": { - "200": { - "description": "Executions List", + "201": { + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/executionList" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -45762,21 +57982,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "logs", + "method": "createTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/list-logs.md", + "demo": "tablesdb\/create-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", "auth": { "Project": [], "Key": [] @@ -45785,62 +58010,46 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], - "parameters": [ - { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } } - ] + } } }, - "\/sites\/{siteId}\/logs\/{logId}": { + "\/tablesdb\/transactions\/{transactionId}": { "get": { - "summary": "Get log", - "operationId": "sitesGetLog", + "summary": "Get transaction", + "operationId": "tablesDBGetTransaction", "tags": [ - "sites" + "tablesDB" ], - "description": "Get a site request log by its unique ID.", + "description": "Get a transaction by its unique ID.", "responses": { "200": { - "description": "Execution", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/execution" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -45848,21 +58057,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "getLog", - "group": "logs", + "method": "getTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/get-log.md", + "demo": "tablesdb\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "log.read", + "scope": [ + "documents.read", + "rows.read" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", "auth": { "Project": [], "Key": [] @@ -45871,64 +58085,65 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<LOG_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } ] }, - "delete": { - "summary": "Delete log", - "operationId": "sitesDeleteLog", + "patch": { + "summary": "Update transaction", + "operationId": "tablesDBUpdateTransaction", "tags": [ - "sites" + "tablesDB" ], - "description": "Delete a site log by its unique ID.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteLog", - "group": "logs", + "method": "updateTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/delete-log.md", + "demo": "tablesdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "log.write", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", "auth": { "Project": [], "Key": [] @@ -45937,70 +58152,81 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "logId", - "description": "Log ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<LOG_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } - ] - } - }, - "\/sites\/{siteId}\/variables": { - "get": { - "summary": "List variables", - "operationId": "sitesListVariables", - "tags": [ - "sites" ], - "description": "Get a list of all variables of a specific site.", - "responses": { - "200": { - "description": "Variables List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/variableList" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } } } } } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "tablesDBDeleteTransaction", + "tags": [ + "tablesDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "listVariables", - "group": "variables", + "method": "deleteTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/list-variables.md", + "demo": "tablesdb\/delete-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", "auth": { "Project": [], "Key": [] @@ -46009,60 +58235,40 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site unique ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, resourceType, resourceId, secret", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } ] - }, + } + }, + "\/tablesdb\/transactions\/{transactionId}\/operations": { "post": { - "summary": "Create variable", - "operationId": "sitesCreateVariable", + "summary": "Create operations", + "operationId": "tablesDBCreateOperations", "tags": [ - "sites" + "tablesDB" ], - "description": "Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", + "description": "Create multiple operations in a single transaction.", "responses": { "201": { - "description": "Variable", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -46070,21 +58276,26 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVariable", - "group": "variables", + "method": "createOperations", + "group": "transactions", "cookies": false, "type": "", - "demo": "sites\/create-variable.md", + "demo": "tablesdb\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": [ + "documents.write", + "rows.write" + ], "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", "auth": { "Project": [], "Key": [] @@ -46093,17 +58304,19 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "siteId", - "description": "Site unique ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<SITE_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } @@ -46114,57 +58327,37 @@ "schema": { "type": "object", "properties": { - "variableId": { - "type": "string", - "description": "Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<VARIABLE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" } - }, - "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>" - }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "default": true, - "x-example": false } - }, - "required": [ - "variableId", - "key", - "value" - ] + } } } } } } }, - "\/sites\/{siteId}\/variables\/{variableId}": { + "\/tablesdb\/{databaseId}": { "get": { - "summary": "Get variable", - "operationId": "sitesGetVariable", + "summary": "Get database", + "operationId": "tablesDBGet", "tags": [ - "sites" + "tablesDB" ], - "description": "Get a variable by its unique ID.", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "Variable", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/database" } } } @@ -46172,21 +58365,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getVariable", - "group": "variables", + "method": "get", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "sites\/get-variable.md", + "demo": "tablesdb\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", "auth": { "Project": [], "Key": [] @@ -46200,41 +58394,31 @@ ], "parameters": [ { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] }, "put": { - "summary": "Update variable", - "operationId": "sitesUpdateVariable", + "summary": "Update database", + "operationId": "tablesDBUpdate", "tags": [ - "sites" + "tablesDB" ], - "description": "Update variable by its unique ID.", + "description": "Update a database by its unique ID.", "responses": { "200": { - "description": "Variable", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/variable" + "$ref": "#\/components\/schemas\/database" } } } @@ -46242,21 +58426,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVariable", - "group": "variables", + "method": "update", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "sites\/update-variable.md", + "demo": "tablesdb\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", "auth": { "Project": [], "Key": [] @@ -46270,22 +58455,12 @@ ], "parameters": [ { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -46296,22 +58471,34 @@ "schema": { "type": "object", "properties": { - "key": { + "name": { "type": "string", - "description": "Variable key. Max length: 255 chars.", - "x-example": "<KEY>", - "x-nullable": true + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "value": { + "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 + }, + "specification": { "type": "string", - "description": "Variable value. Max length: 8192 chars.", - "x-example": "<VALUE>", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", "x-nullable": true }, - "secret": { - "type": "boolean", - "description": "Secret variables can be updated or deleted, but only sites can read them during build and runtime.", - "x-example": false, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", "x-nullable": true } } @@ -46321,12 +58508,12 @@ } }, "delete": { - "summary": "Delete variable", - "operationId": "sitesDeleteVariable", + "summary": "Delete database", + "operationId": "tablesDBDelete", "tags": [ - "sites" + "tablesDB" ], - "description": "Delete a variable by its unique ID.", + "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" @@ -46334,21 +58521,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteVariable", - "group": "variables", + "method": "delete", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "sites\/delete-variable.md", + "demo": "tablesdb\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "sites.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", "auth": { "Project": [], "Key": [] @@ -46362,43 +58550,33 @@ ], "parameters": [ { - "name": "siteId", - "description": "Site unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<SITE_ID>" - }, - "in": "path" - }, - { - "name": "variableId", - "description": "Variable unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<VARIABLE_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] } }, - "\/storage\/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", + "\/tablesdb\/{databaseId}\/failovers": { + "post": { + "summary": "Create failover", + "operationId": "tablesDBCreateFailover", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "200": { - "description": "Buckets List", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/bucketList" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -46406,22 +58584,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "listBuckets", - "group": "buckets", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "storage\/list-buckets.md", + "demo": "tablesdb\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "auth": { "Project": [], "Key": [] @@ -46435,88 +58612,14 @@ ], "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, transformations", - "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, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<DATABASE_ID>" }, - "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" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createBucket", - "group": "buckets", - "cookies": false, - "type": "", - "demo": "storage\/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] + "in": "path" } ], "requestBody": { @@ -46525,117 +58628,34 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { + "targetReplicaId": { "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "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 chosen 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": "Compression", - "x-enum-keys": [ - "none", - "gzip", - "zstd" - ] - }, - "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 - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false } - }, - "required": [ - "bucketId", - "name" - ] + } } } } } } }, - "\/storage\/buckets\/{bucketId}": { + "\/tablesdb\/{databaseId}\/operations": { "get": { - "summary": "Get bucket", - "operationId": "storageGetBucket", + "summary": "List operations", + "operationId": "tablesDBListOperations", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Bucket", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/bucket" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -46643,22 +58663,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBucket", - "group": "buckets", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "storage\/get-bucket.md", + "demo": "tablesdb\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "auth": { "Project": [], "Key": [] @@ -46672,31 +58691,67 @@ ], "parameters": [ { - "name": "bucketId", - "description": "Bucket unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - }, - "put": { - "summary": "Update bucket", - "operationId": "storageUpdateBucket", + } + }, + "\/tablesdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "tablesDBGetReplicas", "tags": [ - "storage" + "tablesDB" ], - "description": "Update a storage bucket by its unique ID.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Bucket", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/bucket" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -46704,22 +58759,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateBucket", - "group": "buckets", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "storage\/update-bucket.md", + "demo": "tablesdb\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "auth": { "Project": [], "Key": [] @@ -46733,138 +58787,55 @@ ], "parameters": [ { - "name": "bucketId", - "description": "Bucket unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "fileSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 0B.", - "default": {}, - "x-example": 1, - "format": "int32" - }, - "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 chosen 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": "Compression", - "x-enum-keys": [ - "none", - "gzip", - "zstd" - ] - }, - "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 - }, - "transformations": { - "type": "boolean", - "description": "Are image transformations enabled?", - "default": true, - "x-example": false - } - }, - "required": [ - "name" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete bucket", - "operationId": "storageDeleteBucket", + ] + } + }, + "\/tablesdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "tablesDBGetStatus", "tags": [ - "storage" + "tablesDB" ], - "description": "Delete a storage bucket by its unique ID.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteBucket", - "group": "buckets", + "method": "getStatus", + "group": "tablesdb", "cookies": false, "type": "", - "demo": "storage\/delete-bucket.md", + "demo": "tablesdb\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "auth": { "Project": [], "Key": [] @@ -46878,33 +58849,33 @@ ], "parameters": [ { - "name": "bucketId", - "description": "Bucket unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] } }, - "\/storage\/buckets\/{bucketId}\/files": { + "\/tablesdb\/{databaseId}\/tables": { "get": { - "summary": "List files", - "operationId": "storageListFiles", + "summary": "List tables", + "operationId": "tablesDBListTables", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a list of all the user files. You can use the query params to filter your results.", + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { "200": { - "description": "Files List", + "description": "Tables List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/fileList" + "$ref": "#\/components\/schemas\/tableList" } } } @@ -46912,50 +58883,50 @@ }, "deprecated": false, "x-appwrite": { - "method": "listFiles", - "group": "files", + "method": "listTables", + "group": "tables", "cookies": false, "type": "", - "demo": "storage\/list-files.md", + "demo": "tablesdb\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", "required": false, "schema": { "type": "array", @@ -46991,19 +58962,19 @@ ] }, "post": { - "summary": "Create file", - "operationId": "storageCreateFile", + "summary": "Create table", + "operationId": "tablesDBCreateTable", "tags": [ - "storage" + "tablesDB" ], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/storage#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", "responses": { "201": { - "description": "File", + "description": "Table", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/file" + "$ref": "#\/components\/schemas\/table" } } } @@ -47011,82 +58982,110 @@ }, "deprecated": false, "x-appwrite": { - "method": "createFile", - "group": "files", + "method": "createTable", + "group": "tables", "cookies": false, - "type": "upload", - "demo": "storage\/create-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}", - "scope": "files.write", + "type": "", + "demo": "tablesdb\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ], "requestBody": { "content": { - "multipart\/form-data": { + "application\/json": { "schema": { "type": "object", "properties": { - "fileId": { + "tableId": { "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, + "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": "<TABLE_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, - "file": { + "name": { "type": "string", - "description": "Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https:\/\/appwrite.io\/docs\/products\/storage\/upload-download#input-file).", - "x-example": null, - "format": "binary" + "description": "Table name. Max length: 128 chars.", + "x-example": "<NAME>" }, "permissions": { "type": "array", - "description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" }, "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "columns": { + "type": "array", + "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "indexes": { + "type": "array", + "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } }, "required": [ - "fileId", - "file" + "tableId", + "name" ] } } @@ -47094,21 +59093,21 @@ } } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}": { "get": { - "summary": "Get file", - "operationId": "storageGetFile", + "summary": "Get table", + "operationId": "tablesDBGetTable", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { "200": { - "description": "File", + "description": "Table", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/file" + "$ref": "#\/components\/schemas\/table" } } } @@ -47116,73 +59115,73 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFile", - "group": "files", + "method": "getTable", + "group": "tables", "cookies": false, "type": "", - "demo": "storage\/get-file.md", + "demo": "tablesdb\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_ID>" }, "in": "path" } ] }, "put": { - "summary": "Update file", - "operationId": "storageUpdateFile", + "summary": "Update table", + "operationId": "tablesDBUpdateTable", "tags": [ - "storage" + "tablesDB" ], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "description": "Update a table by its unique ID.", "responses": { "200": { - "description": "File", + "description": "Table", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/file" + "$ref": "#\/components\/schemas\/table" } } } @@ -47190,54 +59189,54 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateFile", - "group": "files", + "method": "updateTable", + "group": "tables", "cookies": false, "type": "", - "demo": "storage\/update-file.md", + "demo": "tablesdb\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Bucket unique ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_ID>" }, "in": "path" } @@ -47250,7 +59249,7 @@ "properties": { "name": { "type": "string", - "description": "File name.", + "description": "Table name. Max length: 128 chars.", "x-example": "<NAME>" }, "permissions": { @@ -47261,6 +59260,24 @@ "type": "string" }, "x-nullable": true + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "type": "boolean", + "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", + "default": true, + "x-example": false + }, + "purge": { + "type": "boolean", + "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", + "default": false, + "x-example": false } } } @@ -47269,12 +59286,12 @@ } }, "delete": { - "summary": "Delete file", - "operationId": "storageDeleteFile", + "summary": "Delete table", + "operationId": "tablesDBDeleteTable", "tags": [ - "storage" + "tablesDB" ], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { "204": { "description": "No content" @@ -47282,76 +59299,75 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteFile", - "group": "files", + "method": "deleteTable", + "group": "tables", "cookies": false, "type": "", - "demo": "storage\/delete-file.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "files.write", + "demo": "tablesdb\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_ID>" }, "in": "path" } ] } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { "get": { - "summary": "Get file for download", - "operationId": "storageGetFileDownload", + "summary": "List columns", + "operationId": "tablesDBListColumns", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "description": "List columns in the table.", "responses": { "200": { - "description": "File", + "description": "Columns List", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/columnList" } } } @@ -47359,89 +59375,231 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFileDownload", - "group": "files", + "method": "listColumns", + "group": "columns", "cookies": false, - "type": "location", - "demo": "storage\/get-file-download.md", + "type": "", + "demo": "tablesdb\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "tables.read", + "collections.read", + "columns.read", + "attributes.read" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID.", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_ID>" }, "in": "path" }, { - "name": "token", - "description": "File token for accessing this file.", + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", "required": false, "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } - ] + ] + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint": { + "post": { + "summary": "Create bigint column", + "operationId": "tablesDBCreateBigIntColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a bigint column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnBigInt", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBigint" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createBigIntColumn", + "group": "columns", + "cookies": false, + "type": "", + "demo": "tablesdb\/create-big-int-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-bigint-column.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview": { - "get": { - "summary": "Get file preview", - "operationId": "storageGetFilePreview", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint\/{key}": { + "patch": { + "summary": "Update bigint column", + "operationId": "tablesDBUpdateBigIntColumn", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "description": "Update a bigint column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "Image", + "description": "ColumnBigInt", "content": { - "image\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/columnBigint" } } } @@ -47449,256 +59607,133 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFilePreview", - "group": "files", + "method": "updateBigIntColumn", + "group": "columns", "cookies": false, - "type": "location", - "demo": "storage\/get-file-preview.md", + "type": "", + "demo": "tablesdb\/update-big-int-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-bigint-column.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID", + "name": "tableId", + "description": "Table ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_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": [ - "center", - "top-left", - "top", - "top-right", - "left", - "right", - "bottom-left", - "bottom", - "bottom-right" - ], - "default": "center" - }, - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": -1, - "default": -1 - }, - "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", - "png", - "webp", - "heic", - "avif", - "gif" - ], - "x-enum-name": "ImageFormat", - "x-enum-keys": [ - "jpg", - "jpeg", - "png", - "webp", - "heic", - "avif", - "gif" - ] - }, - "in": "query" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, + "name": "key", + "description": "Column Key.", + "required": true, "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" + "type": "string" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view": { - "get": { - "summary": "Get file for view", - "operationId": "storageGetFileView", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesDBCreateBooleanColumn", "tags": [ - "storage" + "tablesDB" ], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "description": "Create a boolean column.\n", "responses": { - "200": { - "description": "File", + "202": { + "description": "ColumnBoolean", "content": { - "*\/*": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/columnBoolean" } } } @@ -47706,88 +59741,114 @@ }, "deprecated": false, "x-appwrite": { - "method": "getFileView", - "group": "files", + "method": "createBooleanColumn", + "group": "columns", "cookies": false, - "type": "location", - "demo": "storage\/get-file-view.md", + "type": "", + "demo": "tablesdb\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", "auth": { "Project": [], - "Session": [], - "ImpersonateUserId": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [], - "ImpersonateUserId": [] + "Key": [] } ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<TABLE_ID>" }, "in": "path" - }, - { - "name": "token", - "description": "File token for accessing this file.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TOKEN>", - "default": "" - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/tablesdb": { - "get": { - "summary": "List databases", - "operationId": "tablesDBList", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesDBUpdateBooleanColumn", "tags": [ "tablesDB" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { "200": { - "description": "Databases List", + "description": "ColumnBoolean", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/columnBoolean" } } } @@ -47795,22 +59856,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "tablesdb", + "method": "updateBooleanColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/list.md", + "demo": "tablesdb\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", "auth": { "Project": [], "Key": [] @@ -47824,56 +59890,84 @@ ], "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 columns: name", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<TABLE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "key", + "description": "Column Key.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string" }, - "in": "query" + "in": "path" } - ] - }, - "post": { - "summary": "Create database", - "operationId": "tablesDBCreate", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesDBCreateDatetimeColumn", "tags": [ "tablesDB" ], - "description": "Create a new Database.\n", + "description": "Create a date time column according to the ISO 8601 standard.", "responses": { - "201": { - "description": "Database", + "202": { + "description": "ColumnDatetime", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/columnDatetime" } } } @@ -47881,22 +59975,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "tablesdb", + "method": "createDatetimeColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create.md", + "demo": "tablesdb\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", "auth": { "Project": [], "Key": [] @@ -47908,44 +60007,61 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], "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-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { + "key": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Column Key.", + "x-example": null }, - "enabled": { + "required": { "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, + "description": "Is column required?", "x-example": false }, - "dedicatedDatabaseId": { + "default": { "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", - "default": "", - "x-example": "<DEDICATED_DATABASE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false } }, "required": [ - "databaseId", - "name" + "key", + "required" ] } } @@ -47953,21 +60069,21 @@ } } }, - "\/tablesdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "tablesDBListTransactions", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update datetime column", + "operationId": "tablesDBUpdateDatetimeColumn", "tags": [ "tablesDB" ], - "description": "List transactions across all databases.", + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { "200": { - "description": "Transaction List", + "description": "ColumnDatetime", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transactionList" + "$ref": "#\/components\/schemas\/columnDatetime" } } } @@ -47975,26 +60091,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "updateDatetimeColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/list-transactions.md", + "demo": "tablesdb\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.read", - "rows.read" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", "auth": { "Project": [], "Key": [] @@ -48003,41 +60120,90 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "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).", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { "post": { - "summary": "Create transaction", - "operationId": "tablesDBCreateTransaction", + "summary": "Create email column", + "operationId": "tablesDBCreateEmailColumn", "tags": [ "tablesDB" ], - "description": "Create a new transaction.", + "description": "Create an email column.\n", "responses": { - "201": { - "description": "Transaction", + "202": { + "description": "ColumnEmail", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/columnEmail" } } } @@ -48045,26 +60211,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createEmailColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-transaction.md", + "demo": "tablesdb\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.write", - "rows.write" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", "auth": { "Project": [], "Key": [] @@ -48073,9 +60240,29 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" } ], "requestBody": { @@ -48084,35 +60271,55 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false } - } + }, + "required": [ + "key", + "required" + ] } } } } } }, - "\/tablesdb\/transactions\/{transactionId}": { - "get": { - "summary": "Get transaction", - "operationId": "tablesDBGetTransaction", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesDBUpdateEmailColumn", "tags": [ "tablesDB" ], - "description": "Get a transaction by its unique ID.", + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "Transaction", + "description": "ColumnEmail", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/columnEmail" } } } @@ -48120,26 +60327,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "updateEmailColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/get-transaction.md", + "demo": "tablesdb\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.read", - "rows.read" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", "auth": { "Project": [], "Key": [] @@ -48148,38 +60356,90 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } - ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "tablesDBUpdateTransaction", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "format": "email", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesDBCreateEnumColumn", "tags": [ "tablesDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { - "200": { - "description": "Transaction", + "202": { + "description": "ColumnEnum", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/columnEnum" } } } @@ -48187,26 +60447,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "createEnumColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-transaction.md", + "demo": "tablesdb\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.write", - "rows.write" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", "auth": { "Project": [], "Key": [] @@ -48215,19 +60476,27 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" }, "in": "path" } @@ -48238,58 +60507,91 @@ "schema": { "type": "object", "properties": { - "commit": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { "type": "boolean", - "description": "Commit transaction?", - "default": false, + "description": "Is column required?", "x-example": false }, - "rollback": { + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { "type": "boolean", - "description": "Rollback transaction?", + "description": "Is column an array?", "default": false, "x-example": false } - } + }, + "required": [ + "key", + "elements", + "required" + ] } } } } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "tablesDBDeleteTransaction", + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesDBUpdateEnumColumn", "tags": [ "tablesDB" ], - "description": "Delete a transaction by its unique ID.", + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "updateEnumColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/delete-transaction.md", + "demo": "tablesdb\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.write", - "rows.write" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-transaction.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", "auth": { "Project": [], "Key": [] @@ -48298,40 +60600,98 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } } }, - "\/tablesdb\/transactions\/{transactionId}\/operations": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { "post": { - "summary": "Create operations", - "operationId": "tablesDBCreateOperations", + "summary": "Create float column", + "operationId": "tablesDBCreateFloatColumn", "tags": [ "tablesDB" ], - "description": "Create multiple operations in a single transaction.", + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { - "201": { - "description": "Transaction", + "202": { + "description": "ColumnFloat", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/columnFloat" } } } @@ -48339,26 +60699,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "createFloatColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-operations.md", + "demo": "tablesdb\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "documents.write", - "rows.write" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", "auth": { "Project": [], "Key": [] @@ -48367,19 +60728,27 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" }, "in": "path" } @@ -48390,37 +60759,69 @@ "schema": { "type": "object", "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"tableId\": \"<TABLE_ID>\",\n\t \"rowId\": \"<ROW_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false } - } + }, + "required": [ + "key", + "required" + ] } } } } } }, - "\/tablesdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "tablesDBGet", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesDBUpdateFloatColumn", "tags": [ "tablesDB" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "Database", + "description": "ColumnFloat", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/columnFloat" } } } @@ -48428,22 +60829,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "tablesdb", + "method": "updateFloatColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/get.md", + "demo": "tablesdb\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", "auth": { "Project": [], "Key": [] @@ -48465,23 +60871,91 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] - }, - "put": { - "summary": "Update database", - "operationId": "tablesDBUpdate", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "format": "float", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesDBCreateIntegerColumn", "tags": [ "tablesDB" ], - "description": "Update a database by its unique ID.", + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { - "200": { - "description": "Database", + "202": { + "description": "ColumnInteger", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/columnInteger" } } } @@ -48489,22 +60963,27 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "tablesdb", + "method": "createIntegerColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update.md", + "demo": "tablesdb\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", "auth": { "Project": [], "Key": [] @@ -48526,6 +61005,16 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" } ], "requestBody": { @@ -48534,53 +61023,97 @@ "schema": { "type": "object", "properties": { - "name": { + "key": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Column Key.", + "x-example": null }, - "enabled": { + "required": { "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, + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, "x-example": false } - } + }, + "required": [ + "key", + "required" + ] } } } } - }, - "delete": { - "summary": "Delete database", - "operationId": "tablesDBDelete", + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesDBUpdateIntegerColumn", "tags": [ "tablesDB" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "tablesdb", + "method": "updateIntegerColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/delete.md", + "demo": "tablesdb\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", "auth": { "Project": [], "Key": [] @@ -48602,25 +61135,91 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "format": "int64", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/tablesdb\/{databaseId}\/tables": { - "get": { - "summary": "List tables", - "operationId": "tablesDBListTables", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesDBCreateIpColumn", "tags": [ "tablesDB" ], - "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "description": "Create IP address column.\n", "responses": { - "200": { - "description": "Tables List", + "202": { + "description": "ColumnIP", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/tableList" + "$ref": "#\/components\/schemas\/columnIp" } } } @@ -48628,17 +61227,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTables", - "group": "tables", + "method": "createIpColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/list-tables.md", + "demo": "tablesdb\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.read", - "collections.read" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -48646,7 +61247,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", "auth": { "Project": [], "Key": [] @@ -48665,61 +61266,75 @@ "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity", - "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": "" + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "tableId", + "description": "Table ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<TABLE_ID>" }, - "in": "query" + "in": "path" } - ] - }, - "post": { - "summary": "Create table", - "operationId": "tablesDBCreateTable", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesDBUpdateIpColumn", "tags": [ "tablesDB" ], - "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { - "201": { - "description": "Table", + "200": { + "description": "ColumnIP", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/table" + "$ref": "#\/components\/schemas\/columnIp" } } } @@ -48727,17 +61342,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTable", - "group": "tables", + "method": "updateIpColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-table.md", + "demo": "tablesdb\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ "tables.write", - "collections.write" + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -48745,7 +61362,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", "auth": { "Project": [], "Key": [] @@ -48767,6 +61384,25 @@ "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -48775,62 +61411,27 @@ "schema": { "type": "object", "properties": { - "tableId": { - "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": "<TABLE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { + "required": { "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, + "description": "Is column required?", "x-example": false }, - "columns": { - "type": "array", - "description": "Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.", - "default": [], + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", "x-example": null, - "items": { - "type": "object" - } + "x-nullable": true }, - "indexes": { - "type": "array", - "description": "Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC\/DESC, optional), and lengths (array of integers, optional).", - "default": [], + "newKey": { + "type": "string", + "description": "New Column Key.", "x-example": null, - "items": { - "type": "object" - } + "x-nullable": true } }, "required": [ - "tableId", - "name" + "required", + "default" ] } } @@ -48838,21 +61439,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}": { - "get": { - "summary": "Get table", - "operationId": "tablesDBGetTable", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { + "post": { + "summary": "Create line column", + "operationId": "tablesDBCreateLineColumn", "tags": [ "tablesDB" ], - "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "description": "Create a geometric line column.", "responses": { - "200": { - "description": "Table", + "202": { + "description": "ColumnLine", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/table" + "$ref": "#\/components\/schemas\/columnLine" } } } @@ -48860,17 +61461,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTable", - "group": "tables", + "method": "createLineColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/get-table.md", + "demo": "tablesdb\/create-line-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.read", - "collections.read" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -48878,7 +61481,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", "auth": { "Project": [], "Key": [] @@ -48903,7 +61506,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -48911,22 +61514,62 @@ }, "in": "path" } - ] - }, - "put": { - "summary": "Update table", - "operationId": "tablesDBUpdateTable", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "array", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "x-nullable": true + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { + "patch": { + "summary": "Update line column", + "operationId": "tablesDBUpdateLineColumn", "tags": [ "tablesDB" ], - "description": "Update a table by its unique ID.", + "description": "Update a line column. Changing the `default` value will not update already existing rows.", "responses": { "200": { - "description": "Table", + "description": "ColumnLine", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/table" + "$ref": "#\/components\/schemas\/columnLine" } } } @@ -48934,17 +61577,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTable", - "group": "tables", + "method": "updateLineColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-table.md", + "demo": "tablesdb\/update-line-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ "tables.write", - "collections.write" + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -48952,7 +61597,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", "auth": { "Project": [], "Key": [] @@ -48977,13 +61622,22 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -48992,69 +61646,75 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Table name. Max length: 128 chars.", - "x-example": "<NAME>" + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false }, - "permissions": { + "default": { "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { - "type": "string" + "type": "array", + "items": { + "type": "number", + "format": "double" + } }, "x-nullable": true }, - "rowSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false - }, - "enabled": { - "type": "boolean", - "description": "Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.", - "default": true, - "x-example": false - }, - "purge": { - "type": "boolean", - "description": "When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.", - "default": false, - "x-example": false + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true } - } + }, + "required": [ + "required" + ] } } } } - }, - "delete": { - "summary": "Delete table", - "operationId": "tablesDBDeleteTable", + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + "post": { + "summary": "Create longtext column", + "operationId": "tablesDBCreateLongtextColumn", "tags": [ "tablesDB" ], - "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Create a longtext column.\n", "responses": { - "204": { - "description": "No content" + "202": { + "description": "ColumnLongtext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnLongtext" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTable", - "group": "tables", + "method": "createLongtextColumn", + "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/delete-table.md", + "demo": "tablesdb\/create-longtext-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ "tables.write", - "collections.write" + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -49062,7 +61722,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", "auth": { "Project": [], "Key": [] @@ -49087,7 +61747,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49095,24 +61755,67 @@ }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns": { - "get": { - "summary": "List columns", - "operationId": "tablesDBListColumns", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { + "patch": { + "summary": "Update longtext column", + "operationId": "tablesDBUpdateLongtextColumn", "tags": [ "tablesDB" ], - "description": "List columns in the table.", + "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "Columns List", + "description": "ColumnLongtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnList" + "$ref": "#\/components\/schemas\/columnLongtext" } } } @@ -49120,19 +61823,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "listColumns", + "method": "updateLongtextColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/list-columns.md", + "demo": "tablesdb\/update-longtext-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" + "tables.write", + "collections.write", + "columns.write", + "attributes.write" ], "platforms": [ "console", @@ -49140,7 +61843,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", "auth": { "Project": [], "Key": [] @@ -49165,7 +61868,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49174,47 +61877,64 @@ "in": "path" }, { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "key", + "description": "Column Key.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, + "x-nullable": true + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { "post": { - "summary": "Create bigint column", - "operationId": "tablesDBCreateBigIntColumn", + "summary": "Create mediumtext column", + "operationId": "tablesDBCreateMediumtextColumn", "tags": [ "tablesDB" ], - "description": "Create a bigint column. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a mediumtext column.\n", "responses": { "202": { - "description": "ColumnBigInt", + "description": "ColumnMediumtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnBigint" + "$ref": "#\/components\/schemas\/columnMediumtext" } } } @@ -49222,11 +61942,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createBigIntColumn", + "method": "createMediumtextColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-big-int-column.md", + "demo": "tablesdb\/create-mediumtext-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49242,7 +61962,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-bigint-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", "auth": { "Project": [], "Key": [] @@ -49267,7 +61987,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49292,25 +62012,10 @@ "description": "Is column required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", "x-nullable": true }, "array": { @@ -49318,6 +62023,12 @@ "description": "Is column an array?", "default": false, "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false } }, "required": [ @@ -49330,21 +62041,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/bigint\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { "patch": { - "summary": "Update bigint column", - "operationId": "tablesDBUpdateBigIntColumn", + "summary": "Update mediumtext column", + "operationId": "tablesDBUpdateMediumtextColumn", "tags": [ "tablesDB" ], - "description": "Update a bigint column. Changing the `default` value will not update already existing rows.\n", + "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "ColumnBigInt", + "description": "ColumnMediumtext", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnBigint" + "$ref": "#\/components\/schemas\/columnMediumtext" } } } @@ -49352,11 +62063,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateBigIntColumn", + "method": "updateMediumtextColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-big-int-column.md", + "demo": "tablesdb\/update-mediumtext-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49372,7 +62083,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-bigint-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", "auth": { "Project": [], "Key": [] @@ -49397,7 +62108,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49426,25 +62137,10 @@ "description": "Is column required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", "x-nullable": true }, "newKey": { @@ -49464,21 +62160,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { "post": { - "summary": "Create boolean column", - "operationId": "tablesDBCreateBooleanColumn", + "summary": "Create point column", + "operationId": "tablesDBCreatePointColumn", "tags": [ "tablesDB" ], - "description": "Create a boolean column.\n", + "description": "Create a geometric point column.", "responses": { "202": { - "description": "ColumnBoolean", + "description": "ColumnPoint", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" + "$ref": "#\/components\/schemas\/columnPoint" } } } @@ -49486,11 +62182,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createBooleanColumn", + "method": "createPointColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-boolean-column.md", + "demo": "tablesdb\/create-point-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49506,7 +62202,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", "auth": { "Project": [], "Key": [] @@ -49531,7 +62227,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49557,16 +62253,14 @@ "x-example": false }, "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "type": "number", + "format": "double" + }, "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false } }, "required": [ @@ -49579,21 +62273,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { "patch": { - "summary": "Update boolean column", - "operationId": "tablesDBUpdateBooleanColumn", + "summary": "Update point column", + "operationId": "tablesDBUpdatePointColumn", "tags": [ "tablesDB" ], - "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "description": "Update a point column. Changing the `default` value will not update already existing rows.", "responses": { "200": { - "description": "ColumnBoolean", + "description": "ColumnPoint", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnBoolean" + "$ref": "#\/components\/schemas\/columnPoint" } } } @@ -49601,11 +62295,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateBooleanColumn", + "method": "updatePointColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-boolean-column.md", + "demo": "tablesdb\/update-point-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49621,7 +62315,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", "auth": { "Project": [], "Key": [] @@ -49646,7 +62340,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49676,9 +62370,13 @@ "x-example": false }, "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, + "type": "array", + "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", + "x-example": "[1, 2]", + "items": { + "type": "number", + "format": "double" + }, "x-nullable": true }, "newKey": { @@ -49689,8 +62387,7 @@ } }, "required": [ - "required", - "default" + "required" ] } } @@ -49698,21 +62395,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { "post": { - "summary": "Create datetime column", - "operationId": "tablesDBCreateDatetimeColumn", + "summary": "Create polygon column", + "operationId": "tablesDBCreatePolygonColumn", "tags": [ "tablesDB" ], - "description": "Create a date time column according to the ISO 8601 standard.", + "description": "Create a geometric polygon column.", "responses": { "202": { - "description": "ColumnDatetime", + "description": "ColumnPolygon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" + "$ref": "#\/components\/schemas\/columnPolygon" } } } @@ -49720,11 +62417,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDatetimeColumn", + "method": "createPolygonColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-datetime-column.md", + "demo": "tablesdb\/create-polygon-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49740,7 +62437,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", "auth": { "Project": [], "Key": [] @@ -49765,7 +62462,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49791,17 +62488,20 @@ "x-example": false }, "default": { - "type": "string", - "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false } }, "required": [ @@ -49814,21 +62514,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { "patch": { - "summary": "Update datetime column", - "operationId": "tablesDBUpdateDatetimeColumn", + "summary": "Update polygon column", + "operationId": "tablesDBUpdatePolygonColumn", "tags": [ "tablesDB" ], - "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", "responses": { "200": { - "description": "ColumnDatetime", + "description": "ColumnPolygon", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnDatetime" + "$ref": "#\/components\/schemas\/columnPolygon" } } } @@ -49836,11 +62536,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDatetimeColumn", + "method": "updatePolygonColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-datetime-column.md", + "demo": "tablesdb\/update-polygon-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49856,7 +62556,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", "auth": { "Project": [], "Key": [] @@ -49881,7 +62581,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -49911,10 +62611,19 @@ "x-example": false }, "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", + "type": "array", + "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, "x-nullable": true }, "newKey": { @@ -49925,8 +62634,7 @@ } }, "required": [ - "required", - "default" + "required" ] } } @@ -49934,21 +62642,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { "post": { - "summary": "Create email column", - "operationId": "tablesDBCreateEmailColumn", + "summary": "Create relationship column", + "operationId": "tablesDBCreateRelationshipColumn", "tags": [ "tablesDB" ], - "description": "Create an email column.\n", + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { "202": { - "description": "ColumnEmail", + "description": "ColumnRelationship", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnEmail" + "$ref": "#\/components\/schemas\/columnRelationship" } } } @@ -49956,11 +62664,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEmailColumn", + "method": "createRelationshipColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-email-column.md", + "demo": "tablesdb\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -49976,7 +62684,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", "auth": { "Project": [], "Key": [] @@ -50010,6 +62718,161 @@ "in": "path" } ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "<RELATED_TABLE_ID>" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": "RelationshipType", + "x-enum-keys": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null, + "x-nullable": true + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null, + "x-nullable": true + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [ + "cascade", + "restrict", + "setNull" + ] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesDBCreateStringColumn", + "tags": [ + "tablesDB" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "cookies": false, + "type": "", + "demo": "tablesdb\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "tables.write", + "collections.write", + "columns.write", + "attributes.write" + ], + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", + "deprecated": { + "since": "1.9.0", + "replaceWith": "tablesDB.createTextColumn" + }, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "required": true, + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { @@ -50021,6 +62884,12 @@ "description": "Column Key.", "x-example": null }, + "size": { + "type": "integer", + "description": "Column size for text columns, in number of characters.", + "x-example": 1, + "format": "int32" + }, "required": { "type": "boolean", "description": "Is column required?", @@ -50029,8 +62898,7 @@ "default": { "type": "string", "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", + "x-example": "<DEFAULT>", "x-nullable": true }, "array": { @@ -50038,10 +62906,17 @@ "description": "Is column an array?", "default": false, "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false } }, "required": [ "key", + "size", "required" ] } @@ -50050,33 +62925,33 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { - "summary": "Update email column", - "operationId": "tablesDBUpdateEmailColumn", + "summary": "Update string column", + "operationId": "tablesDBUpdateStringColumn", "tags": [ "tablesDB" ], - "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "ColumnEmail", + "description": "ColumnString", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnEmail" + "$ref": "#\/components\/schemas\/columnString" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "updateEmailColumn", + "method": "updateStringColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-email-column.md", + "demo": "tablesdb\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50092,7 +62967,11 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tablesDB.updateTextColumn" + }, "auth": { "Project": [], "Key": [] @@ -50117,7 +62996,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -50149,8 +63028,14 @@ "default": { "type": "string", "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "email@example.com", - "format": "email", + "x-example": "<DEFAULT>", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1, + "format": "int32", "x-nullable": true }, "newKey": { @@ -50170,21 +63055,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { "post": { - "summary": "Create enum column", - "operationId": "tablesDBCreateEnumColumn", + "summary": "Create text column", + "operationId": "tablesDBCreateTextColumn", "tags": [ "tablesDB" ], - "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "description": "Create a text column.\n", "responses": { "202": { - "description": "ColumnEnum", + "description": "ColumnText", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnEnum" + "$ref": "#\/components\/schemas\/columnText" } } } @@ -50192,11 +63077,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createEnumColumn", + "method": "createTextColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-enum-column.md", + "demo": "tablesdb\/create-text-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50212,7 +63097,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", "auth": { "Project": [], "Key": [] @@ -50237,7 +63122,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -50257,14 +63142,6 @@ "description": "Column Key.", "x-example": null }, - "elements": { - "type": "array", - "description": "Array of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, "required": { "type": "boolean", "description": "Is column required?", @@ -50281,11 +63158,16 @@ "description": "Is column an array?", "default": false, "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false } }, "required": [ "key", - "elements", "required" ] } @@ -50294,21 +63176,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { "patch": { - "summary": "Update enum column", - "operationId": "tablesDBUpdateEnumColumn", + "summary": "Update text column", + "operationId": "tablesDBUpdateTextColumn", "tags": [ "tablesDB" ], - "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "ColumnEnum", + "description": "ColumnText", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnEnum" + "$ref": "#\/components\/schemas\/columnText" } } } @@ -50316,11 +63198,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEnumColumn", + "method": "updateTextColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-enum-column.md", + "demo": "tablesdb\/update-text-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50336,7 +63218,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", "auth": { "Project": [], "Key": [] @@ -50361,7 +63243,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -50385,14 +63267,6 @@ "schema": { "type": "object", "properties": { - "elements": { - "type": "array", - "description": "Updated list of enum values.", - "x-example": null, - "items": { - "type": "string" - } - }, "required": { "type": "boolean", "description": "Is column required?", @@ -50412,7 +63286,6 @@ } }, "required": [ - "elements", "required", "default" ] @@ -50422,21 +63295,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { "post": { - "summary": "Create float column", - "operationId": "tablesDBCreateFloatColumn", + "summary": "Create URL column", + "operationId": "tablesDBCreateUrlColumn", "tags": [ "tablesDB" ], - "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a URL column.\n", "responses": { "202": { - "description": "ColumnFloat", + "description": "ColumnURL", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnFloat" + "$ref": "#\/components\/schemas\/columnUrl" } } } @@ -50444,11 +63317,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createFloatColumn", + "method": "createUrlColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-float-column.md", + "demo": "tablesdb\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50464,7 +63337,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", "auth": { "Project": [], "Key": [] @@ -50514,25 +63387,11 @@ "description": "Is column required?", "x-example": false }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", "x-nullable": true }, "array": { @@ -50552,21 +63411,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { - "summary": "Update float column", - "operationId": "tablesDBUpdateFloatColumn", + "summary": "Update URL column", + "operationId": "tablesDBUpdateUrlColumn", "tags": [ "tablesDB" ], - "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "ColumnFloat", + "description": "ColumnURL", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnFloat" + "$ref": "#\/components\/schemas\/columnUrl" } } } @@ -50574,11 +63433,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateFloatColumn", + "method": "updateUrlColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-float-column.md", + "demo": "tablesdb\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50594,7 +63453,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", "auth": { "Project": [], "Key": [] @@ -50648,25 +63507,11 @@ "description": "Is column required?", "x-example": false }, - "min": { - "type": "number", - "description": "Minimum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value", - "x-example": null, - "format": "float", - "x-nullable": true - }, "default": { - "type": "number", - "description": "Default value. Cannot be set when required.", - "x-example": null, - "format": "float", + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "format": "url", "x-nullable": true }, "newKey": { @@ -50686,21 +63531,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { "post": { - "summary": "Create integer column", - "operationId": "tablesDBCreateIntegerColumn", + "summary": "Create varchar column", + "operationId": "tablesDBCreateVarcharColumn", "tags": [ "tablesDB" ], - "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "description": "Create a varchar column.\n", "responses": { "202": { - "description": "ColumnInteger", + "description": "ColumnVarchar", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnInteger" + "$ref": "#\/components\/schemas\/columnVarchar" } } } @@ -50708,11 +63553,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIntegerColumn", + "method": "createVarcharColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-integer-column.md", + "demo": "tablesdb\/create-varchar-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50728,7 +63573,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", "auth": { "Project": [], "Key": [] @@ -50753,7 +63598,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -50773,30 +63618,21 @@ "description": "Column Key.", "x-example": null }, + "size": { + "type": "integer", + "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", + "x-example": 1, + "format": "int32" + }, "required": { "type": "boolean", "description": "Is column required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, "default": { - "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", "x-nullable": true }, "array": { @@ -50804,10 +63640,17 @@ "description": "Is column an array?", "default": false, "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false } }, "required": [ "key", + "size", "required" ] } @@ -50816,21 +63659,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { "patch": { - "summary": "Update integer column", - "operationId": "tablesDBUpdateIntegerColumn", + "summary": "Update varchar column", + "operationId": "tablesDBUpdateVarcharColumn", "tags": [ "tablesDB" ], - "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", "responses": { "200": { - "description": "ColumnInteger", + "description": "ColumnVarchar", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnInteger" + "$ref": "#\/components\/schemas\/columnVarchar" } } } @@ -50838,11 +63681,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateIntegerColumn", + "method": "updateVarcharColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-integer-column.md", + "demo": "tablesdb\/update-varchar-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -50858,7 +63701,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", "auth": { "Project": [], "Key": [] @@ -50883,7 +63726,7 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -50912,25 +63755,17 @@ "description": "Is column required?", "x-example": false }, - "min": { - "type": "integer", - "description": "Minimum value", - "x-example": null, - "format": "int64", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value", - "x-example": null, - "format": "int64", + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "<DEFAULT>", "x-nullable": true }, - "default": { + "size": { "type": "integer", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "format": "int64", + "description": "Maximum size of the varchar column.", + "x-example": 1, + "format": "int32", "x-nullable": true }, "newKey": { @@ -50950,21 +63785,103 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip": { - "post": { - "summary": "Create IP address column", - "operationId": "tablesDBCreateIpColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesDBGetColumn", "tags": [ "tablesDB" ], - "description": "Create IP address column.\n", + "description": "Get column by ID.", "responses": { - "202": { - "description": "ColumnIP", + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnIp" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } } } } @@ -50972,19 +63889,19 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIpColumn", + "method": "getColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-ip-column.md", + "demo": "tablesdb\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "tables.read", + "collections.read", + "columns.read", + "attributes.read" ], "platforms": [ "console", @@ -50992,7 +63909,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", "auth": { "Project": [], "Key": [] @@ -51024,74 +63941,37 @@ "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { - "patch": { - "summary": "Update IP address column", - "operationId": "tablesDBUpdateIpColumn", + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDBDeleteColumn", "tags": [ "tablesDB" ], - "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "description": "Deletes a column.", "responses": { - "200": { - "description": "ColumnIP", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnIp" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateIpColumn", + "method": "deleteColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/update-ip-column.md", + "demo": "tablesdb\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -51107,7 +63987,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", "auth": { "Project": [], "Key": [] @@ -51134,71 +64014,39 @@ "name": "tableId", "description": "Table ID.", "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value. Cannot be set when column is required.", - "x-example": null, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "schema": { + "type": "string", + "x-example": "<TABLE_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line": { - "post": { - "summary": "Create line column", - "operationId": "tablesDBCreateLineColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesDBUpdateRelationshipColumn", "tags": [ "tablesDB" ], - "description": "Create a geometric line column.", + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { - "202": { - "description": "ColumnLine", + "200": { + "description": "ColumnRelationship", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnLine" + "$ref": "#\/components\/schemas\/columnRelationship" } } } @@ -51206,11 +64054,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createLineColumn", + "method": "updateRelationshipColumn", "group": "columns", "cookies": false, "type": "", - "demo": "tablesdb\/create-line-column.md", + "demo": "tablesdb\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -51226,7 +64074,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-line-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", "auth": { "Project": [], "Key": [] @@ -51251,13 +64099,22 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -51266,55 +64123,51 @@ "schema": { "type": "object", "properties": { - "key": { + "onDelete": { "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": "RelationMutate", + "x-enum-keys": [ + "cascade", + "restrict", + "setNull" + ], + "x-nullable": true }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null, "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/line\/{key}": { - "patch": { - "summary": "Update line column", - "operationId": "tablesDBUpdateLineColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesDBListIndexes", "tags": [ "tablesDB" ], - "description": "Update a line column. Changing the `default` value will not update already existing rows.", + "description": "List indexes on the table.", "responses": { "200": { - "description": "ColumnLine", + "description": "Column Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnLine" + "$ref": "#\/components\/schemas\/columnIndexList" } } } @@ -51322,19 +64175,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLineColumn", - "group": "columns", + "method": "listIndexes", + "group": "indexes", "cookies": false, "type": "", - "demo": "tablesdb\/update-line-column.md", + "demo": "tablesdb\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "tables.read", + "collections.read", + "indexes.read" ], "platforms": [ "console", @@ -51342,7 +64194,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-line-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", "auth": { "Project": [], "Key": [] @@ -51367,7 +64219,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -51376,70 +64228,45 @@ "in": "path" }, { - "name": "key", - "description": "Column Key.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1, 2], [3, 4], [5, 6]]", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext": { + ] + }, "post": { - "summary": "Create longtext column", - "operationId": "tablesDBCreateLongtextColumn", + "summary": "Create index", + "operationId": "tablesDBCreateIndex", "tags": [ "tablesDB" ], - "description": "Create a longtext column.\n", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", "responses": { "202": { - "description": "ColumnLongtext", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" + "$ref": "#\/components\/schemas\/columnIndex" } } } @@ -51447,19 +64274,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "createLongtextColumn", - "group": "columns", + "method": "createIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "tablesdb\/create-longtext-column.md", + "demo": "tablesdb\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ "tables.write", "collections.write", - "columns.write", - "attributes.write" + "indexes.write" ], "platforms": [ "console", @@ -51467,7 +64293,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-longtext-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", "auth": { "Project": [], "Key": [] @@ -51509,36 +64335,67 @@ "properties": { "key": { "type": "string", - "description": "Column Key.", + "description": "Index Key.", "x-example": null }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { + "type": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique", + "spatial" + ], + "x-enum-name": "TablesDBIndexType", + "x-enum-keys": [ + "key", + "fulltext", + "unique", + "spatial" + ] }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } } }, "required": [ "key", - "required" + "type", + "columns" ] } } @@ -51546,21 +64403,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/longtext\/{key}": { - "patch": { - "summary": "Update longtext column", - "operationId": "tablesDBUpdateLongtextColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesDBGetIndex", "tags": [ "tablesDB" ], - "description": "Update a longtext column. Changing the `default` value will not update already existing rows.\n", + "description": "Get index by ID.", "responses": { "200": { - "description": "ColumnLongtext", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnLongtext" + "$ref": "#\/components\/schemas\/columnIndex" } } } @@ -51568,19 +64425,18 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLongtextColumn", - "group": "columns", + "method": "getIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "tablesdb\/update-longtext-column.md", + "demo": "tablesdb\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "tables.read", + "collections.read", + "indexes.read" ], "platforms": [ "console", @@ -51588,7 +64444,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-longtext-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", "auth": { "Project": [], "Key": [] @@ -51623,83 +64479,41 @@ }, { "name": "key", - "description": "Column Key.", + "description": "Index Key.", "required": true, "schema": { "type": "string" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext": { - "post": { - "summary": "Create mediumtext column", - "operationId": "tablesDBCreateMediumtextColumn", + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDBDeleteIndex", "tags": [ "tablesDB" ], - "description": "Create a mediumtext column.\n", + "description": "Delete an index.", "responses": { - "202": { - "description": "ColumnMediumtext", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createMediumtextColumn", - "group": "columns", + "method": "deleteIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "tablesdb\/create-mediumtext-column.md", + "demo": "tablesdb\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ "tables.write", "collections.write", - "columns.write", - "attributes.write" + "indexes.write" ], "platforms": [ "console", @@ -51707,7 +64521,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-mediumtext-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", "auth": { "Project": [], "Key": [] @@ -51732,75 +64546,41 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/mediumtext\/{key}": { - "patch": { - "summary": "Update mediumtext column", - "operationId": "tablesDBUpdateMediumtextColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", "tags": [ "tablesDB" ], - "description": "Update a mediumtext column. Changing the `default` value will not update already existing rows.\n", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "ColumnMediumtext", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnMediumtext" + "$ref": "#\/components\/schemas\/rowList" } } } @@ -51808,36 +64588,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMediumtextColumn", - "group": "columns", + "method": "listRows", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-mediumtext-column.md", + "demo": "tablesdb\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.read", + "documents.read" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-mediumtext-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -51853,7 +64634,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", "required": true, "schema": { "type": "string", @@ -51862,64 +64643,67 @@ "in": "path" }, { - "name": "key", - "description": "Column Key.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required", - "default" - ] - } - } + "in": "query" } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point": { + ] + }, "post": { - "summary": "Create point column", - "operationId": "tablesDBCreatePointColumn", + "summary": "Create row", + "operationId": "tablesDBCreateRow", "tags": [ "tablesDB" ], - "description": "Create a geometric point column.", + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", "responses": { - "202": { - "description": "ColumnPoint", + "201": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnPoint" + "$ref": "#\/components\/schemas\/row" } } } @@ -51927,36 +64711,100 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPointColumn", - "group": "columns", + "method": "createRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-point-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + }, + { + "name": "createRows", + "namespace": "tablesDB", + "desc": "Create rows", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-rows.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -51972,7 +64820,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -51987,52 +64835,68 @@ "schema": { "type": "object", "properties": { - "key": { + "rowId": { "type": "string", - "description": "Column Key.", - "x-example": null + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<ROW_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, - "default": { + "permissions": { "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", "items": { - "type": "number", - "format": "double" + "type": "string" }, "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", + "x-nullable": true } }, "required": [ - "key", - "required" + "rowId", + "data" ] } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/point\/{key}": { - "patch": { - "summary": "Update point column", - "operationId": "tablesDBUpdatePointColumn", + }, + "put": { + "summary": "Upsert rows", + "operationId": "tablesDBUpsertRows", "tags": [ "tablesDB" ], - "description": "Update a point column. Changing the `default` value will not update already existing rows.", + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", "responses": { - "200": { - "description": "ColumnPoint", + "201": { + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnPoint" + "$ref": "#\/components\/schemas\/rowList" } } } @@ -52040,19 +64904,17 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePointColumn", - "group": "columns", + "method": "upsertRows", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-point-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", @@ -52060,7 +64922,38 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-point-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", + "methods": [ + { + "name": "upsertRows", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "demo": "tablesdb\/upsert-rows.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -52085,22 +64978,13 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" } ], "requestBody": { @@ -52109,52 +64993,43 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { + "rows": { "type": "array", - "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[1, 2]", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, "items": { - "type": "number", - "format": "double" - }, - "x-nullable": true + "type": "object" + } }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Column Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true } }, "required": [ - "required" + "rows" ] } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon": { - "post": { - "summary": "Create polygon column", - "operationId": "tablesDBCreatePolygonColumn", + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesDBUpdateRows", "tags": [ "tablesDB" ], - "description": "Create a geometric polygon column.", + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { - "202": { - "description": "ColumnPolygon", + "200": { + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" + "$ref": "#\/components\/schemas\/rowList" } } } @@ -52162,19 +65037,17 @@ }, "deprecated": false, "x-appwrite": { - "method": "createPolygonColumn", - "group": "columns", + "method": "updateRows", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", @@ -52182,7 +65055,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-polygon-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", "auth": { "Project": [], "Key": [] @@ -52207,7 +65080,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -52222,58 +65095,47 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "default": { + "queries": { "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true } - }, - "required": [ - "key", - "required" - ] + } } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/polygon\/{key}": { - "patch": { - "summary": "Update polygon column", - "operationId": "tablesDBUpdatePolygonColumn", + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDBDeleteRows", "tags": [ "tablesDB" ], - "description": "Update a polygon column. Changing the `default` value will not update already existing rows.", + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { "200": { - "description": "ColumnPolygon", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnPolygon" + "$ref": "#\/components\/schemas\/rowList" } } } @@ -52281,19 +65143,17 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePolygonColumn", - "group": "columns", + "method": "deleteRows", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-polygon-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", @@ -52301,7 +65161,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-polygon-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", "auth": { "Project": [], "Key": [] @@ -52326,7 +65186,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -52335,110 +65195,84 @@ "in": "path" }, { - "name": "key", - "description": "Column Key.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query 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": "string" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "array", - "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - }, - "required": [ - "required" - ] - } - } + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } - } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { - "post": { - "summary": "Create relationship column", - "operationId": "tablesDBCreateRelationshipColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesDBGetRow", "tags": [ "tablesDB" ], - "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { - "202": { - "description": "ColumnRelationship", + "200": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" + "$ref": "#\/components\/schemas\/row" } } } } }, "deprecated": false, - "x-appwrite": { - "method": "createRelationshipColumn", - "group": "columns", + "x-appwrite": { + "method": "getRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-relationship-column.md", + "demo": "tablesdb\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.read", + "documents.read" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -52454,146 +65288,134 @@ }, { "name": "tableId", - "description": "Table ID.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "relatedTableId": { - "type": "string", - "description": "Related Table ID.", - "x-example": "<RELATED_TABLE_ID>" - }, - "type": { - "type": "string", - "description": "Relation type", - "x-example": "oneToOne", - "enum": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ], - "x-enum-name": "RelationshipType", - "x-enum-keys": [ - "oneToOne", - "manyToOne", - "manyToMany", - "oneToMany" - ] - }, - "twoWay": { - "type": "boolean", - "description": "Is Two Way?", - "default": false, - "x-example": false - }, - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null, - "x-nullable": true - }, - "twoWayKey": { - "type": "string", - "description": "Two Way Column Key.", - "x-example": null, - "x-nullable": true - }, - "onDelete": { - "type": "string", - "description": "Constraints option", - "default": "restrict", - "x-example": "cascade", - "enum": [ - "cascade", - "restrict", - "setNull" - ], - "x-enum-name": "RelationMutate", - "x-enum-keys": [ - "cascade", - "restrict", - "setNull" - ] - } - }, - "required": [ - "relatedTableId", - "type" - ] - } - } - } - } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string": { - "post": { - "summary": "Create string column", - "operationId": "tablesDBCreateStringColumn", + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", "tags": [ "tablesDB" ], - "description": "Create a string column.\n", + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", "responses": { - "202": { - "description": "ColumnString", + "201": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnString" + "$ref": "#\/components\/schemas\/row" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createStringColumn", - "group": "columns", + "method": "upsertRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-string-column.md", - "deprecated": { - "since": "1.9.0", - "replaceWith": "tablesDB.createTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -52609,13 +65431,23 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" } ], "requestBody": { @@ -52624,108 +65456,85 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for text columns, in number of characters.", - "x-example": 1, - "format": "int32" + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true }, - "default": { + "transactionId": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false } - }, - "required": [ - "key", - "size", - "required" - ] + } } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + }, "patch": { - "summary": "Update string column", - "operationId": "tablesDBUpdateStringColumn", + "summary": "Update row", + "operationId": "tablesDBUpdateRow", "tags": [ "tablesDB" ], - "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { "200": { - "description": "ColumnString", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnString" + "$ref": "#\/components\/schemas\/row" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateStringColumn", - "group": "columns", + "method": "updateRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-string-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-string-column.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tablesDB.updateTextColumn" - }, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -52741,7 +65550,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -52750,11 +65559,12 @@ "in": "path" }, { - "name": "key", - "description": "Column Key.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "<ROW_ID>" }, "in": "path" } @@ -52765,93 +65575,78 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, - "size": { - "type": "integer", - "description": "Maximum size of the string column.", - "x-example": 1, - "format": "int32", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, "x-nullable": true }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Column Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true } - }, - "required": [ - "required", - "default" - ] + } } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text": { - "post": { - "summary": "Create text column", - "operationId": "tablesDBCreateTextColumn", + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", "tags": [ "tablesDB" ], - "description": "Create a text column.\n", + "description": "Delete a row by its unique ID.", "responses": { - "202": { - "description": "ColumnText", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnText" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createTextColumn", - "group": "columns", + "method": "deleteRow", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-text-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ @@ -52874,68 +65669,45 @@ "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false - } - }, - "required": [ - "key", - "required" - ] - } - } - } - } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/text\/{key}": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { - "summary": "Update text column", - "operationId": "tablesDBUpdateTextColumn", + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", "tags": [ "tablesDB" ], - "description": "Update a text column. Changing the `default` value will not update already existing rows.\n", + "description": "Decrement a specific column of a row by a given value.", "responses": { "200": { - "description": "ColumnText", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnText" + "$ref": "#\/components\/schemas\/row" } } } @@ -52943,35 +65715,36 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTextColumn", - "group": "columns", + "method": "decrementRowColumn", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-text-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-text-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -52988,7 +65761,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -52997,8 +65770,18 @@ "in": "path" }, { - "name": "key", - "description": "Column Key.", + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", "required": true, "schema": { "type": "string" @@ -53012,49 +65795,48 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", "x-nullable": true }, - "newKey": { + "transactionId": { "type": "string", - "description": "New Column Key.", - "x-example": null, + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true } - }, - "required": [ - "required", - "default" - ] + } } } } } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url": { - "post": { - "summary": "Create URL column", - "operationId": "tablesDBCreateUrlColumn", + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", "tags": [ "tablesDB" ], - "description": "Create a URL column.\n", + "description": "Increment a specific column of a row by a given value.", "responses": { - "202": { - "description": "ColumnURL", + "200": { + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnUrl" + "$ref": "#\/components\/schemas\/row" } } } @@ -53062,35 +65844,36 @@ }, "deprecated": false, "x-appwrite": { - "method": "createUrlColumn", - "group": "columns", + "method": "incrementRowColumn", + "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-url-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" + "rows.write", + "documents.write" ], "platforms": [ - "console", - "server" + "client", + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], + "Session": [], + "JWT": [], "Key": [] } ], @@ -53114,6 +65897,25 @@ "x-example": "<TABLE_ID>" }, "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<ROW_ID>" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -53122,55 +65924,48 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", + "x-nullable": true }, - "default": { + "transactionId": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>", "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false } - }, - "required": [ - "key", - "required" - ] + } } } } } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { - "patch": { - "summary": "Update URL column", - "operationId": "tablesDBUpdateUrlColumn", + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", "tags": [ - "tablesDB" + "teams" ], - "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "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": "ColumnURL", + "description": "Teams List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnUrl" + "$ref": "#\/components\/schemas\/teamList" } } } @@ -53178,67 +65973,123 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateUrlColumn", - "group": "columns", + "method": "list", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/update-url-column.md", + "demo": "teams\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan", + "required": false, "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "tableId", - "description": "Table ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Column Key.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] } ], "requestBody": { @@ -53247,28 +66098,34 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { + "teamId": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "format": "url", - "x-nullable": true + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "newKey": { + "name": { "type": "string", - "description": "New Column Key.", + "description": "Team name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], "x-example": null, - "x-nullable": true + "items": { + "type": "string" + } } }, "required": [ - "required", - "default" + "teamId", + "name" ] } } @@ -53276,21 +66133,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar": { - "post": { - "summary": "Create varchar column", - "operationId": "tablesDBCreateVarcharColumn", + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", "tags": [ - "tablesDB" + "teams" ], - "description": "Create a varchar column.\n", + "description": "Get a team by its ID. All team members have read access for this resource.", "responses": { - "202": { - "description": "ColumnVarchar", + "200": { + "description": "Team", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" + "$ref": "#\/components\/schemas\/team" } } } @@ -53298,56 +66155,108 @@ }, "deprecated": false, "x-appwrite": { - "method": "createVarcharColumn", - "group": "columns", + "method": "get", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/create-varchar-column.md", + "demo": "teams\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-varchar-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateName", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" } @@ -53358,67 +66267,93 @@ "schema": { "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": null - }, - "size": { - "type": "integer", - "description": "Column size for varchar columns, in number of characters. Maximum size is 16381.", - "x-example": 1, - "format": "int32" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { + "name": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "default": false, - "x-example": false - }, - "encrypt": { - "type": "boolean", - "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", - "default": false, - "x-example": false + "description": "New team name. Max length: 128 chars.", + "x-example": "<NAME>" } }, "required": [ - "key", - "size", - "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" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TEAM_ID>" + }, + "in": "path" + } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/varchar\/{key}": { - "patch": { - "summary": "Update varchar column", - "operationId": "tablesDBUpdateVarcharColumn", + "\/teams\/{teamId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "teamsListInstallations", "tags": [ - "tablesDB" + "teams" ], - "description": "Update a varchar column. Changing the `default` value will not update already existing rows.\n", + "description": "List app installations on a team. Any team member can read installations.", "responses": { "200": { - "description": "ColumnVarchar", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnVarchar" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -53426,65 +66361,130 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateVarcharColumn", - "group": "columns", + "method": "listInstallations", + "group": null, "cookies": false, "type": "", - "demo": "tablesdb\/update-varchar-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-varchar-column.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query 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": "string", - "x-example": "<TABLE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "key", - "description": "Column Key.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", + "tags": [ + "teams" + ], + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "<TEAM_ID>" }, "in": "path" } @@ -53495,34 +66495,20 @@ "schema": { "type": "object", "properties": { - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": false - }, - "default": { + "appId": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "<DEFAULT>", - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Maximum size of the varchar column.", - "x-example": 1, - "format": "int32", - "x-nullable": true + "description": "Application unique ID.", + "x-example": "<APP_ID>" }, - "newKey": { + "authorizationDetails": { "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "<AUTHORIZATION_DETAILS>" } }, "required": [ - "required", - "default" + "appId" ] } } @@ -53530,103 +66516,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/teams\/{teamId}\/installations\/{installationId}": { "get": { - "summary": "Get column", - "operationId": "tablesDBGetColumn", + "summary": "Get Installation", + "operationId": "teamsGetInstallation", "tags": [ - "tablesDB" + "teams" ], - "description": "Get column by ID.", + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", "responses": { "200": { - "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -53634,285 +66538,233 @@ }, "deprecated": false, "x-appwrite": { - "method": "getColumn", - "group": "columns", + "method": "getInstallation", + "group": null, "cookies": false, "type": "", - "demo": "tablesdb\/get-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "columns.read", - "attributes.read" - ], + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-column.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } ] }, - "delete": { - "summary": "Delete column", - "operationId": "tablesDBDeleteColumn", + "put": { + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", "tags": [ - "tablesDB" + "teams" ], - "description": "Deletes a column.", + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteColumn", - "group": "columns", + "method": "updateInstallation", + "group": null, "cookies": false, "type": "", - "demo": "tablesdb\/delete-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-column.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<INSTALLATION_ID>" }, "in": "path" } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { - "patch": { - "summary": "Update relationship column", - "operationId": "tablesDBUpdateRelationshipColumn", - "tags": [ - "tablesDB" ], - "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", - "responses": { - "200": { - "description": "ColumnRelationship", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/columnRelationship" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "<AUTHORIZATION_DETAILS>", + "x-nullable": true + } } } } } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", + "tags": [ + "teams" + ], + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } }, "deprecated": false, "x-appwrite": { - "method": "updateRelationshipColumn", - "group": "columns", + "method": "deleteInstallation", + "group": null, "cookies": false, "type": "", - "demo": "tablesdb\/update-relationship-column.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "columns.write", - "attributes.write" - ], + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-relationship-column.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "installationId", + "description": "Installation unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Column Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<INSTALLATION_ID>" }, "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": [ - "cascade", - "restrict", - "setNull" - ], - "x-nullable": true - }, - "newKey": { - "type": "string", - "description": "New Column Key.", - "x-example": null, - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/teams\/{teamId}\/memberships": { "get": { - "summary": "List indexes", - "operationId": "tablesDBListIndexes", + "summary": "List team memberships", + "operationId": "teamsListMemberships", "tags": [ - "tablesDB" + "teams" ], - "description": "List indexes on the table.", + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { - "description": "Column Indexes List", + "description": "Memberships List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnIndexList" + "$ref": "#\/components\/schemas\/membershipList" } } } @@ -53920,61 +66772,50 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIndexes", - "group": "indexes", + "method": "listMemberships", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/list-indexes.md", + "demo": "teams\/list-memberships.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "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 columns: key, type, status, attributes, error", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, roles", "required": false, "schema": { "type": "array", @@ -53985,6 +66826,17 @@ }, "in": "query" }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -53999,19 +66851,19 @@ ] }, "post": { - "summary": "Create index", - "operationId": "tablesDBCreateIndex", + "summary": "Create team membership", + "operationId": "teamsCreateMembership", "tags": [ - "tablesDB" + "teams" ], - "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nType can be `key`, `fulltext`, or `unique`.", + "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", "responses": { - "202": { - "description": "Index", + "201": { + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnIndex" + "$ref": "#\/components\/schemas\/membership" } } } @@ -54019,55 +66871,44 @@ }, "deprecated": false, "x-appwrite": { - "method": "createIndex", - "group": "indexes", + "method": "createMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/create-index.md", - "rate-limit": 0, + "demo": "teams\/create-membership.md", + "rate-limit": 10, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], + "scope": "teams.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" } @@ -54078,69 +66919,50 @@ "schema": { "type": "object", "properties": { - "key": { + "email": { "type": "string", - "description": "Index Key.", - "x-example": null + "description": "Email of the new team member.", + "default": "", + "x-example": "email@example.com", + "format": "email" }, - "type": { + "userId": { "type": "string", - "description": "Index type.", - "x-example": "key", - "enum": [ - "key", - "fulltext", - "unique", - "spatial" - ], - "x-enum-name": "TablesDBIndexType", - "x-enum-keys": [ - "key", - "fulltext", - "unique", - "spatial" - ] + "description": "ID of the user to be added to a team.", + "default": "", + "x-example": "<USER_ID>" }, - "columns": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "default": "", + "x-example": "+12065550100", + "format": "phone" + }, + "roles": { "type": "array", - "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", "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", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] - } + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" } }, "required": [ - "key", - "type", - "columns" + "roles" ] } } @@ -54148,21 +66970,21 @@ } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/teams\/{teamId}\/memberships\/{membershipId}": { "get": { - "summary": "Get index", - "operationId": "tablesDBGetIndex", + "summary": "Get team membership", + "operationId": "teamsGetMembership", "tags": [ - "tablesDB" + "teams" ], - "description": "Get index by ID.", + "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", "responses": { "200": { - "description": "Index", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/columnIndex" + "$ref": "#\/components\/schemas\/membership" } } } @@ -54170,162 +66992,73 @@ }, "deprecated": false, "x-appwrite": { - "method": "getIndex", - "group": "indexes", + "method": "getMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/get-index.md", + "demo": "teams\/get-membership.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.read", - "collections.read", - "indexes.read" - ], + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" } ] }, - "delete": { - "summary": "Delete index", - "operationId": "tablesDBDeleteIndex", - "tags": [ - "tablesDB" - ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "cookies": false, - "type": "", - "demo": "tablesdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": [ - "tables.write", - "collections.write", - "indexes.write" - ], - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { - "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", + "patch": { + "summary": "Update team membership", + "operationId": "teamsUpdateMembership", "tags": [ - "tablesDB" + "teams" ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", "responses": { "200": { - "description": "Rows List", + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/membership" } } } @@ -54333,18 +67066,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRows", - "group": "rows", + "method": "updateMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/list-rows.md", + "demo": "teams\/update-membership.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], + "scope": "teams.write", "platforms": [ "console", "client", @@ -54352,7 +67082,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "auth": { "Project": [], "Session": [] @@ -54368,177 +67098,80 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query 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" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" } - ] + ], + "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 81 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "roles" + ] + } + } + } + } }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", + "delete": { + "summary": "Delete team membership", + "operationId": "teamsDeleteMembership", "tags": [ - "tablesDB" + "teams" ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "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": { - "201": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createRow", - "group": "rows", + "method": "deleteMembership", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/create-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - }, - { - "name": "createRows", - "namespace": "tablesDB", - "desc": "Create rows", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-rows.md", - "public": true - } + "demo": "teams\/delete-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "auth": { "Project": [], "Session": [] @@ -54554,91 +67187,43 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": "", - "x-example": "<ROW_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "data": { - "type": "object", - "description": "Row data as JSON object.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } - }, - "put": { - "summary": "Upsert rows", - "operationId": "tablesDBUpsertRows", + ] + } + }, + "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "patch": { + "summary": "Update team membership status", + "operationId": "teamsUpdateMembershipStatus", "tags": [ - "tablesDB" + "teams" ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", + "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": { - "201": { - "description": "Rows List", + "200": { + "description": "Membership", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/membership" } } } @@ -54646,85 +67231,53 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertRows", - "group": "rows", + "method": "updateMembershipStatus", + "group": "memberships", "cookies": false, "type": "", - "demo": "tablesdb\/upsert-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/update-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-rows.md", - "methods": [ - { - "name": "upsertRows", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.\n", - "demo": "tablesdb\/upsert-rows.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" }, { - "name": "tableId", - "description": "Table ID.", + "name": "membershipId", + "description": "Membership ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<MEMBERSHIP_ID>" }, "in": "path" } @@ -54735,43 +67288,42 @@ "schema": { "type": "object", "properties": { - "rows": { - "type": "array", - "description": "Array of row data as JSON objects. May contain partial rows.", - "x-example": null, - "items": { - "type": "object" - } + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "<USER_ID>" }, - "transactionId": { + "secret": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true + "description": "Secret key.", + "x-example": "<SECRET>" } }, "required": [ - "rows" + "userId", + "secret" ] } } } } - }, - "patch": { - "summary": "Update rows", - "operationId": "tablesDBUpdateRows", + } + }, + "\/teams\/{teamId}\/prefs": { + "get": { + "summary": "Get team preferences", + "operationId": "teamsGetPrefs", "tags": [ - "tablesDB" + "teams" ], - "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", "responses": { "200": { - "description": "Rows List", + "description": "Preferences", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/preferences" } } } @@ -54779,105 +67331,62 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRows", - "group": "rows", + "method": "getPrefs", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/update-rows.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<TEAM_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only column and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true - } - } - } - } - } - } + ] }, - "delete": { - "summary": "Delete rows", - "operationId": "tablesDBDeleteRows", + "put": { + "summary": "Update team preferences", + "operationId": "teamsUpdatePrefs", "tags": [ - "tablesDB" + "teams" ], - "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "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": "Rows List", + "description": "Preferences", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/preferences" } } } @@ -54885,98 +67394,84 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteRows", - "group": "rows", + "method": "updatePrefs", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/delete-rows.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "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.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": [ + "prefs" + ] + } + } + } + } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", + "summary": "List tokens", + "operationId": "tokensList", "tags": [ - "tablesDB" + "tokens" ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "responses": { "200": { - "description": "Row", + "description": "Resource Tokens List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/resourceTokenList" } } } @@ -54984,73 +67479,56 @@ }, "deprecated": false, "x-appwrite": { - "method": "getRow", - "group": "rows", + "method": "list", + "group": "files", "cookies": false, "type": "", - "demo": "tablesdb\/get-row.md", + "demo": "tokens\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "rows.read", - "documents.read" - ], + "scope": "tokens.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<BUCKET_ID>" }, "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "fileId", + "description": "File unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<ROW_ID>" + "x-example": "<FILE_ID>" }, "in": "path" }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", "required": false, "schema": { "type": "array", @@ -55062,31 +67540,32 @@ "in": "query" }, { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", + "post": { + "summary": "Create file token", + "operationId": "tokensCreateFileToken", "tags": [ - "tablesDB" + "tokens" ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { - "description": "Row", + "description": "ResourceToken", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/resourceToken" } } } @@ -55094,100 +67573,50 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertRow", - "group": "rows", + "method": "createFileToken", + "group": "files", "cookies": false, "type": "", - "demo": "tablesdb\/upsert-row.md", - "rate-limit": 120, + "demo": "tokens\/create-file-token.md", + "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "scope": "tokens.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] + { + "Project": [], + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", "required": true, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<BUCKET_ID>" }, "in": "path" }, { - "name": "rowId", - "description": "Row ID.", + "name": "fileId", + "description": "File unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<ROW_ID>" + "x-example": "<FILE_ID>" }, "in": "path" } @@ -55198,25 +67627,11 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { + "expire": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "Token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } } @@ -55224,21 +67639,23 @@ } } } - }, - "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", + } + }, + "\/tokens\/{tokenId}": { + "get": { + "summary": "Get token", + "operationId": "tokensGet", "tags": [ - "tablesDB" + "tokens" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Get a token by its unique ID.", "responses": { "200": { - "description": "Row", + "description": "ResourceToken", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/resourceToken" } } } @@ -55246,67 +67663,100 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRow", - "group": "rows", + "method": "get", + "group": "tokens", "cookies": false, "type": "", - "demo": "tablesdb\/update-row.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "tokens\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "tokens.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "tokenId", + "description": "Token ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<TOKEN_ID>" }, "in": "path" - }, + } + ] + }, + "patch": { + "summary": "Update token", + "operationId": "tokensUpdate", + "tags": [ + "tokens" + ], + "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "responses": { + "200": { + "description": "ResourceToken", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/resourceToken" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "tokens", + "cookies": false, + "type": "", + "demo": "tokens\/update.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "tokens.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, + "Project": [], + "Key": [] + } + ], + "parameters": [ { - "name": "rowId", - "description": "Row ID.", + "name": "tokenId", + "description": "Token unique ID.", "required": true, "schema": { "type": "string", - "x-example": "<ROW_ID>" + "x-example": "<TOKEN_ID>" }, "in": "path" } @@ -55317,25 +67767,11 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, - "x-nullable": true - }, - "transactionId": { + "expire": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", + "description": "File token expiry date", + "x-example": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", "x-nullable": true } } @@ -55345,12 +67781,12 @@ } }, "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", + "summary": "Delete token", + "operationId": "tokensDelete", "tags": [ - "tablesDB" + "tokens" ], - "description": "Delete a row by its unique ID.", + "description": "Delete a token by its unique ID.", "responses": { "204": { "description": "No content" @@ -55358,98 +67794,61 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteRow", - "group": "rows", + "method": "delete", + "group": "tokens", "cookies": false, "type": "", - "demo": "tablesdb\/delete-row.md", + "demo": "tokens\/delete.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "scope": "tokens.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "tokenId", + "description": "Token ID.", "required": true, "schema": { "type": "string", - "x-example": "<ROW_ID>" + "x-example": "<TOKEN_ID>" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", + "\/users": { + "get": { + "summary": "List users", + "operationId": "usersList", "tags": [ - "tablesDB" + "users" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Get a list of all the project's users. You can use the query params to filter your results.", "responses": { "200": { - "description": "Row", + "description": "Users List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/userList" } } } @@ -55457,78 +67856,117 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", + "method": "list", + "group": "users", "cookies": false, "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "users\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt", + "required": false, "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "tableId", - "description": "Table ID.", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<TABLE_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "rowId", - "description": "Row ID.", - "required": true, + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "<ROW_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" - }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" + "Project": [], + "Key": [] } ], "requestBody": { @@ -55537,48 +67975,159 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email", "x-nullable": true }, - "transactionId": { + "phone": { + "type": "string", + "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", + "x-example": "+12065550100", + "format": "phone", + "x-nullable": true + }, + "password": { + "type": "string", + "description": "Plain text user password. Must be at least 8 chars.", + "default": "", + "x-example": "password", + "format": "password" + }, + "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", + "tags": [ + "users" + ], + "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "responses": { + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createArgon2User", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/create-argon-2-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Argon2.", + "x-example": "password", + "format": "password" + }, + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" } - } + }, + "required": [ + "userId", + "email", + "password" + ] } } } } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", + "\/users\/bcrypt": { + "post": { + "summary": "Create user with bcrypt password", + "operationId": "usersCreateBcryptUser", "tags": [ - "tablesDB" + "users" ], - "description": "Increment a specific column of a row by a given value.", + "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { - "200": { - "description": "Row", + "201": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/user" } } } @@ -55586,128 +68135,92 @@ }, "deprecated": false, "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", + "method": "createBcryptUser", + "group": "users", "cookies": false, "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "users\/create-bcrypt-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", "platforms": [ - "client", - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [], "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TABLE_ID>" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<ROW_ID>" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" }, - "transactionId": { + "password": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>", - "x-nullable": true + "description": "User password hashed using Bcrypt.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" } - } + }, + "required": [ + "userId", + "email", + "password" + ] } } } } } }, - "\/teams": { + "\/users\/identities": { "get": { - "summary": "List teams", - "operationId": "teamsList", + "summary": "List identities", + "operationId": "usersListIdentities", "tags": [ - "teams" + "users" ], - "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.", + "description": "Get identities for all users.", "responses": { "200": { - "description": "Teams List", + "description": "Identities List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/teamList" + "$ref": "#\/components\/schemas\/identityList" } } } @@ -55715,40 +68228,37 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "teams", + "method": "listIdentities", + "group": "identities", "cookies": false, "type": "", - "demo": "teams\/list.md", + "demo": "users\/list-identities.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "users.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "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, total, billingPlan", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", "required": false, "schema": { "type": "array", @@ -55782,114 +68292,79 @@ "in": "query" } ] - }, - "post": { - "summary": "Create team", - "operationId": "teamsCreate", + } + }, + "\/users\/identities\/{identityId}": { + "delete": { + "summary": "Delete identity", + "operationId": "usersDeleteIdentity", "tags": [ - "teams" + "users" ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "description": "Delete an identity by its unique ID.", "responses": { - "201": { - "description": "Team", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/team" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "teams", + "method": "deleteIdentity", + "group": "identities", "cookies": false, "type": "", - "demo": "teams\/create.md", + "demo": "users\/delete-identity.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "teamId", - "name" - ] - } - } + "parameters": [ + { + "name": "identityId", + "description": "Identity ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<IDENTITY_ID>" + }, + "in": "path" } - } + ] } }, - "\/teams\/{teamId}": { - "get": { - "summary": "Get team", - "operationId": "teamsGet", + "\/users\/md5": { + "post": { + "summary": "Create user with MD5 password", + "operationId": "usersCreateMD5User", "tags": [ - "teams" + "users" ], - "description": "Get a team by its ID. All team members have read access for this resource.", + "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { - "200": { - "description": "Team", + "201": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/user" } } } @@ -55897,63 +68372,92 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "teams", + "method": "createMD5User", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/get.md", + "demo": "users\/create-md-5-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "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": { + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using MD5.", + "x-example": "password", + "format": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password" + ] + } + } } - ] - }, - "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", + } + } + }, + "\/users\/phpass": { + "post": { + "summary": "Create user with PHPass password", + "operationId": "usersCreatePHPassUser", "tags": [ - "teams" + "users" ], - "description": "Update the team's name by its unique ID.", + "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { - "200": { - "description": "Team", + "201": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/user" } } } @@ -55961,46 +68465,31 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateName", - "group": "teams", + "method": "createPHPassUser", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/update-name.md", + "demo": "users\/create-ph-pass-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -56009,93 +68498,186 @@ "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using PHPass.", + "x-example": "password", + "format": "password" + }, "name": { "type": "string", - "description": "New team name. Max length: 128 chars.", + "description": "User name. Max length: 128 chars.", + "default": "", "x-example": "<NAME>" } }, "required": [ - "name" + "userId", + "email", + "password" ] } } } } - }, - "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", + } + }, + "\/users\/scrypt": { + "post": { + "summary": "Create user with Scrypt password", + "operationId": "usersCreateScryptUser", "tags": [ - "teams" + "users" ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "teams", + "method": "createScryptUser", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/delete.md", + "demo": "users\/create-scrypt-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "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": { + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt.", + "x-example": "password", + "format": "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, + "format": "int32" + }, + "passwordMemory": { + "type": "integer", + "description": "Optional memory cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordParallel": { + "type": "integer", + "description": "Optional parallelization cost used to hash password.", + "x-example": null, + "format": "int32" + }, + "passwordLength": { + "type": "integer", + "description": "Optional hash length used to hash password.", + "x-example": null, + "format": "int32" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordCpu", + "passwordMemory", + "passwordParallel", + "passwordLength" + ] + } + } } - ] + } } }, - "\/teams\/{teamId}\/memberships": { - "get": { - "summary": "List team memberships", - "operationId": "teamsListMemberships", + "\/users\/scrypt-modified": { + "post": { + "summary": "Create user with Scrypt modified password", + "operationId": "usersCreateScryptModifiedUser", "tags": [ - "teams" + "users" ], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { - "200": { - "description": "Memberships List", + "201": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/membershipList" + "$ref": "#\/components\/schemas\/user" } } } @@ -56103,98 +68685,110 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMemberships", - "group": "memberships", + "method": "createScryptModifiedUser", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/list-memberships.md", + "demo": "users\/create-scrypt-modified-user.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "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, roles", - "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "email": { + "type": "string", + "description": "User email.", + "x-example": "email@example.com", + "format": "email" + }, + "password": { + "type": "string", + "description": "User password hashed using Scrypt Modified.", + "x-example": "password", + "format": "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.", + "default": "", + "x-example": "<NAME>" + } + }, + "required": [ + "userId", + "email", + "password", + "passwordSalt", + "passwordSaltSeparator", + "passwordSignerKey" + ] + } + } } - ] - }, + } + } + }, + "\/users\/sha": { "post": { - "summary": "Create team membership", - "operationId": "teamsCreateMembership", + "summary": "Create user with SHA password", + "operationId": "usersCreateSHAUser", "tags": [ - "teams" + "users" ], - "description": "Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.\n\nYou only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.\n\nUse the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.\n", + "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", "responses": { "201": { - "description": "Membership", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/membership" + "$ref": "#\/components\/schemas\/user" } } } @@ -56202,46 +68796,31 @@ }, "deprecated": false, "x-appwrite": { - "method": "createMembership", - "group": "memberships", + "method": "createSHAUser", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/create-membership.md", - "rate-limit": 10, + "demo": "users\/create-sha-user.md", + "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } - ], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" + "Key": [] } ], "requestBody": { @@ -56250,50 +68829,69 @@ "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, "email": { "type": "string", - "description": "Email of the new team member.", - "default": "", + "description": "User email.", "x-example": "email@example.com", "format": "email" }, - "userId": { - "type": "string", - "description": "ID of the user to be added to a team.", - "default": "", - "x-example": "<USER_ID>" - }, - "phone": { + "password": { "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "default": "", - "x-example": "+12065550100", - "format": "phone" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } + "description": "User password hashed using SHA.", + "x-example": "password", + "format": "password" }, - "url": { + "passwordVersion": { "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https:\/\/example.com", - "format": "url" + "description": "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512\/224', 'sha512\/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", + "x-example": "sha1", + "enum": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ], + "x-enum-name": "PasswordHash", + "x-enum-keys": [ + "sha1", + "sha224", + "sha256", + "sha384", + "sha512\/224", + "sha512\/256", + "sha512", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512" + ] }, "name": { "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", + "description": "User name. Max length: 128 chars.", "default": "", "x-example": "<NAME>" } }, "required": [ - "roles" + "userId", + "email", + "password" ] } } @@ -56301,21 +68899,21 @@ } } }, - "\/teams\/{teamId}\/memberships\/{membershipId}": { + "\/users\/{userId}": { "get": { - "summary": "Get team membership", - "operationId": "teamsGetMembership", + "summary": "Get user", + "operationId": "usersGet", "tags": [ - "teams" + "users" ], - "description": "Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.", + "description": "Get a user by its unique ID.", "responses": { "200": { - "description": "Membership", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/membership" + "$ref": "#\/components\/schemas\/user" } } } @@ -56323,238 +68921,199 @@ }, "deprecated": false, "x-appwrite": { - "method": "getMembership", - "group": "memberships", + "method": "get", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/get-membership.md", + "demo": "users\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "users.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<MEMBERSHIP_ID>" + "x-example": "<USER_ID>" }, "in": "path" } ] }, - "patch": { - "summary": "Update team membership", - "operationId": "teamsUpdateMembership", + "delete": { + "summary": "Delete user", + "operationId": "usersDelete", "tags": [ - "teams" + "users" ], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions).\n", + "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", "responses": { - "200": { - "description": "Membership", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/membership" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateMembership", - "group": "memberships", + "method": "delete", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/update-membership.md", + "demo": "users\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<MEMBERSHIP_ID>" + "x-example": "<USER_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 81 characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "roles" - ] - } - } - } - } - }, - "delete": { - "summary": "Delete team membership", - "operationId": "teamsDeleteMembership", + ] + } + }, + "\/users\/{userId}\/email": { + "patch": { + "summary": "Update email", + "operationId": "usersUpdateEmail", "tags": [ - "teams" + "users" ], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "description": "Update the user email by its unique ID.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteMembership", - "group": "memberships", + "method": "updateEmail", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/delete-membership.md", + "demo": "users\/update-email.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<MEMBERSHIP_ID>" + "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", + "format": "email" + } + }, + "required": [ + "email" + ] + } + } + } + } } }, - "\/teams\/{teamId}\/memberships\/{membershipId}\/status": { + "\/users\/{userId}\/impersonator": { "patch": { - "summary": "Update team membership status", - "operationId": "teamsUpdateMembershipStatus", + "summary": "Update user impersonator capability", + "operationId": "usersUpdateImpersonator", "tags": [ - "teams" + "users" ], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", "responses": { "200": { - "description": "Membership", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/membership" + "$ref": "#\/components\/schemas\/user" } } } @@ -56562,53 +69121,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateMembershipStatus", - "group": "memberships", + "method": "updateImpersonator", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/update-membership-status.md", + "demo": "users\/update-impersonator.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "public", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>" - }, - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<MEMBERSHIP_ID>" + "x-example": "<USER_ID>" }, "in": "path" } @@ -56619,20 +69166,14 @@ "schema": { "type": "object", "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "<USER_ID>" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "<SECRET>" + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", + "x-example": false } }, "required": [ - "userId", - "secret" + "impersonator" ] } } @@ -56640,21 +69181,21 @@ } } }, - "\/teams\/{teamId}\/prefs": { - "get": { - "summary": "Get team preferences", - "operationId": "teamsGetPrefs", + "\/users\/{userId}\/jwts": { + "post": { + "summary": "Create user JWT", + "operationId": "usersCreateJWT", "tags": [ - "teams" + "users" ], - "description": "Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getPrefs).", + "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", "responses": { - "200": { - "description": "Preferences", + "201": { + "description": "JWT", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/jwt" } } } @@ -56662,62 +69203,86 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPrefs", - "group": "teams", + "method": "createJWT", + "group": "sessions", "cookies": false, "type": "", - "demo": "teams\/get-prefs.md", + "demo": "users\/create-jwt.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<TEAM_ID>" + "x-example": "<USER_ID>" }, "in": "path" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", + "default": "", + "x-example": "<SESSION_ID>" + }, + "duration": { + "type": "integer", + "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "default": 900, + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, + "\/users\/{userId}\/labels": { "put": { - "summary": "Update team preferences", - "operationId": "teamsUpdatePrefs", + "summary": "Update user labels", + "operationId": "usersUpdateLabels", "tags": [ - "teams" + "users" ], - "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.", + "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", "responses": { "200": { - "description": "Preferences", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/user" } } } @@ -56725,43 +69290,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePrefs", - "group": "teams", + "method": "updateLabels", + "group": "users", "cookies": false, "type": "", - "demo": "teams\/update-prefs.md", + "demo": "users\/update-labels.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", + "scope": "users.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "teamId", - "description": "Team ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<TEAM_ID>" + "x-example": "<USER_ID>" }, "in": "path" } @@ -56772,15 +69335,17 @@ "schema": { "type": "object", "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" + "labels": { + "type": "array", + "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } } }, "required": [ - "prefs" + "labels" ] } } @@ -56788,21 +69353,21 @@ } } }, - "\/tokens\/buckets\/{bucketId}\/files\/{fileId}": { + "\/users\/{userId}\/logs": { "get": { - "summary": "List tokens", - "operationId": "tokensList", + "summary": "List user logs", + "operationId": "usersListLogs", "tags": [ - "tokens" + "users" ], - "description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.", + "description": "Get the user activity logs list by its unique ID.", "responses": { "200": { - "description": "Resource Tokens List", + "description": "Logs List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/resourceTokenList" + "$ref": "#\/components\/schemas\/logList" } } } @@ -56810,21 +69375,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "files", + "method": "listLogs", + "group": "logs", "cookies": false, "type": "", - "demo": "tokens\/list.md", + "demo": "users\/list-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", + "scope": "users.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "auth": { "Project": [], "Key": [] @@ -56838,28 +69404,105 @@ ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<USER_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File unique ID.", + "name": "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listMemberships", + "group": "memberships", + "cookies": false, + "type": "", + "demo": "users\/list-memberships.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "<USER_ID>" }, "in": "path" }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, roles", "required": false, "schema": { "type": "array", @@ -56870,6 +69513,17 @@ }, "in": "query" }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "<SEARCH>", + "default": "" + }, + "in": "query" + }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -56882,43 +69536,243 @@ "in": "query" } ] - }, - "post": { - "summary": "Create file token", - "operationId": "tokensCreateFileToken", + } + }, + "\/users\/{userId}\/mfa": { + "patch": { + "summary": "Update MFA", + "operationId": "usersUpdateMfa", "tags": [ - "tokens" + "users" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", + "description": "Enable or disable MFA on a user account.", "responses": { - "201": { - "description": "ResourceToken", + "200": { + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/resourceToken" + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": true, + "x-appwrite": { + "method": "updateMfa", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/update-mfa.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + }, + "methods": [ + { + "name": "updateMfa", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFA" + } + }, + { + "name": "updateMFA", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "mfa" + ], + "required": [ + "userId", + "mfa" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/user" + } + ], + "description": "Enable or disable MFA on a user account.", + "demo": "users\/update-mfa.md", + "public": true + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "mfa": { + "type": "boolean", + "description": "Enable or disable MFA.", + "x-example": false + } + }, + "required": [ + "mfa" + ] + } + } + } + } + } + }, + "\/users\/{userId}\/mfa\/authenticators\/{type}": { + "delete": { + "summary": "Delete authenticator", + "operationId": "usersDeleteMfaAuthenticator", + "tags": [ + "users" + ], + "description": "Delete an authenticator app.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": true, + "x-appwrite": { + "method": "deleteMfaAuthenticator", + "group": "mfa", + "cookies": false, + "type": "", + "demo": "users\/delete-mfa-authenticator.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" + }, + "methods": [ + { + "name": "deleteMfaAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.deleteMFAAuthenticator" } + }, + { + "name": "deleteMFAAuthenticator", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId", + "type" + ], + "required": [ + "userId", + "type" + ], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete an authenticator app.", + "demo": "users\/delete-mfa-authenticator.md", + "public": true } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createFileToken", - "group": "files", - "cookies": false, - "type": "", - "demo": "tokens\/create-file-token.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" ], - "packaging": false, - "public": true, "auth": { "Project": [], "Key": [] @@ -56932,83 +69786,131 @@ ], "parameters": [ { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<BUCKET_ID>" + "x-example": "<USER_ID>" }, "in": "path" }, { - "name": "fileId", - "description": "File unique ID.", + "name": "type", + "description": "Type of authenticator.", "required": true, "schema": { "type": "string", - "x-example": "<FILE_ID>" + "x-example": "totp", + "enum": [ + "totp" + ], + "x-enum-name": "AuthenticatorType", + "x-enum-keys": [ + "totp" + ] }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "Token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/tokens\/{tokenId}": { + "\/users\/{userId}\/mfa\/factors": { "get": { - "summary": "Get token", - "operationId": "tokensGet", + "summary": "List factors", + "operationId": "usersListMfaFactors", "tags": [ - "tokens" + "users" ], - "description": "Get a token by its unique ID.", + "description": "List the factors available on the account to be used as a MFA challange.", "responses": { "200": { - "description": "ResourceToken", + "description": "MFAFactors", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/resourceToken" + "$ref": "#\/components\/schemas\/mfaFactors" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "get", - "group": "tokens", + "method": "listMfaFactors", + "group": "mfa", "cookies": false, "type": "", - "demo": "tokens\/get.md", + "demo": "users\/list-mfa-factors.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tokens.read", + "scope": "users.read", "platforms": [ "console", "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + }, + "methods": [ + { + "name": "listMfaFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.listMFAFactors" + } + }, + { + "name": "listMFAFactors", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaFactors" + } + ], + "description": "List the factors available on the account to be used as a MFA challange.", + "demo": "users\/list-mfa-factors.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -57022,124 +69924,114 @@ ], "parameters": [ { - "name": "tokenId", - "description": "Token ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOKEN_ID>" + "x-example": "<USER_ID>" }, "in": "path" } ] - }, - "patch": { - "summary": "Update token", - "operationId": "tokensUpdate", + } + }, + "\/users\/{userId}\/mfa\/recovery-codes": { + "get": { + "summary": "Get MFA recovery codes", + "operationId": "usersGetMfaRecoveryCodes", "tags": [ - "tokens" + "users" ], - "description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.", + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", "responses": { "200": { - "description": "ResourceToken", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/resourceToken" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "update", - "group": "tokens", + "method": "getMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "tokens\/update.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", + "demo": "users\/get-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "tokenId", - "description": "Token unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<TOKEN_ID>" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "expire": { - "type": "string", - "description": "File token expiry date", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "x-nullable": true - } + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" + }, + "methods": [ + { + "name": "getMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.getMFARecoveryCodes" } + }, + { + "name": "getMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/get-mfa-recovery-codes.md", + "public": true } - } - } - }, - "delete": { - "summary": "Delete token", - "operationId": "tokensDelete", - "tags": [ - "tokens" - ], - "description": "Delete a token by its unique ID.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "tokens", - "cookies": false, - "type": "", - "demo": "tokens\/delete.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "tokens.write", - "platforms": [ - "console", - "server" ], - "packaging": false, - "public": true, "auth": { "Project": [], "Key": [] @@ -57153,234 +70045,231 @@ ], "parameters": [ { - "name": "tokenId", - "description": "Token ID.", + "name": "userId", + "description": "User ID.", "required": true, "schema": { "type": "string", - "x-example": "<TOKEN_ID>" + "x-example": "<USER_ID>" }, "in": "path" } ] - } - }, - "\/usage\/events": { - "get": { - "summary": "List usage events", - "operationId": "usageListEvents", + }, + "put": { + "summary": "Update MFA recovery codes (regenerate)", + "operationId": "usersUpdateMfaRecoveryCodes", "tags": [ - "usage" + "users" ], - "description": "Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 one point per dimension combination, no time axis. Useful for \"top 10 paths by bandwidth in the last 7 days\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one point per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down by one or more attributes (service, path, status, country, \u2026). Pass multiple metrics to render stacked charts in one round-trip. `resource` and `resourceId` filter the underlying events. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).", + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", "responses": { "200": { - "description": "usageEventList", + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageEventList" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listEvents", - "group": "events", + "method": "updateMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "usage\/list-events.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "projectId:{project.$id}", - "scope": "usage.read", + "demo": "users\/update-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "metrics", - "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "in": "query" - }, - { - "name": "resource", - "description": "Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE>", - "default": "" - }, - "in": "query" - }, - { - "name": "resourceId", - "description": "Resource id filter.", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE_ID>", - "default": "" - }, - "in": "query" - }, - { - "name": "interval", - "description": "Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.", - "required": false, - "schema": { - "type": "string", - "x-example": "1m" - }, - "in": "query" + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" }, - { - "name": "dimensions", - "description": "Break-down dimensions (max 10). Allowed: path, method, status, service, resource, country, region, hostname, osName, clientType, clientName, deviceName, teamId, resourceId.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + "methods": [ + { + "name": "updateMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] }, - "default": [] - }, - "in": "query" - }, - { - "name": "startAt", - "description": "Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).", - "required": false, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "default": "" - }, - "in": "query" - }, - { - "name": "endAt", - "description": "Range end in ISO 8601. Defaults to the current time.", - "required": false, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "default": "" - }, - "in": "query" - }, - { - "name": "orderBy", - "description": "Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.", - "required": false, - "schema": { - "type": "string", - "x-example": "time", - "default": "time" - }, - "in": "query" - }, - { - "name": "orderDir", - "description": "Sort direction: asc or desc. Default desc \u2014 paired with the default limit, returns the most recent \/ highest-value groups first.", - "required": false, - "schema": { - "type": "string", - "x-example": "asc", - "default": "desc" + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.updateMFARecoveryCodes" + } }, - "in": "query" - }, + { + "name": "updateMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "demo": "users\/update-mfa-recovery-codes.md", + "public": false + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ { - "name": "limit", - "description": "Maximum rows to return (1-5000).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 500 - }, - "in": "query" - }, + "Project": [], + "Key": [] + } + ], + "parameters": [ { - "name": "offset", - "description": "Pagination offset (0-100000).", - "required": false, + "name": "userId", + "description": "User ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 + "type": "string", + "x-example": "<USER_ID>" }, - "in": "query" + "in": "path" } ] - } - }, - "\/usage\/gauges": { - "get": { - "summary": "List usage gauges", - "operationId": "usageListGauges", + }, + "patch": { + "summary": "Create MFA recovery codes", + "operationId": "usersCreateMfaRecoveryCodes", "tags": [ - "usage" + "users" ], - "description": "Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, \u2026); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.\n\n**Two response shapes**:\n- Omit `interval` for a flat top-N table \u2014 `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for \"top 10 resources by current storage\".\n- Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series \u2014 one snapshot per (time bucket \u00d7 dimension combination).\n\n`dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resource`. `service` and `resource` enable per-service \/ per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). Pass multiple metrics to render stacked charts in one round-trip. `resourceId` and `teamId` parameters filter the underlying rows. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).", + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", "responses": { - "200": { - "description": "usageGaugeList", + "201": { + "description": "MFA Recovery Codes", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/usageGaugeList" + "$ref": "#\/components\/schemas\/mfaRecoveryCodes" } } } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { - "method": "listGauges", - "group": "gauges", + "method": "createMfaRecoveryCodes", + "group": "mfa", "cookies": false, "type": "", - "demo": "usage\/list-gauges.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "projectId:{project.$id}", - "scope": "usage.read", + "demo": "users\/create-mfa-recovery-codes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, - "public": true, + "public": false, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + }, + "methods": [ + { + "name": "createMfaRecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "users.createMFARecoveryCodes" + } + }, + { + "name": "createMFARecoveryCodes", + "namespace": "users", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "userId" + ], + "required": [ + "userId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/mfaRecoveryCodes" + } + ], + "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", + "demo": "users\/create-mfa-recovery-codes.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -57394,150 +70283,33 @@ ], "parameters": [ { - "name": "metrics", - "description": "One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.", + "name": "userId", + "description": "User ID.", "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "in": "query" - }, - { - "name": "resourceId", - "description": "Resource id filter.", - "required": false, - "schema": { - "type": "string", - "x-example": "<RESOURCE_ID>", - "default": "" - }, - "in": "query" - }, - { - "name": "teamId", - "description": "Team id filter.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TEAM_ID>", - "default": "" - }, - "in": "query" - }, - { - "name": "interval", - "description": "Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.", - "required": false, - "schema": { - "type": "string", - "x-example": "1m" - }, - "in": "query" - }, - { - "name": "dimensions", - "description": "Break-down dimensions. Allowed: resourceId, teamId, service, resource.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "startAt", - "description": "Range start in ISO 8601. Defaults to endAt - 7d.", - "required": false, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "default": "" - }, - "in": "query" - }, - { - "name": "endAt", - "description": "Range end in ISO 8601. Defaults to the current time.", - "required": false, - "schema": { - "type": "string", - "format": "datetime", - "x-example": "2020-10-15T06:38:00.000+00:00", - "default": "" - }, - "in": "query" - }, - { - "name": "orderBy", - "description": "Column to order by. Allowed: time, value. Default time.", - "required": false, - "schema": { - "type": "string", - "x-example": "time", - "default": "time" - }, - "in": "query" - }, - { - "name": "orderDir", - "description": "Sort direction: asc or desc. Default desc \u2014 paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.", - "required": false, "schema": { "type": "string", - "x-example": "asc", - "default": "desc" - }, - "in": "query" - }, - { - "name": "limit", - "description": "Maximum rows to return (1-5000).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 1, - "default": 500 - }, - "in": "query" - }, - { - "name": "offset", - "description": "Pagination offset (0-100000).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 + "x-example": "<USER_ID>" }, - "in": "query" + "in": "path" } ] } }, - "\/users": { - "get": { - "summary": "List users", - "operationId": "usersList", + "\/users\/{userId}\/name": { + "patch": { + "summary": "Update name", + "operationId": "usersUpdateName", "tags": [ "users" ], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "description": "Update the user name by its unique ID.", "responses": { "200": { - "description": "Users List", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/userList" + "$ref": "#\/components\/schemas\/user" } } } @@ -57545,22 +70317,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "updateName", "group": "users", "cookies": false, "type": "", - "demo": "users\/list.md", + "demo": "users\/update-name.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "auth": { "Project": [], "Key": [] @@ -57574,51 +70346,47 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator", - "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, + "name": "userId", + "description": "User ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "x-example": "<USER_ID>" }, - "in": "query" + "in": "path" } - ] - }, - "post": { - "summary": "Create user", - "operationId": "usersCreate", + ], + "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": "Create a new user.", + "description": "Update the user password by its unique ID.", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -57631,11 +70399,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "updatePassword", "group": "users", "cookies": false, "type": "", - "demo": "users\/create.md", + "demo": "users\/update-password.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -57646,7 +70414,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "auth": { "Project": [], "Key": [] @@ -57658,50 +70426,33 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email", - "x-nullable": true - }, - "phone": { - "type": "string", - "description": "Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.", - "x-example": "+12065550100", - "format": "phone", - "x-nullable": true - }, "password": { "type": "string", - "description": "Plain text user password. Must be at least 8 chars.", - "default": "", + "description": "New user password. Must be at least 8 chars.", "x-example": "password", "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" } }, "required": [ - "userId" + "password" ] } } @@ -57709,16 +70460,16 @@ } } }, - "\/users\/argon2": { - "post": { - "summary": "Create user with Argon2 password", - "operationId": "usersCreateArgon2User", + "\/users\/{userId}\/phone": { + "patch": { + "summary": "Update phone", + "operationId": "usersUpdatePhone", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Argon2](https:\/\/en.wikipedia.org\/wiki\/Argon2) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Update the user phone by its unique ID.", "responses": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -57731,11 +70482,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createArgon2User", + "method": "updatePhone", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-argon-2-user.md", + "demo": "users\/update-phone.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -57746,7 +70497,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "auth": { "Project": [], "Key": [] @@ -57758,43 +70509,33 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Argon2.", - "x-example": "password", - "format": "password" - }, - "name": { + "number": { "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "description": "User phone number.", + "x-example": "+12065550100", + "format": "phone" } }, "required": [ - "userId", - "email", - "password" + "number" ] } } @@ -57802,21 +70543,21 @@ } } }, - "\/users\/bcrypt": { - "post": { - "summary": "Create user with bcrypt password", - "operationId": "usersCreateBcryptUser", + "\/users\/{userId}\/prefs": { + "get": { + "summary": "Get user preferences", + "operationId": "usersGetPrefs", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Bcrypt](https:\/\/en.wikipedia.org\/wiki\/Bcrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Get the user preferences by its unique ID.", "responses": { - "201": { - "description": "User", + "200": { + "description": "Preferences", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/preferences" } } } @@ -57824,11 +70565,72 @@ }, "deprecated": false, "x-appwrite": { - "method": "createBcryptUser", + "method": "getPrefs", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-bcrypt-user.md", + "demo": "users\/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "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" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updatePrefs", + "group": "users", + "cookies": false, + "type": "", + "demo": "users\/update-prefs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -57839,7 +70641,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "auth": { "Project": [], "Key": [] @@ -57851,43 +70653,33 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Bcrypt.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" } }, "required": [ - "userId", - "email", - "password" + "prefs" ] } } @@ -57895,21 +70687,21 @@ } } }, - "\/users\/identities": { + "\/users\/{userId}\/sessions": { "get": { - "summary": "List identities", - "operationId": "usersListIdentities", + "summary": "List user sessions", + "operationId": "usersListSessions", "tags": [ "users" ], - "description": "Get identities for all users.", + "description": "Get the user sessions list by its unique ID.", "responses": { "200": { - "description": "Identities List", + "description": "Sessions List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/identityList" + "$ref": "#\/components\/schemas\/sessionList" } } } @@ -57917,22 +70709,25 @@ }, "deprecated": false, "x-appwrite": { - "method": "listIdentities", - "group": "identities", + "method": "listSessions", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/list-identities.md", + "demo": "users\/list-sessions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": [ + "users.read", + "sessions.read" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "auth": { "Project": [], "Key": [] @@ -57946,28 +70741,14 @@ ], "parameters": [ { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, + "name": "userId", + "description": "User ID.", + "required": true, "schema": { "type": "string", - "x-example": "<SEARCH>", - "default": "" + "x-example": "<USER_ID>" }, - "in": "query" + "in": "path" }, { "name": "total", @@ -57981,39 +70762,47 @@ "in": "query" } ] - } - }, - "\/users\/identities\/{identityId}": { - "delete": { - "summary": "Delete identity", - "operationId": "usersDeleteIdentity", + }, + "post": { + "summary": "Create session", + "operationId": "usersCreateSession", "tags": [ "users" ], - "description": "Delete an identity by its unique ID.", + "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "Session", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/session" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteIdentity", - "group": "identities", + "method": "createSession", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/delete-identity.md", + "demo": "users\/create-session.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": [ + "users.write", + "sessions.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "auth": { "Project": [], "Key": [] @@ -58027,56 +70816,53 @@ ], "parameters": [ { - "name": "identityId", - "description": "Identity ID.", + "name": "userId", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", "required": true, "schema": { "type": "string", - "x-example": "<IDENTITY_ID>" + "x-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<USER_ID>" }, "in": "path" } ] - } - }, - "\/users\/md5": { - "post": { - "summary": "Create user with MD5 password", - "operationId": "usersCreateMD5User", + }, + "delete": { + "summary": "Delete user sessions", + "operationId": "usersDeleteSessions", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [MD5](https:\/\/en.wikipedia.org\/wiki\/MD5) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Delete all user's sessions by using the user's unique ID.", "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createMD5User", - "group": "users", + "method": "deleteSessions", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-md-5-user.md", + "demo": "users\/delete-sessions.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": [ + "users.write", + "sessions.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "auth": { "Project": [], "Key": [] @@ -58088,88 +70874,54 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using MD5.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" } - } + ] } }, - "\/users\/phpass": { - "post": { - "summary": "Create user with PHPass password", - "operationId": "usersCreatePHPassUser", + "\/users\/{userId}\/sessions\/{sessionId}": { + "delete": { + "summary": "Delete user session", + "operationId": "usersDeleteSession", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [PHPass](https:\/\/www.openwall.com\/phpass\/) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Delete a user sessions by its unique ID.", "responses": { - "201": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "createPHPassUser", - "group": "users", + "method": "deleteSession", + "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-ph-pass-user.md", + "demo": "users\/delete-session.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": [ + "users.write", + "sessions.write" + ], "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "auth": { "Project": [], "Key": [] @@ -58181,60 +70933,40 @@ "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using PHPass.", - "x-example": "password", - "format": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password" - ] - } - } + "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\/scrypt": { - "post": { - "summary": "Create user with Scrypt password", - "operationId": "usersCreateScryptUser", + "\/users\/{userId}\/status": { + "patch": { + "summary": "Update user status", + "operationId": "usersUpdateStatus", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt](https:\/\/github.com\/Tarsnap\/scrypt) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "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": { - "201": { + "200": { "description": "User", "content": { "application\/json": { @@ -58247,11 +70979,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createScryptUser", + "method": "updateStatus", "group": "users", "cookies": false, "type": "", - "demo": "users\/create-scrypt-user.md", + "demo": "users\/update-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -58262,7 +70994,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "auth": { "Project": [], "Key": [] @@ -58274,77 +71006,32 @@ "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": { - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt.", - "x-example": "password", - "format": "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, - "format": "int32" - }, - "passwordMemory": { - "type": "integer", - "description": "Optional memory cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordParallel": { - "type": "integer", - "description": "Optional parallelization cost used to hash password.", - "x-example": null, - "format": "int32" - }, - "passwordLength": { - "type": "integer", - "description": "Optional hash length used to hash password.", - "x-example": null, - "format": "int32" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "<NAME>" + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "x-example": false } }, "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordCpu", - "passwordMemory", - "passwordParallel", - "passwordLength" + "status" ] } } @@ -58352,21 +71039,21 @@ } } }, - "\/users\/scrypt-modified": { - "post": { - "summary": "Create user with Scrypt modified password", - "operationId": "usersCreateScryptModifiedUser", + "\/users\/{userId}\/targets": { + "get": { + "summary": "List user targets", + "operationId": "usersListTargets", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [Scrypt Modified](https:\/\/gist.github.com\/Meldiron\/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "List the messaging targets that are associated with a user.", "responses": { - "201": { - "description": "User", + "200": { + "description": "Target list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/targetList" } } } @@ -58374,110 +71061,84 @@ }, "deprecated": false, "x-appwrite": { - "method": "createScryptModifiedUser", - "group": "users", + "method": "listTargets", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/create-scrypt-modified-user.md", + "demo": "users\/list-targets.md", "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", - "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>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using Scrypt Modified.", - "x-example": "password", - "format": "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.", - "default": "", - "x-example": "<NAME>" - } - }, - "required": [ - "userId", - "email", - "password", - "passwordSalt", - "passwordSaltSeparator", - "passwordSignerKey" - ] - } - } + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": [ + "server", + "console" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "auth": { + "Project": [], + "Key": [] } - } - } - }, - "\/users\/sha": { + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<USER_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, "post": { - "summary": "Create user with SHA password", - "operationId": "usersCreateSHAUser", + "summary": "Create user target", + "operationId": "usersCreateTarget", "tags": [ "users" ], - "description": "Create a new user. Password provided must be hashed with the [SHA](https:\/\/en.wikipedia.org\/wiki\/Secure_Hash_Algorithm) algorithm. Use the [POST \/users](https:\/\/appwrite.io\/docs\/server\/users#usersCreate) endpoint to create users with a plain text password.", + "description": "Create a messaging target.", "responses": { "201": { - "description": "User", + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/target" } } } @@ -58485,22 +71146,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSHAUser", - "group": "users", + "method": "createTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/create-sha-user.md", + "demo": "users\/create-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "auth": { "Project": [], "Key": [] @@ -58512,75 +71173,70 @@ "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": { - "userId": { + "targetId": { "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>", + "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<TARGET_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, - "email": { - "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" - }, - "password": { - "type": "string", - "description": "User password hashed using SHA.", - "x-example": "password", - "format": "password" - }, - "passwordVersion": { + "providerType": { "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", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email", "enum": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" + "email", + "sms", + "push" ], - "x-enum-name": "PasswordHash", + "x-enum-name": "MessagingProviderType", "x-enum-keys": [ - "sha1", - "sha224", - "sha256", - "sha384", - "sha512\/224", - "sha512\/256", - "sha512", - "sha3-224", - "sha3-256", - "sha3-384", - "sha3-512" + "email", + "sms", + "push" ] }, + "identifier": { + "type": "string", + "description": "The target identifier (token, email, phone etc.)", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, "name": { "type": "string", - "description": "User name. Max length: 128 chars.", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", "default": "", "x-example": "<NAME>" } }, "required": [ - "userId", - "email", - "password" + "targetId", + "providerType", + "identifier" ] } } @@ -58588,21 +71244,21 @@ } } }, - "\/users\/{userId}": { + "\/users\/{userId}\/targets\/{targetId}": { "get": { - "summary": "Get user", - "operationId": "usersGet", + "summary": "Get user target", + "operationId": "usersGetTarget", "tags": [ "users" ], - "description": "Get a user by its unique ID.", + "description": "Get a user's push notification target by ID.", "responses": { "200": { - "description": "User", + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/target" } } } @@ -58610,22 +71266,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "users", + "method": "getTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/get.md", + "demo": "users\/get-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.read", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "auth": { "Project": [], "Key": [] @@ -58647,79 +71303,33 @@ "x-example": "<USER_ID>" }, "in": "path" - } - ] - }, - "delete": { - "summary": "Delete user", - "operationId": "usersDelete", - "tags": [ - "users" - ], - "description": "Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https:\/\/appwrite.io\/docs\/server\/users#usersUpdateStatus) endpoint instead.", - "responses": { - "204": { - "description": "No content" - } - }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": "users", - "cookies": false, - "type": "", - "demo": "users\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", - "auth": { - "Project": [], - "Key": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ + }, { - "name": "userId", - "description": "User ID.", + "name": "targetId", + "description": "Target ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<TARGET_ID>" }, "in": "path" } ] - } - }, - "\/users\/{userId}\/email": { + }, "patch": { - "summary": "Update email", - "operationId": "usersUpdateEmail", + "summary": "Update user target", + "operationId": "usersUpdateTarget", "tags": [ "users" ], - "description": "Update the user email by its unique ID.", + "description": "Update a messaging target.", "responses": { "200": { - "description": "User", + "description": "Target", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/target" } } } @@ -58727,22 +71337,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmail", - "group": "users", + "method": "updateTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/update-email.md", + "demo": "users\/update-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "auth": { "Project": [], "Key": [] @@ -58764,6 +71374,16 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" } ], "requestBody": { @@ -58772,60 +71392,60 @@ "schema": { "type": "object", "properties": { - "email": { + "identifier": { "type": "string", - "description": "User email.", - "x-example": "email@example.com", - "format": "email" + "description": "The target identifier (token, email, phone etc.)", + "default": "", + "x-example": "<IDENTIFIER>" + }, + "providerId": { + "type": "string", + "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", + "default": "", + "x-example": "<PROVIDER_ID>" + }, + "name": { + "type": "string", + "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", + "default": "", + "x-example": "<NAME>" } - }, - "required": [ - "email" - ] + } } } } } - } - }, - "\/users\/{userId}\/impersonator": { - "patch": { - "summary": "Update user impersonator capability", - "operationId": "usersUpdateImpersonator", + }, + "delete": { + "summary": "Delete user target", + "operationId": "usersDeleteTarget", "tags": [ "users" ], - "description": "Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.\n", + "description": "Delete a messaging target.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateImpersonator", - "group": "users", + "method": "deleteTarget", + "group": "targets", "cookies": false, "type": "", - "demo": "users\/update-impersonator.md", + "demo": "users\/delete-target.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", "scope": "users.write", "platforms": [ - "console", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-impersonator.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "auth": { "Project": [], "Key": [] @@ -58847,44 +71467,35 @@ "x-example": "<USER_ID>" }, "in": "path" + }, + { + "name": "targetId", + "description": "Target ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<TARGET_ID>" + }, + "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.", - "x-example": false - } - }, - "required": [ - "impersonator" - ] - } - } - } - } + ] } }, - "\/users\/{userId}\/jwts": { + "\/users\/{userId}\/tokens": { "post": { - "summary": "Create user JWT", - "operationId": "usersCreateJWT", + "summary": "Create token", + "operationId": "usersCreateToken", "tags": [ "users" ], - "description": "Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.", + "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", "responses": { "201": { - "description": "JWT", + "description": "Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/jwt" + "$ref": "#\/components\/schemas\/token" } } } @@ -58892,11 +71503,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createJWT", + "method": "createToken", "group": "sessions", "cookies": false, "type": "", - "demo": "users\/create-jwt.md", + "demo": "users\/create-token.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -58907,7 +71518,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "auth": { "Project": [], "Key": [] @@ -58937,17 +71548,18 @@ "schema": { "type": "object", "properties": { - "sessionId": { - "type": "string", - "description": "Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.", - "default": "", - "x-example": "<SESSION_ID>" + "length": { + "type": "integer", + "description": "Token length in characters. The default length is 6 characters", + "default": 6, + "x-example": 4, + "format": "int32" }, - "duration": { + "expire": { "type": "integer", - "description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.", + "description": "Token expiration period in seconds. The default expiration is 15 minutes.", "default": 900, - "x-example": 0, + "x-example": 60, "format": "int32" } } @@ -58957,14 +71569,14 @@ } } }, - "\/users\/{userId}\/labels": { - "put": { - "summary": "Update user labels", - "operationId": "usersUpdateLabels", + "\/users\/{userId}\/verification": { + "patch": { + "summary": "Update email verification", + "operationId": "usersUpdateEmailVerification", "tags": [ "users" ], - "description": "Update the user labels by its unique ID. \n\nLabels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https:\/\/appwrite.io\/docs\/permissions) for more info.", + "description": "Update the user email verification status by its unique ID.", "responses": { "200": { "description": "User", @@ -58979,11 +71591,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLabels", + "method": "updateEmailVerification", "group": "users", "cookies": false, "type": "", - "demo": "users\/update-labels.md", + "demo": "users\/update-email-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -58994,7 +71606,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "auth": { "Project": [], "Key": [] @@ -59024,17 +71636,14 @@ "schema": { "type": "object", "properties": { - "labels": { - "type": "array", - "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "x-example": false } }, "required": [ - "labels" + "emailVerification" ] } } @@ -59042,21 +71651,21 @@ } } }, - "\/users\/{userId}\/logs": { - "get": { - "summary": "List user logs", - "operationId": "usersListLogs", + "\/users\/{userId}\/verification\/phone": { + "patch": { + "summary": "Update phone verification", + "operationId": "usersUpdatePhoneVerification", "tags": [ "users" ], - "description": "Get the user activity logs list by its unique ID.", + "description": "Update the user phone verification status by its unique ID.", "responses": { "200": { - "description": "Logs List", + "description": "User", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/logList" + "$ref": "#\/components\/schemas\/user" } } } @@ -59064,22 +71673,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "logs", + "method": "updatePhoneVerification", + "group": "users", "cookies": false, "type": "", - "demo": "users\/list-logs.md", + "demo": "users\/update-phone-verification.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "users.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "auth": { "Project": [], "Key": [] @@ -59101,49 +71710,44 @@ "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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "phoneVerification": { + "type": "boolean", + "description": "User phone verification status.", + "x-example": false + } + }, + "required": [ + "phoneVerification" + ] + } + } + } + } } }, - "\/users\/{userId}\/memberships": { + "\/vectorsdb": { "get": { - "summary": "List user memberships", - "operationId": "usersListMemberships", + "summary": "List databases", + "operationId": "vectorsDBList", "tags": [ - "users" + "vectorsDB" ], - "description": "Get the user membership list by its unique ID.", + "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": "Memberships List", + "description": "Databases List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/membershipList" + "$ref": "#\/components\/schemas\/databaseList" } } } @@ -59151,22 +71755,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listMemberships", - "group": "memberships", + "method": "list", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "users\/list-memberships.md", + "demo": "vectorsdb\/list.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", "auth": { "Project": [], "Key": [] @@ -59179,19 +71783,9 @@ } ], "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", "required": false, "schema": { "type": "array", @@ -59202,17 +71796,6 @@ }, "in": "query" }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "<SEARCH>", - "default": "" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -59225,108 +71808,44 @@ "in": "query" } ] - } - }, - "\/users\/{userId}\/mfa": { - "patch": { - "summary": "Update MFA", - "operationId": "usersUpdateMfa", + }, + "post": { + "summary": "Create database", + "operationId": "vectorsDBCreate", "tags": [ - "users" + "vectorsDB" ], - "description": "Enable or disable MFA on a user account.", + "description": "Create a new Database.\n", "responses": { - "200": { - "description": "User", + "201": { + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/database" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfa", - "group": "users", + "method": "create", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "users\/update-mfa.md", + "demo": "vectorsdb\/create.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - }, - "methods": [ - { - "name": "updateMfa", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFA" - } - }, - { - "name": "updateMFA", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "mfa" - ], - "required": [ - "userId", - "mfa" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/user" - } - ], - "description": "Enable or disable MFA on a user account.", - "demo": "users\/update-mfa.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", "auth": { "Project": [], "Key": [] @@ -59338,32 +71857,54 @@ "Key": [] } ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "mfa": { + "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-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Database name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "enabled": { "type": "boolean", - "description": "Enable or disable MFA.", + "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 + }, + "specification": { + "type": "string", + "description": "Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.", + "default": "serverless", + "x-example": "serverless" + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.", + "default": 0, + "x-example": 0, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ - "mfa" + "databaseId", + "name" ] } } @@ -59371,94 +71912,68 @@ } } }, - "\/users\/{userId}\/mfa\/authenticators\/{type}": { - "delete": { - "summary": "Delete authenticator", - "operationId": "usersDeleteMfaAuthenticator", + "\/vectorsdb\/embeddings\/text": { + "post": { + "summary": "Create text embeddings", + "operationId": "vectorsDBCreateTextEmbeddings", "tags": [ - "users" + "vectorsDB" ], - "description": "Delete an authenticator app.", + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Embedding list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/embeddingList" + } + } + } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "deleteMfaAuthenticator", - "group": "mfa", + "method": "createTextEmbeddings", + "group": "embeddings", "cookies": false, "type": "", - "demo": "users\/delete-mfa-authenticator.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/create-text-embeddings.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - }, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-text-embeddings.md", "methods": [ { - "name": "deleteMfaAuthenticator", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId", - "type" - ], - "required": [ - "userId", - "type" - ], - "responses": [ - { - "code": 204 - } - ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.deleteMFAAuthenticator" - } - }, - { - "name": "deleteMFAAuthenticator", - "namespace": "users", - "desc": "", + "name": "createTextEmbeddings", + "namespace": "vectorsDB", + "desc": "Create Text Embedding", "auth": { "Project": [], "Key": [] }, "parameters": [ - "userId", - "type" + "texts", + "model" ], "required": [ - "userId", - "type" + "texts" ], "responses": [ { - "code": 204 + "code": 200, + "model": "#\/components\/schemas\/embeddingList" } ], - "description": "Delete an authenticator app.", - "demo": "users\/delete-mfa-authenticator.md", + "description": "Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.\n", + "demo": "vectorsdb\/create-text-embeddings.md", "public": true } ], @@ -59470,136 +71985,209 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "JWT": [] } ], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<USER_ID>" - }, - "in": "path" - }, - { - "name": "type", - "description": "Type of authenticator.", - "required": true, - "schema": { - "type": "string", - "x-example": "totp", - "enum": [ - "totp" - ], - "x-enum-name": "AuthenticatorType", - "x-enum-keys": [ - "totp" - ] - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "texts": { + "type": "array", + "description": "Array of text to generate embeddings.", + "x-example": null, + "items": { + "type": "string" + } + }, + "model": { + "type": "string", + "description": "The embedding model to use for generating vector embeddings.", + "default": "nomic-embed-text", + "x-example": "nomic-embed-text", + "enum": [ + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" + ], + "x-enum-name": "EmbeddingModel", + "x-enum-keys": [ + "nomic-embed-text", + "embedding-gemma", + "all-minilm", + "bge-small" + ] + } + }, + "required": [ + "texts" + ] + } + } } - ] + } } }, - "\/users\/{userId}\/mfa\/factors": { + "\/vectorsdb\/specifications": { "get": { - "summary": "List factors", - "operationId": "usersListMfaFactors", + "summary": "List specifications", + "operationId": "vectorsDBListSpecifications", "tags": [ - "users" + "vectorsDB" ], - "description": "List the factors available on the account to be used as a MFA challange.", + "description": "List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.", "responses": { "200": { - "description": "MFAFactors", + "description": "SpecificationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaFactors" + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationList" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "listMfaFactors", - "group": "mfa", + "method": "listSpecifications", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "users\/list-mfa-factors.md", + "demo": "vectorsdb\/list-specifications.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "databases.read", "platforms": [ "console", "server" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" - }, - "methods": [ - { - "name": "listMfaFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ] + } + }, + "\/vectorsdb\/transactions": { + "get": { + "summary": "List transactions", + "operationId": "vectorsDBListTransactions", + "tags": [ + "vectorsDB" + ], + "description": "List transactions across all databases.", + "responses": { + "200": { + "description": "Transaction List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transactionList" } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.listMFAFactors" } - }, - { - "name": "listMFAFactors", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listTransactions", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "vectorsdb\/list-transactions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "server", + "client" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries).", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaFactors" + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create transaction", + "operationId": "vectorsDBCreateTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Create a new transaction.", + "responses": { + "201": { + "description": "Transaction", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/transaction" } - ], - "description": "List the factors available on the account to be used as a MFA challange.", - "demo": "users\/list-mfa-factors.md", - "public": true + } } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createTransaction", + "group": "transactions", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-transaction.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": [ + "console", + "server", + "client" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", "auth": { "Project": [], "Key": [] @@ -59608,119 +72196,70 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], - "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": { + "ttl": { + "type": "integer", + "description": "Seconds before the transaction expires.", + "default": 300, + "x-example": 60, + "format": "int32" + } + } + } + } } - ] + } } }, - "\/users\/{userId}\/mfa\/recovery-codes": { + "\/vectorsdb\/transactions\/{transactionId}": { "get": { - "summary": "Get MFA recovery codes", - "operationId": "usersGetMfaRecoveryCodes", + "summary": "Get transaction", + "operationId": "vectorsDBGetTransaction", "tags": [ - "users" + "vectorsDB" ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "description": "Get a transaction by its unique ID.", "responses": { "200": { - "description": "MFA Recovery Codes", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "getMfaRecoveryCodes", - "group": "mfa", + "method": "getTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "users\/get-mfa-recovery-codes.md", + "demo": "vectorsdb\/get-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "documents.read", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - }, - "methods": [ - { - "name": "getMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.getMFARecoveryCodes" - } - }, - { - "name": "getMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/get-mfa-recovery-codes.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", "auth": { "Project": [], "Key": [] @@ -59729,117 +72268,62 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } ] }, - "put": { - "summary": "Update MFA recovery codes (regenerate)", - "operationId": "usersUpdateMfaRecoveryCodes", + "patch": { + "summary": "Update transaction", + "operationId": "vectorsDBUpdateTransaction", "tags": [ - "users" + "vectorsDB" ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", + "description": "Update a transaction, to either commit or roll back its operations.", "responses": { "200": { - "description": "MFA Recovery Codes", + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "$ref": "#\/components\/schemas\/transaction" } } } } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "updateMfaRecoveryCodes", - "group": "mfa", + "method": "updateTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "users\/update-mfa-recovery-codes.md", + "demo": "vectorsdb\/update-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "documents.write", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - }, - "methods": [ - { - "name": "updateMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.updateMFARecoveryCodes" - } - }, - { - "name": "updateMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](\/docs\/references\/cloud\/client-web\/account#createMfaRecoveryCodes) method.", - "demo": "users\/update-mfa-recovery-codes.md", - "public": false - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", "auth": { "Project": [], "Key": [] @@ -59848,117 +72332,78 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } - ] - }, - "patch": { - "summary": "Create MFA recovery codes", - "operationId": "usersCreateMfaRecoveryCodes", - "tags": [ - "users" ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "responses": { - "201": { - "description": "MFA Recovery Codes", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/mfaRecoveryCodes" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "boolean", + "description": "Commit transaction?", + "default": false, + "x-example": false + }, + "rollback": { + "type": "boolean", + "description": "Rollback transaction?", + "default": false, + "x-example": false + } } } } } + } + }, + "delete": { + "summary": "Delete transaction", + "operationId": "vectorsDBDeleteTransaction", + "tags": [ + "vectorsDB" + ], + "description": "Delete a transaction by its unique ID.", + "responses": { + "204": { + "description": "No content" + } }, - "deprecated": true, + "deprecated": false, "x-appwrite": { - "method": "createMfaRecoveryCodes", - "group": "mfa", + "method": "deleteTransaction", + "group": "transactions", "cookies": false, "type": "", - "demo": "users\/create-mfa-recovery-codes.md", + "demo": "vectorsdb\/delete-transaction.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "documents.write", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, - "public": false, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - }, - "methods": [ - { - "name": "createMfaRecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": false, - "deprecated": { - "since": "1.8.0", - "replaceWith": "users.createMFARecoveryCodes" - } - }, - { - "name": "createMFARecoveryCodes", - "namespace": "users", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "userId" - ], - "required": [ - "userId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/mfaRecoveryCodes" - } - ], - "description": "Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](\/docs\/references\/cloud\/client-web\/account#createMfaChallenge) method by client SDK.", - "demo": "users\/create-mfa-recovery-codes.md", - "public": true - } - ], + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", "auth": { "Project": [], "Key": [] @@ -59967,38 +72412,40 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } ] } }, - "\/users\/{userId}\/name": { - "patch": { - "summary": "Update name", - "operationId": "usersUpdateName", + "\/vectorsdb\/transactions\/{transactionId}\/operations": { + "post": { + "summary": "Create operations", + "operationId": "vectorsDBCreateOperations", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user name by its unique ID.", + "description": "Create multiple operations in a single transaction.", "responses": { - "200": { - "description": "User", + "201": { + "description": "Transaction", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/transaction" } } } @@ -60006,22 +72453,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateName", - "group": "users", + "method": "createOperations", + "group": "transactions", "cookies": false, "type": "", - "demo": "users\/update-name.md", + "demo": "vectorsdb\/create-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "documents.write", "platforms": [ "console", - "server" + "server", + "client" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", "auth": { "Project": [], "Key": [] @@ -60030,17 +72478,19 @@ "security": [ { "Project": [], - "Key": [] + "Key": [], + "Session": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "transactionId", + "description": "Transaction ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<TRANSACTION_ID>" }, "in": "path" } @@ -60051,36 +72501,37 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "x-example": "<NAME>" + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } } - }, - "required": [ - "name" - ] + } } } } } } }, - "\/users\/{userId}\/password": { - "patch": { - "summary": "Update password", - "operationId": "usersUpdatePassword", + "\/vectorsdb\/{databaseId}": { + "get": { + "summary": "Get database", + "operationId": "vectorsDBGet", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user password by its unique ID.", + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", "responses": { "200": { - "description": "User", + "description": "Database", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/database" } } } @@ -60088,22 +72539,83 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePassword", - "group": "users", + "method": "get", + "group": "vectorsdb", + "cookies": false, + "type": "", + "demo": "vectorsdb\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update database", + "operationId": "vectorsDBUpdate", + "tags": [ + "vectorsDB" + ], + "description": "Update a database by its unique ID.", + "responses": { + "200": { + "description": "Database", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/database" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "update", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "users\/update-password.md", + "demo": "vectorsdb\/update.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", "auth": { "Project": [], "Key": [] @@ -60117,12 +72629,12 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -60133,60 +72645,75 @@ "schema": { "type": "object", "properties": { - "password": { + "name": { "type": "string", - "description": "New user password. Must be at least 8 chars.", - "x-example": "password", - "format": "password" + "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.", + "default": true, + "x-example": false + }, + "specification": { + "type": "string", + "description": "Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.", + "x-example": "serverless", + "x-nullable": true + }, + "replicas": { + "type": "integer", + "description": "Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.", + "x-example": 0, + "format": "int32", + "x-nullable": true + }, + "syncMode": { + "type": "string", + "description": "Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.", + "x-example": "async", + "x-nullable": true } }, "required": [ - "password" + "name" ] } } } } - } - }, - "\/users\/{userId}\/phone": { - "patch": { - "summary": "Update phone", - "operationId": "usersUpdatePhone", + }, + "delete": { + "summary": "Delete database", + "operationId": "vectorsDBDelete", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user phone by its unique ID.", + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updatePhone", - "group": "users", + "method": "delete", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "users\/update-phone.md", + "demo": "vectorsdb\/delete.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "databases.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", "auth": { "Project": [], "Key": [] @@ -60200,53 +72727,33 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "User phone number.", - "x-example": "+12065550100", - "format": "phone" - } - }, - "required": [ - "number" - ] - } - } - } - } + ] } }, - "\/users\/{userId}\/prefs": { + "\/vectorsdb\/{databaseId}\/collections": { "get": { - "summary": "Get user preferences", - "operationId": "usersGetPrefs", + "summary": "List collections", + "operationId": "vectorsDBListCollections", "tags": [ - "users" + "vectorsDB" ], - "description": "Get the user preferences by its unique ID.", + "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": "Preferences", + "description": "VectorsDB Collections List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/vectorsdbCollectionList" } } } @@ -60254,22 +72761,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getPrefs", - "group": "users", + "method": "listCollections", + "group": "collections", "cookies": false, "type": "", - "demo": "users\/get-prefs.md", + "demo": "vectorsdb\/list-collections.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", "auth": { "Project": [], "Key": [] @@ -60283,31 +72790,66 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "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" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, - "patch": { - "summary": "Update user preferences", - "operationId": "usersUpdatePrefs", + "post": { + "summary": "Create collection", + "operationId": "vectorsDBCreateCollection", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "Preferences", + "201": { + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/preferences" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -60315,22 +72857,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updatePrefs", - "group": "users", + "method": "createCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "users\/update-prefs.md", + "demo": "vectorsdb\/create-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", "auth": { "Project": [], "Key": [] @@ -60344,12 +72886,12 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } @@ -60360,15 +72902,50 @@ "schema": { "type": "object", "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "x-example": "<NAME>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimension.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "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": [ - "prefs" + "collectionId", + "name", + "dimension" ] } } @@ -60376,21 +72953,21 @@ } } }, - "\/users\/{userId}\/sessions": { + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { "get": { - "summary": "List user sessions", - "operationId": "usersListSessions", + "summary": "Get collection", + "operationId": "vectorsDBGetCollection", "tags": [ - "users" + "vectorsDB" ], - "description": "Get the user sessions list by its unique ID.", + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", "responses": { "200": { - "description": "Sessions List", + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/sessionList" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -60398,25 +72975,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSessions", - "group": "sessions", + "method": "getCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "users\/list-sessions.md", + "demo": "vectorsdb\/get-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.read", - "sessions.read" - ], + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", "auth": { "Project": [], "Key": [] @@ -60430,42 +73004,41 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<COLLECTION_ID>" }, - "in": "query" + "in": "path" } ] }, - "post": { - "summary": "Create session", - "operationId": "usersCreateSession", + "put": { + "summary": "Update collection", + "operationId": "vectorsDBUpdateCollection", "tags": [ - "users" + "vectorsDB" ], - "description": "Creates a session for a user. Returns an immediately usable session object.\n\nIf you want to generate a token for a custom authentication flow, use the [POST \/users\/{userId}\/tokens](https:\/\/appwrite.io\/docs\/server\/users#createToken) endpoint.", + "description": "Update a collection by its unique ID.", "responses": { - "201": { - "description": "Session", + "200": { + "description": "VectorsDB Collection", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/session" + "$ref": "#\/components\/schemas\/vectorsdbCollection" } } } @@ -60473,25 +73046,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSession", - "group": "sessions", + "method": "updateCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "users\/create-session.md", + "demo": "vectorsdb\/update-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", "auth": { "Project": [], "Key": [] @@ -60505,27 +73075,79 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<USER_ID>" + "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>" + }, + "dimension": { + "type": "integer", + "description": "Embedding dimensions.", + "x-example": 1, + "format": "int32" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documentSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "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 user sessions", - "operationId": "usersDeleteSessions", + "summary": "Delete collection", + "operationId": "vectorsDBDeleteCollection", "tags": [ - "users" + "vectorsDB" ], - "description": "Delete all user's sessions by using the user's unique ID.", + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { "204": { "description": "No content" @@ -60533,25 +73155,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteSessions", - "group": "sessions", + "method": "deleteCollection", + "group": "collections", "cookies": false, "type": "", - "demo": "users\/delete-sessions.md", + "demo": "vectorsdb\/delete-collection.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", "auth": { "Project": [], "Key": [] @@ -60565,102 +73184,163 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } ] } }, - "\/users\/{userId}\/sessions\/{sessionId}": { - "delete": { - "summary": "Delete user session", - "operationId": "usersDeleteSession", + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { + "get": { + "summary": "List documents", + "operationId": "vectorsDBListDocuments", "tags": [ - "users" + "vectorsDB" ], - "description": "Delete a user sessions by its unique ID.", + "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": { - "204": { - "description": "No content" + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSession", - "group": "sessions", + "method": "listDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/delete-session.md", + "demo": "vectorsdb\/list-documents.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": [ - "users.write", - "sessions.write" - ], + "scope": "documents.read", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", - "required": true, + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, "schema": { - "type": "string", - "x-example": "<USER_ID>" + "type": "boolean", + "x-example": false, + "default": true }, - "in": "path" + "in": "query" }, { - "name": "sessionId", - "description": "Session ID.", - "required": true, + "name": "ttl", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "required": false, "schema": { - "type": "string", - "x-example": "<SESSION_ID>" + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 }, - "in": "path" + "in": "query" } ] - } - }, - "\/users\/{userId}\/status": { - "patch": { - "summary": "Update user status", - "operationId": "usersUpdateStatus", + }, + "post": { + "summary": "Create document", + "operationId": "vectorsDBCreateDocument", "tags": [ - "users" + "vectorsDB" ], - "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.", + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { - "200": { - "description": "User", + "201": { + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/document" } } } @@ -60668,41 +73348,115 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateStatus", - "group": "users", + "method": "createDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/update-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/create-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", + "methods": [ + { + "name": "createDocument", + "namespace": "vectorsDB", + "desc": "Create document", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-document.md", + "public": true + }, + { + "name": "createDocuments", + "namespace": "vectorsDB", + "desc": "Create documents", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/create-documents.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "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" } @@ -60713,36 +73467,66 @@ "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 + "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>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } }, "required": [ - "status" + "documentId", + "data" ] } } } } - } - }, - "\/users\/{userId}\/targets": { - "get": { - "summary": "List user targets", - "operationId": "usersListTargets", + }, + "put": { + "summary": "Upsert documents", + "operationId": "vectorsDBUpsertDocuments", "tags": [ - "users" + "vectorsDB" ], - "description": "List the messaging targets that are associated with a user.", + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", "responses": { - "200": { - "description": "Target list", + "201": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/targetList" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -60750,22 +73534,53 @@ }, "deprecated": false, "x-appwrite": { - "method": "listTargets", - "group": "targets", + "method": "upsertDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/list-targets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "demo": "vectorsdb\/upsert-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", + "methods": [ + { + "name": "upsertDocuments", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "demo": "vectorsdb\/upsert-documents.md", + "public": true + } + ], "auth": { "Project": [], "Key": [] @@ -60779,55 +73594,68 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "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: userId, providerId, identifier, providerType", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "collectionId", + "description": "Collection ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "<COLLECTION_ID>" }, - "in": "query" + "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "documents": { + "type": "array", + "description": "Array of document data as JSON objects. May contain partial documents.", + "x-example": null, + "items": { + "type": "object" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" + } + }, + "required": [ + "documents" + ] + } + } + } + } }, - "post": { - "summary": "Create user target", - "operationId": "usersCreateTarget", + "patch": { + "summary": "Update documents", + "operationId": "vectorsDBUpdateDocuments", "tags": [ - "users" + "vectorsDB" ], - "description": "Create a messaging target.", + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { - "201": { - "description": "Target", + "200": { + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -60835,22 +73663,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTarget", - "group": "targets", + "method": "updateDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/create-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", "auth": { "Project": [], "Key": [] @@ -60864,12 +73692,22 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" }, "in": "path" } @@ -60880,74 +73718,46 @@ "schema": { "type": "object", "properties": { - "targetId": { - "type": "string", - "description": "Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<TARGET_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "providerType": { - "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email", - "enum": [ - "email", - "sms", - "push" - ], - "x-enum-name": "MessagingProviderType", - "x-enum-keys": [ - "email", - "sms", - "push" - ] - }, - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "x-example": "<IDENTIFIER>" + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" }, - "providerId": { - "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "name": { + "transactionId": { "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } - }, - "required": [ - "targetId", - "providerType", - "identifier" - ] + } } } } } - } - }, - "\/users\/{userId}\/targets\/{targetId}": { - "get": { - "summary": "Get user target", - "operationId": "usersGetTarget", + }, + "delete": { + "summary": "Delete documents", + "operationId": "vectorsDBDeleteDocuments", "tags": [ - "users" + "vectorsDB" ], - "description": "Get a user's push notification target by ID.", + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { - "description": "Target", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -60955,22 +73765,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTarget", - "group": "targets", + "method": "deleteDocuments", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/get-target.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", + "demo": "vectorsdb\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ - "server", - "console" + "console", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", "auth": { "Project": [], "Key": [] @@ -60984,41 +73794,66 @@ ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "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" + }, + { + "name": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] - }, - "patch": { - "summary": "Update user target", - "operationId": "usersUpdateTarget", + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", "tags": [ - "users" + "vectorsDB" ], - "description": "Update a messaging target.", + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", "responses": { "200": { - "description": "Target", + "description": "Documents List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/target" + "$ref": "#\/components\/schemas\/documentList" } } } @@ -61026,51 +73861,54 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTarget", - "group": "targets", + "method": "createQuery", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/update-target.md", + "demo": "vectorsdb\/create-query.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "documents.read", "platforms": [ - "server", - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "x-example": "<COLLECTION_ID>" }, "in": "path" } @@ -61081,110 +73919,162 @@ "schema": { "type": "object", "properties": { - "identifier": { - "type": "string", - "description": "The target identifier (token, email, phone etc.)", - "default": "", - "x-example": "<IDENTIFIER>" + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } }, - "providerId": { + "transactionId": { "type": "string", - "description": "Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.", - "default": "", - "x-example": "<PROVIDER_ID>" + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "<TRANSACTION_ID>" }, - "name": { - "type": "string", - "description": "Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23.", - "default": "", - "x-example": "<NAME>" + "total": { + "type": "boolean", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "default": true, + "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" } } } } } } - }, - "delete": { - "summary": "Delete user target", - "operationId": "usersDeleteTarget", + } + }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "get": { + "summary": "Get document", + "operationId": "vectorsDBGetDocument", "tags": [ - "users" + "vectorsDB" ], - "description": "Delete a messaging target.", + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTarget", - "group": "targets", + "method": "getDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/delete-target.md", + "demo": "vectorsdb\/get-document.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "scope": "documents.read", "platforms": [ - "server", - "console" + "console", + "client", + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" }, { - "name": "targetId", - "description": "Target ID.", + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "<TARGET_ID>" + "x-example": "<COLLECTION_ID>" }, "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DOCUMENT_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } ] - } - }, - "\/users\/{userId}\/tokens": { - "post": { - "summary": "Create token", - "operationId": "usersCreateToken", + }, + "put": { + "summary": "Upsert a document", + "operationId": "vectorsDBUpsertDocument", "tags": [ - "users" + "vectorsDB" ], - "description": "Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT \/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process.\n", + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", "responses": { "201": { - "description": "Token", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/token" + "$ref": "#\/components\/schemas\/document" } } } @@ -61192,41 +74082,100 @@ }, "deprecated": false, "x-appwrite": { - "method": "createToken", - "group": "sessions", + "method": "upsertDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/create-token.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", + "methods": [ + { + "name": "upsertDocument", + "namespace": "vectorsDB", + "desc": "", + "auth": { + "Project": [], + "Session": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "collectionId", + "documentId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "demo": "vectorsdb\/upsert-document.md", + "public": true + } + ], "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "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-appwrite": { + "idGenerator": "ID.unique" + }, + "x-example": "<DOCUMENT_ID>" }, "in": "path" } @@ -61237,42 +74186,45 @@ "schema": { "type": "object", "properties": { - "length": { - "type": "integer", - "description": "Token length in characters. The default length is 6 characters", - "default": 6, - "x-example": 4, - "format": "int32" + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", + "default": [], + "x-example": "{}" }, - "expire": { - "type": "integer", - "description": "Token expiration period in seconds. The default expiration is 15 minutes.", - "default": 900, - "x-example": 60, - "format": "int32" + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } } } } } } - } - }, - "\/users\/{userId}\/verification": { + }, "patch": { - "summary": "Update email verification", - "operationId": "usersUpdateEmailVerification", + "summary": "Update document", + "operationId": "vectorsDBUpdateDocument", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user email verification status by its unique ID.", + "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": "User", + "description": "Document", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/user" + "$ref": "#\/components\/schemas\/document" } } } @@ -61280,41 +74232,64 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateEmailVerification", - "group": "users", + "method": "updateDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/update-email-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/update-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "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" } @@ -61325,118 +74300,134 @@ "schema": { "type": "object", "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "x-example": false + "data": { + "type": "object", + "description": "Document data as JSON object. Include only fields and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "<TRANSACTION_ID>" } - }, - "required": [ - "emailVerification" - ] + } } } } } - } - }, - "\/users\/{userId}\/verification\/phone": { - "patch": { - "summary": "Update phone verification", - "operationId": "usersUpdatePhoneVerification", + }, + "delete": { + "summary": "Delete document", + "operationId": "vectorsDBDeleteDocument", "tags": [ - "users" + "vectorsDB" ], - "description": "Update the user phone verification status by its unique ID.", + "description": "Delete a document by its unique ID.", "responses": { - "200": { - "description": "User", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/user" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updatePhoneVerification", - "group": "users", + "method": "deleteDocument", + "group": "documents", "cookies": false, "type": "", - "demo": "users\/update-phone-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", + "demo": "vectorsdb\/delete-document.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", "platforms": [ "console", + "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", "auth": { "Project": [], - "Key": [] + "Session": [] } }, "security": [ { "Project": [], - "Key": [] + "Session": [], + "Key": [], + "JWT": [] } ], "parameters": [ { - "name": "userId", - "description": "User ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<USER_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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": "transactionId", + "description": "Transaction ID for staging the operation.", + "required": false, + "schema": { + "type": "string", + "x-example": "<TRANSACTION_ID>" + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "phoneVerification": { - "type": "boolean", - "description": "User phone verification status.", - "x-example": false - } - }, - "required": [ - "phoneVerification" - ] - } - } - } - } + ] } }, - "\/vectorsdb": { + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { "get": { - "summary": "List databases", - "operationId": "vectorsDBList", + "summary": "List indexes", + "operationId": "vectorsDBListIndexes", "tags": [ "vectorsDB" ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "description": "List indexes in the collection.", "responses": { "200": { - "description": "Databases List", + "description": "Indexes List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/databaseList" + "$ref": "#\/components\/schemas\/indexList" } } } @@ -61444,22 +74435,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "vectorsdb", + "method": "listIndexes", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/list.md", + "demo": "vectorsdb\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", "auth": { "Project": [], "Key": [] @@ -61472,9 +74463,29 @@ } ], "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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", @@ -61499,19 +74510,19 @@ ] }, "post": { - "summary": "Create database", - "operationId": "vectorsDBCreate", + "summary": "Create index", + "operationId": "vectorsDBCreateIndex", "tags": [ "vectorsDB" ], - "description": "Create a new Database.\n", + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { - "201": { - "description": "Database", + "202": { + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/index" } } } @@ -61519,22 +74530,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "vectorsdb", + "method": "createIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/create.md", + "demo": "vectorsdb\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "collections.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", "auth": { "Project": [], "Key": [] @@ -61546,44 +74557,101 @@ "Key": [] } ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "databaseId": { + "key": { "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-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Index Key.", + "x-example": null }, - "name": { + "type": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Index type.", + "x-example": "hnsw_euclidean", + "enum": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ], + "x-enum-name": "VectorsDBIndexType", + "x-enum-keys": [ + "hnsw_euclidean", + "hnsw_dot", + "hnsw_cosine", + "object", + "key", + "unique" + ] }, - "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 + "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" + } }, - "dedicatedDatabaseId": { - "type": "string", - "description": "Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.", - "default": "", - "x-example": "<DEDICATED_DATABASE_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "x-enum-name": "OrderBy", + "x-enum-keys": [ + "asc", + "desc" + ] + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" } } }, "required": [ - "databaseId", - "name" + "key", + "type", + "attributes" ] } } @@ -61591,21 +74659,21 @@ } } }, - "\/vectorsdb\/embeddings\/text": { - "post": { - "summary": "Create text embeddings", - "operationId": "vectorsDBCreateTextEmbeddings", + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "vectorsDBGetIndex", "tags": [ "vectorsDB" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Get index by ID.", "responses": { "200": { - "description": "Embedding list", + "description": "Index", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/embeddingList" + "$ref": "#\/components\/schemas\/index" } } } @@ -61613,49 +74681,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTextEmbeddings", - "group": "documents", + "method": "getIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/create-text-embeddings.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "vectorsdb\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createTextEmbeddings", - "namespace": "vectorsDB", - "desc": "Create Text Embedding", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "texts", - "model" - ], - "required": [ - "texts" - ], - "responses": [ - { - "code": 200, - "model": "#\/components\/schemas\/embeddingList" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-text-embeddings.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", "auth": { "Project": [], "Key": [] @@ -61664,92 +74705,71 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "texts": { - "type": "array", - "description": "Array of text to generate embeddings.", - "x-example": null, - "items": { - "type": "string" - } - }, - "model": { - "type": "string", - "description": "The embedding model to use for generating vector embeddings.", - "default": "nomic-embed-text", - "x-example": "nomic-embed-text", - "enum": [ - "nomic-embed-text", - "embedding-gemma", - "all-minilm", - "bge-small" - ], - "x-enum-name": "EmbeddingModel", - "x-enum-keys": [ - "nomic-embed-text", - "embedding-gemma", - "all-minilm", - "bge-small" - ] - } - }, - "required": [ - "texts" - ] - } - } + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "<COLLECTION_ID>" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } - } - } - }, - "\/vectorsdb\/transactions": { - "get": { - "summary": "List transactions", - "operationId": "vectorsDBListTransactions", + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "vectorsDBDeleteIndex", "tags": [ "vectorsDB" ], - "description": "List transactions across all databases.", + "description": "Delete an index.", "responses": { - "200": { - "description": "Transaction List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/transactionList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "listTransactions", - "group": "transactions", + "method": "deleteIndex", + "group": "indexes", "cookies": false, "type": "", - "demo": "vectorsdb\/list-transactions.md", + "demo": "vectorsdb\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "collections.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-transactions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", "auth": { "Project": [], "Key": [] @@ -61758,41 +74778,57 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "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).", - "required": false, + "name": "databaseId", + "description": "Database ID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] + "type": "string", + "x-example": "<DATABASE_ID>" }, - "in": "query" + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection 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" } ] - }, + } + }, + "\/vectorsdb\/{databaseId}\/failovers": { "post": { - "summary": "Create transaction", - "operationId": "vectorsDBCreateTransaction", + "summary": "Create failover", + "operationId": "vectorsDBCreateFailover", "tags": [ "vectorsDB" ], - "description": "Create a new transaction.", + "description": "Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.", "responses": { - "201": { - "description": "Transaction", + "202": { + "description": "DedicatedDatabase", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/dedicatedDatabase" } } } @@ -61800,23 +74836,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "createTransaction", - "group": "transactions", + "method": "createFailover", + "group": "failovers", "cookies": false, "type": "", - "demo": "vectorsdb\/create-transaction.md", + "demo": "vectorsdb\/create-failover.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "databases.write", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-transaction.md", "auth": { "Project": [], "Key": [] @@ -61825,9 +74859,19 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" } ], "requestBody": { @@ -61836,12 +74880,11 @@ "schema": { "type": "object", "properties": { - "ttl": { - "type": "integer", - "description": "Seconds before the transaction expires.", - "default": 300, - "x-example": 60, - "format": "int32" + "targetReplicaId": { + "type": "string", + "description": "Target replica ID to promote. If not specified, the healthiest replica is selected.", + "x-example": "<TARGET_REPLICA_ID>", + "x-nullable": true } } } @@ -61850,21 +74893,21 @@ } } }, - "\/vectorsdb\/transactions\/{transactionId}": { + "\/vectorsdb\/{databaseId}\/operations": { "get": { - "summary": "Get transaction", - "operationId": "vectorsDBGetTransaction", + "summary": "List operations", + "operationId": "vectorsDBListOperations", "tags": [ "vectorsDB" ], - "description": "Get a transaction by its unique ID.", + "description": "List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.", "responses": { "200": { - "description": "Transaction", + "description": "OperationList", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperationList" } } } @@ -61872,23 +74915,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "getTransaction", - "group": "transactions", + "method": "listOperations", + "group": "operations", "cookies": false, "type": "", - "demo": "vectorsdb\/get-transaction.md", + "demo": "vectorsdb\/list-operations.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "databases.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-transaction.md", "auth": { "Project": [], "Key": [] @@ -61897,38 +74938,72 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" + }, + { + "name": "status", + "description": "Filter by operation status.", + "required": false, + "schema": { + "type": "string", + "x-example": "running" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of operations to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 1, + "default": 25 + }, + "in": "query" + }, + { + "name": "offset", + "description": "Number of operations to skip.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" } ] - }, - "patch": { - "summary": "Update transaction", - "operationId": "vectorsDBUpdateTransaction", + } + }, + "\/vectorsdb\/{databaseId}\/replicas": { + "get": { + "summary": "Get replicas", + "operationId": "vectorsDBGetReplicas", "tags": [ "vectorsDB" ], - "description": "Update a transaction, to either commit or roll back its operations.", + "description": "Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.", "responses": { "200": { - "description": "Transaction", + "description": "Replicas", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/dedicatedDatabaseReplicas" } } } @@ -61936,23 +75011,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTransaction", - "group": "transactions", + "method": "getReplicas", + "group": "replicas", "cookies": false, "type": "", - "demo": "vectorsdb\/update-transaction.md", + "demo": "vectorsdb\/get-replicas.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "databases.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-transaction.md", "auth": { "Project": [], "Key": [] @@ -61961,78 +75034,60 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "boolean", - "description": "Commit transaction?", - "default": false, - "x-example": false - }, - "rollback": { - "type": "boolean", - "description": "Rollback transaction?", - "default": false, - "x-example": false - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete transaction", - "operationId": "vectorsDBDeleteTransaction", + ] + } + }, + "\/vectorsdb\/{databaseId}\/status": { + "get": { + "summary": "Get status", + "operationId": "vectorsDBGetStatus", "tags": [ "vectorsDB" ], - "description": "Delete a transaction by its unique ID.", + "description": "Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Status", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/databaseStatus" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTransaction", - "group": "transactions", + "method": "getStatus", + "group": "vectorsdb", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-transaction.md", + "demo": "vectorsdb\/get-status.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "databases.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-transaction.md", "auth": { "Project": [], "Key": [] @@ -62041,40 +75096,38 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<DATABASE_ID>" }, "in": "path" } ] } }, - "\/vectorsdb\/transactions\/{transactionId}\/operations": { - "post": { - "summary": "Create operations", - "operationId": "vectorsDBCreateOperations", + "\/waf\/rules": { + "get": { + "summary": "List WAF rules.", + "operationId": "wafListRules", "tags": [ - "vectorsDB" + "waf" ], - "description": "Create multiple operations in a single transaction.", + "description": "List WAF rules for the current project.\n", "responses": { - "201": { - "description": "Transaction", + "200": { + "description": "WAF rule list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/transaction" + "$ref": "#\/components\/schemas\/wafRuleList" } } } @@ -62082,23 +75135,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createOperations", - "group": "transactions", + "method": "listRules", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/create-operations.md", + "demo": "waf\/list-rules.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", + "scope": "wafRules.read", "platforms": [ "console", - "server", - "client" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-operations.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/list-rules.md", "auth": { "Project": [], "Key": [] @@ -62107,60 +75159,63 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", - "required": true, + "name": "queries", + "description": "Array of query strings generated using the Query 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" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "<TRANSACTION_ID>" + "x-example": "<SEARCH>", + "default": "" }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "Array of staged operations.", - "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"<DATABASE_ID>\",\n\t \"collectionId\": \"<COLLECTION_ID>\",\n\t \"documentId\": \"<DOCUMENT_ID>\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", - "items": { - "type": "object" - } - } - } - } - } + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - } + ] } }, - "\/vectorsdb\/{databaseId}": { - "get": { - "summary": "Get database", - "operationId": "vectorsDBGet", + "\/waf\/rules\/bypass": { + "post": { + "summary": "Create a bypass WAF rule.", + "operationId": "wafCreateBypassRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "description": "Create a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "Database", + "201": { + "description": "WafRuleBypass", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/wafRuleBypass" } } } @@ -62168,22 +75223,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "vectorsdb", + "method": "createBypassRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get.md", + "demo": "waf\/create-bypass-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-bypass-rule.md", "auth": { "Project": [], "Key": [] @@ -62195,33 +75250,88 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Leave empty for the API resource type.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } } - ] - }, - "put": { - "summary": "Update database", - "operationId": "vectorsDBUpdate", + } + } + }, + "\/waf\/rules\/bypass\/{ruleId}": { + "patch": { + "summary": "Update a bypass WAF rule.", + "operationId": "wafUpdateBypassRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Update a database by its unique ID.", + "description": "Update a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { "200": { - "description": "Database", + "description": "WafRuleBypass", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/database" + "$ref": "#\/components\/schemas\/wafRuleBypass" } } } @@ -62229,22 +75339,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", - "group": "vectorsdb", + "method": "updateBypassRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/update.md", + "demo": "waf\/update-bypass-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-bypass-rule.md", "auth": { "Project": [], "Key": [] @@ -62258,12 +75368,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } @@ -62274,56 +75384,94 @@ "schema": { "type": "object", "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, "name": { "type": "string", - "description": "Database name. Max length: 128 chars.", - "x-example": "<NAME>" + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true }, "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 + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true } - }, - "required": [ - "name" - ] + } } } } } - }, - "delete": { - "summary": "Delete database", - "operationId": "vectorsDBDelete", + } + }, + "\/waf\/rules\/challenge": { + "post": { + "summary": "Create a challenge WAF rule.", + "operationId": "wafCreateChallengeRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "description": "Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "204": { - "description": "No content" + "201": { + "description": "WafRuleChallenge", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleChallenge" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "vectorsdb", + "method": "createChallengeRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/delete.md", + "demo": "waf\/create-challenge-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "databases.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-challenge-rule.md", "auth": { "Project": [], "Key": [] @@ -62335,35 +75483,108 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "challengeType": { + "type": "string", + "description": "Challenge type enforced by the rule.", + "default": "compute", + "x-example": "compute" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + }, + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "default": 3, + "x-example": 1, + "format": "int32" + }, + "ttl": { + "type": "integer", + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "default": 1800, + "x-example": 900, + "format": "int32" + } + }, + "required": [ + "ruleId", + "resourceType", + "name" + ] + } + } } - ] + } } }, - "\/vectorsdb\/{databaseId}\/collections": { - "get": { - "summary": "List collections", - "operationId": "vectorsDBListCollections", + "\/waf\/rules\/challenge\/{ruleId}": { + "patch": { + "summary": "Update a challenge WAF rule.", + "operationId": "wafUpdateChallengeRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.", + "description": "Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { "200": { - "description": "VectorsDB Collections List", + "description": "WafRuleChallenge", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollectionList" + "$ref": "#\/components\/schemas\/wafRuleChallenge" } } } @@ -62371,22 +75592,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "listCollections", - "group": "collections", + "method": "updateChallengeRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/list-collections.md", + "demo": "waf\/update-challenge-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-collections.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-challenge-rule.md", "auth": { "Project": [], "Key": [] @@ -62400,66 +75621,107 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<DATABASE_ID>" + "x-example": "<RULE_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" } - ] - }, + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "challengeType": { + "type": "string", + "description": "Challenge type enforced by the rule.", + "x-example": "compute", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + }, + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "ttl": { + "type": "integer", + "description": "How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.", + "x-example": 900, + "format": "int32", + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/deny": { "post": { - "summary": "Create collection", - "operationId": "vectorsDBCreateCollection", + "summary": "Create a deny WAF rule.", + "operationId": "wafCreateDenyRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Create a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { "201": { - "description": "VectorsDB Collection", + "description": "WafRuleDeny", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/wafRuleDeny" } } } @@ -62467,22 +75729,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "createCollection", - "group": "collections", + "method": "createDenyRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/create-collection.md", + "demo": "waf\/create-deny-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-deny-rule.md", "auth": { "Project": [], "Key": [] @@ -62494,68 +75756,66 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "collectionId": { + "ruleId": { "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>", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", "x-appwrite": { "idGenerator": "ID.unique" } }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, "name": { "type": "string", - "description": "Collection name. Max length: 128 chars.", + "description": "Rule name.", "x-example": "<NAME>" }, - "dimension": { + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "priority": { "type": "integer", - "description": "Embedding dimension.", - "x-example": 1, + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, "format": "int32" }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "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.", + "description": "Set to false to create the rule in a disabled state.", "default": true, "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null } }, "required": [ - "collectionId", - "name", - "dimension" + "ruleId", + "resourceType", + "name" ] } } @@ -62563,21 +75823,21 @@ } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}": { - "get": { - "summary": "Get collection", - "operationId": "vectorsDBGetCollection", + "\/waf\/rules\/deny\/{ruleId}": { + "patch": { + "summary": "Update a deny WAF rule.", + "operationId": "wafUpdateDenyRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "description": "Update a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { "200": { - "description": "VectorsDB Collection", + "description": "WafRuleDeny", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/wafRuleDeny" } } } @@ -62585,22 +75845,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "getCollection", - "group": "collections", + "method": "updateDenyRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/get-collection.md", + "demo": "waf\/update-deny-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-deny-rule.md", "auth": { "Project": [], "Key": [] @@ -62614,41 +75874,87 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } - ] - }, - "put": { - "summary": "Update collection", - "operationId": "vectorsDBUpdateCollection", + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } + } + }, + "\/waf\/rules\/rate-limit": { + "post": { + "summary": "Create a rate-limit WAF rule.", + "operationId": "wafCreateRateLimitRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Update a collection by its unique ID.", + "description": "Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "VectorsDB Collection", + "201": { + "description": "WafRuleRateLimit", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" + "$ref": "#\/components\/schemas\/wafRuleRateLimit" } } } @@ -62656,22 +75962,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateCollection", - "group": "collections", + "method": "createRateLimitRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/update-collection.md", + "demo": "waf\/create-rate-limit-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-rate-limit-rule.md", "auth": { "Project": [], "Key": [] @@ -62683,104 +75989,131 @@ "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - } - ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, "name": { "type": "string", - "description": "Collection name. Max length: 128 chars.", + "description": "Rule name.", "x-example": "<NAME>" }, - "dimension": { + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "limit": { "type": "integer", - "description": "Embedding dimensions.", + "description": "Maximum number of matching requests allowed in the configured interval.", "x-example": 1, "format": "int32" }, - "permissions": { - "type": "array", - "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "interval": { + "type": "integer", + "description": "Interval in seconds used for rate limiting.", + "x-example": 1, + "format": "int32" }, - "documentSecurity": { - "type": "boolean", - "description": "Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "default": false, - "x-example": false + "key": { + "type": "string", + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "default": "ip", + "x-example": "ip" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" }, "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.", + "description": "Set to false to create the rule in a disabled state.", "default": true, "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null } }, "required": [ - "name" + "ruleId", + "resourceType", + "name", + "limit", + "interval" ] } } } } - }, - "delete": { - "summary": "Delete collection", - "operationId": "vectorsDBDeleteCollection", + } + }, + "\/waf\/rules\/rate-limit\/{ruleId}": { + "patch": { + "summary": "Update a rate-limit WAF rule.", + "operationId": "wafUpdateRateLimitRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "description": "Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "204": { - "description": "No content" + "200": { + "description": "WafRuleRateLimit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/wafRuleRateLimit" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteCollection", - "group": "collections", + "method": "updateRateLimitRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/delete-collection.md", + "demo": "waf\/update-rate-limit-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-collection.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-rate-limit-rule.md", "auth": { "Project": [], "Key": [] @@ -62794,43 +76127,107 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } - ] + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true + }, + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed in the configured interval.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "interval": { + "type": "integer", + "description": "Interval in seconds used for rate limiting.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "key": { + "type": "string", + "description": "Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.", + "x-example": "ip", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true + } + } + } + } + } + } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents": { - "get": { - "summary": "List documents", - "operationId": "vectorsDBListDocuments", + "\/waf\/rules\/redirect": { + "post": { + "summary": "Create a redirect WAF rule.", + "operationId": "wafCreateRedirectRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Get a list of all the user's documents in a given collection. You can use the query params to filter your results.", + "description": "Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "200": { - "description": "Documents List", + "201": { + "description": "WafRuleRedirect", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/wafRuleRedirect" } } } @@ -62838,119 +76235,128 @@ }, "deprecated": false, "x-appwrite": { - "method": "listDocuments", - "group": "documents", + "method": "createRedirectRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/list-documents.md", + "demo": "waf\/create-redirect-rule.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "wafRules.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/create-redirect-rule.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true - }, - "in": "query" - }, - { - "name": "ttl", - "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 - }, - "in": "query" + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.", + "x-example": "<RULE_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule applies to.", + "x-example": "api" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true + }, + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "default": "", + "x-example": "<DESCRIPTION>" + }, + "location": { + "type": "string", + "description": "Location used for redirect responses.", + "x-example": "<LOCATION>" + }, + "statusCode": { + "type": "integer", + "description": "Integer status code used for redirect responses.", + "x-example": 300, + "format": "int32" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "default": 0, + "x-example": -100000, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Set to false to create the rule in a disabled state.", + "default": true, + "x-example": false + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "default": [], + "x-example": null + } + }, + "required": [ + "ruleId", + "resourceType", + "name", + "location", + "statusCode" + ] + } + } } - ] - }, - "post": { - "summary": "Create document", - "operationId": "vectorsDBCreateDocument", + } + } + }, + "\/waf\/rules\/redirect\/{ruleId}": { + "patch": { + "summary": "Update a redirect WAF rule.", + "operationId": "wafUpdateRedirectRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Update a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0\/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.\n", "responses": { - "201": { - "description": "Document", + "200": { + "description": "WafRuleRedirect", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/wafRuleRedirect" } } } @@ -62958,115 +76364,41 @@ }, "deprecated": false, "x-appwrite": { - "method": "createDocument", - "group": "documents", + "method": "updateRedirectRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/create-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-document.md", - "methods": [ - { - "name": "createDocument", - "namespace": "vectorsDB", - "desc": "Create document", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions" - ], - "required": [ - "databaseId", - "collectionId", - "documentId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-document.md", - "public": true - }, - { - "name": "createDocuments", - "namespace": "vectorsDB", - "desc": "Create documents", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/create-documents.md", - "public": true - } + "demo": "waf\/update-redirect-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", + "platforms": [ + "console", + "server" ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/update-redirect-rule.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define attributes before creating documents.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } @@ -63077,63 +76409,84 @@ "schema": { "type": "object", "properties": { - "documentId": { + "resourceType": { "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": "", - "x-example": "<DOCUMENT_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Resource type the rule applies to.", + "x-example": "api", + "x-nullable": true }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": [], - "x-example": "{\"embeddings\": [0.12, -0.55, 0.88, 1.02], \"metadata\": {\"key\":\"value\"} }" + "resourceId": { + "type": "string", + "description": "Resource identifier. Required for functions and sites.", + "x-example": "<RESOURCE_ID>", + "x-nullable": true }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "Rule name.", + "x-example": "<NAME>", + "x-nullable": true }, - "documents": { - "type": "array", - "description": "Array of documents data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "<DESCRIPTION>", + "x-nullable": true }, - "transactionId": { + "location": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Location used for redirect responses.", + "x-example": "<LOCATION>", + "x-nullable": true + }, + "statusCode": { + "type": "integer", + "description": "Integer status code used for redirect responses.", + "x-example": 300, + "format": "int32", + "x-nullable": true + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower numbers run earlier.", + "x-example": -100000, + "format": "int32", + "x-nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Set to false to disable the rule.", + "x-example": false, + "x-nullable": true + }, + "conditions": { + "type": "string", + "description": "Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.", + "x-example": null, + "x-nullable": true } } } } } } - }, - "put": { - "summary": "Upsert documents", - "operationId": "vectorsDBUpsertDocuments", + } + }, + "\/waf\/rules\/{ruleId}": { + "get": { + "summary": "Get a WAF rule.", + "operationId": "wafGetRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", + "description": "Get a WAF rule by its ID.\n", "responses": { - "201": { - "description": "Documents List", + "200": { + "description": "WafRule", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/wafRule" } } } @@ -63141,53 +76494,22 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocuments", - "group": "documents", + "method": "getRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/upsert-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "waf\/get-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-documents.md", - "methods": [ - { - "name": "upsertDocuments", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.\n", - "demo": "vectorsdb\/upsert-documents.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/get-rule.md", "auth": { "Project": [], "Key": [] @@ -63201,91 +76523,50 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_ID>" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Array of document data as JSON objects. May contain partial documents.", - "x-example": null, - "items": { - "type": "object" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - }, - "required": [ - "documents" - ] - } - } - } - } + ] }, - "patch": { - "summary": "Update documents", - "operationId": "vectorsDBUpdateDocuments", + "delete": { + "summary": "Delete a WAF rule.", + "operationId": "wafDeleteRule", "tags": [ - "vectorsDB" + "waf" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "Delete a WAF rule.\n", "responses": { - "200": { - "description": "Documents List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/documentList" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "updateDocuments", - "group": "documents", + "method": "deleteRule", + "group": "rules", "cookies": false, "type": "", - "demo": "vectorsdb\/update-documents.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "waf\/delete-rule.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "wafRules.write", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/waf\/delete-rule.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Key": [] @@ -63299,72 +76580,33 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", + "name": "ruleId", + "description": "Rule ID.", "required": true, "schema": { "type": "string", - "x-example": "<COLLECTION_ID>" + "x-example": "<RULE_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.", - "default": [], - "x-example": "{}" - }, - "queries": { - "type": "array", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", - "default": [], - "x-example": null, - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete documents", - "operationId": "vectorsDBDeleteDocuments", + ] + } + }, + "\/webhooks": { + "get": { + "summary": "List webhooks", + "operationId": "webhooksList", "tags": [ - "vectorsDB" + "webhooks" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", "responses": { "200": { - "description": "Documents List", + "description": "Webhooks List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/documentList" + "$ref": "#\/components\/schemas\/webhookList" } } } @@ -63372,22 +76614,21 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteDocuments", - "group": "documents", + "method": "list", + "group": null, "cookies": false, "type": "", - "demo": "vectorsdb\/delete-documents.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "webhooks\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.read", "platforms": [ "console", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-documents.md", "auth": { "Project": [], "Key": [] @@ -63400,29 +76641,9 @@ } ], "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, { "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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, url, authUsername, tls, events, enabled, logs, attempts", "required": false, "schema": { "type": "array", @@ -63434,33 +76655,156 @@ "in": "query" }, { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", "required": false, "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" + "type": "boolean", + "x-example": false, + "default": true }, "in": "query" } ] + }, + "post": { + "summary": "Create webhook", + "operationId": "webhooksCreate", + "tags": [ + "webhooks" + ], + "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", + "responses": { + "201": { + "description": "Webhook", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/webhook" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": null, + "cookies": false, + "type": "", + "demo": "webhooks\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "webhookId": { + "type": "string", + "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "<WEBHOOK_ID>", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "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" + } + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "password", + "format": "password" + }, + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + }, + "required": [ + "webhookId", + "url", + "name", + "events" + ] + } + } + } + } } }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { + "\/webhooks\/{webhookId}": { "get": { - "summary": "Get document", - "operationId": "vectorsDBGetDocument", + "summary": "Get webhook", + "operationId": "webhooksGet", "tags": [ - "vectorsDB" + "webhooks" ], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", "responses": { "200": { - "description": "Document", + "description": "Webhook", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/webhook" } } } @@ -63468,106 +76812,59 @@ }, "deprecated": false, "x-appwrite": { - "method": "getDocument", - "group": "documents", + "method": "get", + "group": null, "cookies": false, "type": "", - "demo": "vectorsdb\/get-document.md", + "demo": "webhooks\/get.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "webhooks.read", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-document.md", "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "webhookId", + "description": "Webhook ID.", "required": true, "schema": { "type": "string", - "x-example": "<DOCUMENT_ID>" + "x-example": "<WEBHOOK_ID>" }, "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings generated using the Query 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" - }, - { - "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" - }, - "in": "query" } ] }, "put": { - "summary": "Upsert a document", - "operationId": "vectorsDBUpsertDocument", + "summary": "Update webhook", + "operationId": "webhooksUpdate", "tags": [ - "vectorsDB" + "webhooks" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", + "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", "responses": { - "201": { - "description": "Document", + "200": { + "description": "Webhook", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/webhook" } } } @@ -63575,100 +76872,40 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertDocument", - "group": "documents", + "method": "update", + "group": null, "cookies": false, "type": "", - "demo": "vectorsdb\/upsert-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "webhooks\/update.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/upsert-document.md", - "methods": [ - { - "name": "upsertDocument", - "namespace": "vectorsDB", - "desc": "", - "auth": { - "Project": [], - "Session": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documentId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "collectionId", - "documentId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/document" - } - ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#documentsDBCreateCollection) API or directly from your database console.", - "demo": "vectorsdb\/upsert-document.md", - "public": true - } - ], "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" - }, - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", + "name": "webhookId", + "description": "Webhook ID.", "required": true, "schema": { "type": "string", - "x-appwrite": { - "idGenerator": "ID.unique" - }, - "x-example": "<DOCUMENT_ID>" + "x-example": "<WEBHOOK_ID>" }, "in": "path" } @@ -63679,45 +76916,129 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include all required fields of the document to be created or updated.", - "default": [], - "x-example": "{}" + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "x-example": "<NAME>" }, - "permissions": { + "url": { + "type": "string", + "description": "Webhook URL.", + "x-example": null + }, + "events": { "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", + "description": "Events list. Maximum of 100 events are allowed.", + "x-example": null, "items": { "type": "string" } }, - "transactionId": { + "enabled": { + "type": "boolean", + "description": "Enable or disable a webhook.", + "default": true, + "x-example": false + }, + "tls": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": false, + "x-example": false + }, + "authUsername": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "<AUTH_USERNAME>" + }, + "authPassword": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "password", + "format": "password" } - } + }, + "required": [ + "name", + "url", + "events" + ] } } } } }, + "delete": { + "summary": "Delete webhook", + "operationId": "webhooksDelete", + "tags": [ + "webhooks" + ], + "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": null, + "cookies": false, + "type": "", + "demo": "webhooks\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ] + } + }, + "\/webhooks\/{webhookId}\/secret": { "patch": { - "summary": "Update document", - "operationId": "vectorsDBUpdateDocument", + "summary": "Update webhook secret key", + "operationId": "webhooksUpdateSecret", "tags": [ - "vectorsDB" + "webhooks" ], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", "responses": { "200": { - "description": "Document", + "description": "Webhook", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/webhook" } } } @@ -63725,3187 +77046,6019 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateDocument", - "group": "documents", + "method": "updateSecret", + "group": null, "cookies": false, "type": "", - "demo": "vectorsdb\/update-document.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "webhooks\/update-secret.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "webhooks.write", "platforms": [ "console", - "client", "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/update-document.md", "auth": { "Project": [], - "Session": [] + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "webhookId", + "description": "Webhook ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<WEBHOOK_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", + "x-example": "<SECRET>", + "x-nullable": true + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "ping", + "description": "" + }, + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "databases", + "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "tablesDB", + "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" + }, + { + "name": "documentsDB", + "description": "" + }, + { + "name": "vectorsDB", + "description": "" + }, + { + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for secure file access." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to manage your project webhooks." + }, + { + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "advisor", + "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." + }, + { + "name": "mysql", + "description": "" + }, + { + "name": "postgresql", + "description": "" + }, + { + "name": "mongo", + "description": "" + }, + { + "name": "apps", + "description": "The Apps service allows you to manage OAuth2 applications, their keys, secrets, scopes, and installations." + }, + { + "name": "oauth2", + "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "backups", + "description": "The Backups service allows you to manage backup policies, archives, and restorations for your project." + }, + { + "name": "activities", + "description": "The Activities service allows you to list and inspect project activity events." + }, + { + "name": "waf", + "description": "" + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + } + ], + "components": { + "schemas": { + "any": { + "description": "Any", + "type": "object", + "additionalProperties": true, + "example": [] + }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ], + "example": { + "total": 5, + "rows": "" + } + }, + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of 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" + ], + "example": { + "total": 5, + "documents": "" + } + }, + "presenceList": { + "description": "Presences List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of presences that matched your query.", + "x-example": 5, + "format": "int32" + }, + "presences": { + "type": "array", + "description": "List of presences.", + "items": { + "$ref": "#\/components\/schemas\/presence" + }, + "x-example": "" + } + }, + "required": [ + "total", + "presences" + ], + "example": { + "total": 5, + "presences": "" + } + }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } + "required": [ + "total", + "tables" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "tables": "" + } + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/collection" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "databaseList": { + "description": "Databases List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/database" }, - "in": "path" + "x-example": "" } + }, + "required": [ + "total", + "databases" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object. Include only fields and value pairs to be updated.", - "default": [], - "x-example": "{}" - }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - } - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "<TRANSACTION_ID>" - } - } - } - } - } + "example": { + "total": 5, + "databases": "" } }, - "delete": { - "summary": "Delete document", - "operationId": "vectorsDBDeleteDocument", - "tags": [ - "vectorsDB" - ], - "description": "Delete a document by its unique ID.", - "responses": { - "204": { - "description": "No content" + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/index" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "deleteDocument", - "group": "documents", - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-document.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", - "platforms": [ - "console", - "client", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-document.md", - "auth": { - "Project": [], - "Session": [] + "required": [ + "total", + "indexes" + ], + "example": { + "total": 5, + "indexes": "" + } + }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Session": [], - "Key": [], - "JWT": [] - } + "required": [ + "total", + "indexes" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "indexes": "" + } + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "users": { + "type": "array", + "description": "List of users.", + "items": { + "$ref": "#\/components\/schemas\/user" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "users" + ], + "example": { + "total": 5, + "users": "" + } + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DOCUMENT_ID>" + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { + "$ref": "#\/components\/schemas\/session" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "sessions" + ], + "example": { + "total": 5, + "sessions": "" + } + }, + "identityList": { + "description": "Identities List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of identities that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "<TRANSACTION_ID>" + "identities": { + "type": "array", + "description": "List of identities.", + "items": { + "$ref": "#\/components\/schemas\/identity" }, - "in": "query" + "x-example": "" } - ] - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes": { - "get": { - "summary": "List indexes", - "operationId": "vectorsDBListIndexes", - "tags": [ - "vectorsDB" + }, + "required": [ + "total", + "identities" ], - "description": "List indexes in the collection.", - "responses": { - "200": { - "description": "Indexes List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/indexList" - } - } - } + "example": { + "total": 5, + "identities": "" + } + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { + "$ref": "#\/components\/schemas\/log" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "listIndexes", - "group": "indexes", - "cookies": false, - "type": "", - "demo": "vectorsdb\/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/list-indexes.md", - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "logs" + ], + "example": { + "total": 5, + "logs": "" + } + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { + "$ref": "#\/components\/schemas\/file" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "files" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "files": "" + } + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { + "$ref": "#\/components\/schemas\/bucket" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "buckets" + ], + "example": { + "total": 5, + "buckets": "" + } + }, + "resourceTokenList": { + "description": "Resource Tokens List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tokens that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "queries", - "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more 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": [] + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/resourceToken" }, - "in": "query" + "x-example": "" + } + }, + "required": [ + "total", + "tokens" + ], + "example": { + "total": 5, + "tokens": "" + } + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "teams": { + "type": "array", + "description": "List of teams.", + "items": { + "$ref": "#\/components\/schemas\/team" }, - "in": "query" + "x-example": "" } - ] - }, - "post": { - "summary": "Create index", - "operationId": "vectorsDBCreateIndex", - "tags": [ - "vectorsDB" + }, + "required": [ + "total", + "teams" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", - "responses": { - "202": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } + "example": { + "total": 5, + "teams": "" + } + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { + "$ref": "#\/components\/schemas\/membership" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "createIndex", - "group": "indexes", - "cookies": false, - "type": "", - "demo": "vectorsdb\/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-index.md", - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "memberships" + ], + "example": { + "total": 5, + "memberships": "" + } + }, + "siteList": { + "description": "Sites List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sites that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sites": { + "type": "array", + "description": "List of sites.", + "items": { + "$ref": "#\/components\/schemas\/site" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "sites" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "sites": "" + } + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "functions": { + "type": "array", + "description": "List of functions.", + "items": { + "$ref": "#\/components\/schemas\/function" }, - "in": "path" + "x-example": "" } + }, + "required": [ + "total", + "functions" ], - "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": "hnsw_euclidean", - "enum": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ], - "x-enum-name": "VectorsDBIndexType", - "x-enum-keys": [ - "hnsw_euclidean", - "hnsw_dot", - "hnsw_cosine", - "object", - "key", - "unique" - ] - }, - "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.", - "default": [], - "x-example": null, - "items": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "x-enum-name": "OrderBy", - "x-enum-keys": [ - "asc", - "desc" - ] - } - }, - "lengths": { - "type": "array", - "description": "Length of index. Maximum of 100", - "default": [], - "x-example": null, - "items": { - "type": "integer" - } - } - }, - "required": [ - "key", - "type", - "attributes" - ] - } - } - } + "example": { + "total": 5, + "functions": "" } - } - }, - "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}": { - "get": { - "summary": "Get index", - "operationId": "vectorsDBGetIndex", - "tags": [ - "vectorsDB" - ], - "description": "Get index by ID.", - "responses": { - "200": { - "description": "Index", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/index" - } - } - } + }, + "frameworkList": { + "description": "Frameworks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of frameworks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "frameworks": { + "type": "array", + "description": "List of frameworks.", + "items": { + "$ref": "#\/components\/schemas\/framework" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "getIndex", - "group": "indexes", - "cookies": false, - "type": "", - "demo": "vectorsdb\/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/get-index.md", - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "frameworks" + ], + "example": { + "total": 5, + "frameworks": "" + } + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { + "$ref": "#\/components\/schemas\/runtime" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "runtimes" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "runtimes": "" + } + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { + "$ref": "#\/components\/schemas\/deployment" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "deployments" + ], + "example": { + "total": 5, + "deployments": "" + } + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "executions": { + "type": "array", + "description": "List of executions.", + "items": { + "$ref": "#\/components\/schemas\/execution" }, - "in": "path" + "x-example": "" } - ] + }, + "required": [ + "total", + "executions" + ], + "example": { + "total": 5, + "executions": "" + } }, - "delete": { - "summary": "Delete index", - "operationId": "vectorsDBDeleteIndex", - "tags": [ - "vectorsDB" + "projectList": { + "description": "Projects List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects 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" ], - "description": "Delete an index.", - "responses": { - "204": { - "description": "No content" + "example": { + "total": 5, + "projects": "" + } + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { + "$ref": "#\/components\/schemas\/webhook" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "deleteIndex", - "group": "indexes", - "cookies": false, - "type": "", - "demo": "vectorsdb\/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/delete-index.md", - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "webhooks" + ], + "example": { + "total": 5, + "webhooks": "" + } + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/key" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "keys" ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" + "example": { + "total": 5, + "keys": "" + } + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", - "required": true, - "schema": { - "type": "string", - "x-example": "<COLLECTION_ID>" + "countries": { + "type": "array", + "description": "List of countries.", + "items": { + "$ref": "#\/components\/schemas\/country" }, - "in": "path" + "x-example": "" + } + }, + "required": [ + "total", + "countries" + ], + "example": { + "total": 5, + "countries": "" + } + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "schema": { - "type": "string" + "continents": { + "type": "array", + "description": "List of continents.", + "items": { + "$ref": "#\/components\/schemas\/continent" }, - "in": "path" + "x-example": "" } - ] - } - }, - "\/webhooks": { - "get": { - "summary": "List webhooks", - "operationId": "webhooksList", - "tags": [ - "webhooks" + }, + "required": [ + "total", + "continents" ], - "description": "Get a list of all webhooks belonging to the project. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Webhooks List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhookList" - } - } - } + "example": { + "total": 5, + "continents": "" + } + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { + "$ref": "#\/components\/schemas\/language" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "list", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "languages" + ], + "example": { + "total": 5, + "languages": "" + } + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { + "$ref": "#\/components\/schemas\/currency" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "currencies" ], - "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, url, authUsername, tls, events, enabled, logs, attempts", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" + "example": { + "total": 5, + "currencies": "" + } + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones that matched your query.", + "x-example": 5, + "format": "int32" }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, - "schema": { - "type": "boolean", - "x-example": false, - "default": true + "phones": { + "type": "array", + "description": "List of phones.", + "items": { + "$ref": "#\/components\/schemas\/phone" }, - "in": "query" + "x-example": "" } - ] - }, - "post": { - "summary": "Create webhook", - "operationId": "webhooksCreate", - "tags": [ - "webhooks" + }, + "required": [ + "total", + "phones" ], - "description": "Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.", - "responses": { - "201": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } + "example": { + "total": 5, + "phones": "" + } + }, + "variableList": { + "description": "Variables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of variables that matched your query.", + "x-example": 5, + "format": "int32" + }, + "variables": { + "type": "array", + "description": "List of variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "create", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "variables" + ], + "example": { + "total": 5, + "variables": "" + } + }, + "mockNumberList": { + "description": "Mock Numbers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of mockNumbers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "mockNumbers": { + "type": "array", + "description": "List of mockNumbers.", + "items": { + "$ref": "#\/components\/schemas\/mockNumber" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "mockNumbers" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "webhookId": { - "type": "string", - "description": "Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "<WEBHOOK_ID>", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "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" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "password", - "format": "password" - }, - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - }, - "required": [ - "webhookId", - "url", - "name", - "events" - ] - } - } - } + "example": { + "total": 5, + "mockNumbers": "" } - } - }, - "\/webhooks\/{webhookId}": { - "get": { - "summary": "Get webhook", - "operationId": "webhooksGet", - "tags": [ - "webhooks" - ], - "description": "Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. ", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" + }, + "policyList": { + "description": "Policies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of policies in the given project.", + "x-example": 10, + "format": "int32" + }, + "policies": { + "type": "array", + "description": "List of policies.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/policyPasswordDictionary" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordHistory" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordStrength" + }, + { + "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + }, + { + "$ref": "#\/components\/schemas\/policySessionAlert" + }, + { + "$ref": "#\/components\/schemas\/policySessionDuration" + }, + { + "$ref": "#\/components\/schemas\/policySessionInvalidation" + }, + { + "$ref": "#\/components\/schemas\/policySessionLimit" + }, + { + "$ref": "#\/components\/schemas\/policyUserLimit" + }, + { + "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + }, + { + "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyFreeEmail" + }, + { + "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", + "password-history": "#\/components\/schemas\/policyPasswordHistory", + "password-strength": "#\/components\/schemas\/policyPasswordStrength", + "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", + "session-alert": "#\/components\/schemas\/policySessionAlert", + "session-duration": "#\/components\/schemas\/policySessionDuration", + "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", + "session-limit": "#\/components\/schemas\/policySessionLimit", + "user-limit": "#\/components\/schemas\/policyUserLimit", + "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", + "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", + "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", + "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", + "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" } } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "get", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.read", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "policies" ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" + "example": { + "total": 10, + "policies": "" + } + }, + "emailTemplateList": { + "description": "Email Templates List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of templates that matched your query.", + "x-example": 5, + "format": "int32" + }, + "templates": { + "type": "array", + "description": "List of templates.", + "items": { + "$ref": "#\/components\/schemas\/emailTemplate" }, - "in": "path" + "x-example": "" } - ] - }, - "put": { - "summary": "Update webhook", - "operationId": "webhooksUpdate", - "tags": [ - "webhooks" + }, + "required": [ + "total", + "templates" ], - "description": "Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } + "example": { + "total": 5, + "templates": "" + } + }, + "proxyRuleList": { + "description": "Rule List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/proxyRule" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "update", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/update.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "rules" + ], + "example": { + "total": 5, + "rules": "" + } + }, + "localeCodeList": { + "description": "Locale codes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of localeCodes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "localeCodes": { + "type": "array", + "description": "List of localeCodes.", + "items": { + "$ref": "#\/components\/schemas\/localeCode" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "localeCodes" ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" + "example": { + "total": 5, + "localeCodes": "" + } + }, + "providerList": { + "description": "Provider list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of providers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "providers": { + "type": "array", + "description": "List of providers.", + "items": { + "$ref": "#\/components\/schemas\/provider" }, - "in": "path" + "x-example": "" } + }, + "required": [ + "total", + "providers" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "x-example": "<NAME>" - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "x-example": null - }, - "events": { - "type": "array", - "description": "Events list. Maximum of 100 events are allowed.", - "x-example": null, - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean", - "description": "Enable or disable a webhook.", - "default": true, - "x-example": false - }, - "tls": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": false, - "x-example": false - }, - "authUsername": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "<AUTH_USERNAME>" - }, - "authPassword": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "password", - "format": "password" - } - }, - "required": [ - "name", - "url", - "events" - ] - } - } + "example": { + "total": 5, + "providers": "" + } + }, + "messageList": { + "description": "Message list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of messages that matched your query.", + "x-example": 5, + "format": "int32" + }, + "messages": { + "type": "array", + "description": "List of messages.", + "items": { + "$ref": "#\/components\/schemas\/message" + }, + "x-example": "" } + }, + "required": [ + "total", + "messages" + ], + "example": { + "total": 5, + "messages": "" } }, - "delete": { - "summary": "Delete webhook", - "operationId": "webhooksDelete", - "tags": [ - "webhooks" + "topicList": { + "description": "Topic list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of topics that matched your query.", + "x-example": 5, + "format": "int32" + }, + "topics": { + "type": "array", + "description": "List of topics.", + "items": { + "$ref": "#\/components\/schemas\/topic" + }, + "x-example": "" + } + }, + "required": [ + "total", + "topics" ], - "description": "Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. ", - "responses": { - "204": { - "description": "No content" + "example": { + "total": 5, + "topics": "" + } + }, + "subscriberList": { + "description": "Subscriber list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of subscribers that matched your query.", + "x-example": 5, + "format": "int32" + }, + "subscribers": { + "type": "array", + "description": "List of subscribers.", + "items": { + "$ref": "#\/components\/schemas\/subscriber" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "delete", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "subscribers" + ], + "example": { + "total": 5, + "subscribers": "" + } + }, + "targetList": { + "description": "Target list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of targets that matched your query.", + "x-example": 5, + "format": "int32" + }, + "targets": { + "type": "array", + "description": "List of targets.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] + "required": [ + "total", + "targets" + ], + "example": { + "total": 5, + "targets": "" + } + }, + "transactionList": { + "description": "Transaction List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of transactions that matched your query.", + "x-example": 5, + "format": "int32" + }, + "transactions": { + "type": "array", + "description": "List of transactions.", + "items": { + "$ref": "#\/components\/schemas\/transaction" + }, + "x-example": "" } + }, + "required": [ + "total", + "transactions" ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" + "example": { + "total": 5, + "transactions": "" + } + }, + "specificationList": { + "description": "Specifications List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of specifications that matched your query.", + "x-example": 5, + "format": "int32" + }, + "specifications": { + "type": "array", + "description": "List of specifications.", + "items": { + "$ref": "#\/components\/schemas\/specification" }, - "in": "path" + "x-example": "" } - ] - } - }, - "\/webhooks\/{webhookId}\/secret": { - "patch": { - "summary": "Update webhook secret key", - "operationId": "webhooksUpdateSecret", - "tags": [ - "webhooks" + }, + "required": [ + "total", + "specifications" ], - "description": "Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.", - "responses": { - "200": { - "description": "Webhook", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/webhook" - } - } - } + "example": { + "total": 5, + "specifications": "" + } + }, + "vectorsdbCollectionList": { + "description": "VectorsDB Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { + "$ref": "#\/components\/schemas\/vectorsdbCollection" + }, + "x-example": "" } }, - "deprecated": false, - "x-appwrite": { - "method": "updateSecret", - "group": null, - "cookies": false, - "type": "", - "demo": "webhooks\/update-secret.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "webhooks.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [], - "Key": [] + "required": [ + "total", + "collections" + ], + "example": { + "total": 5, + "collections": "" + } + }, + "embeddingList": { + "description": "Embedding list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of embeddings that matched your query.", + "x-example": 5, + "format": "int32" + }, + "embeddings": { + "type": "array", + "description": "List of embeddings.", + "items": { + "$ref": "#\/components\/schemas\/embedding" + }, + "x-example": "" } }, - "security": [ - { - "Project": [], - "Key": [] - } + "required": [ + "total", + "embeddings" ], - "parameters": [ - { - "name": "webhookId", - "description": "Webhook ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<WEBHOOK_ID>" + "example": { + "total": 5, + "embeddings": "" + } + }, + "insightList": { + "description": "Insights List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of insights that matched your query.", + "x-example": 5, + "format": "int32" + }, + "insights": { + "type": "array", + "description": "List of insights.", + "items": { + "$ref": "#\/components\/schemas\/insight" }, - "in": "path" + "x-example": "" } + }, + "required": [ + "total", + "insights" ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.", - "x-example": "<SECRET>", - "x-nullable": true - } - } - } - } - } + "example": { + "total": 5, + "insights": "" } - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "databases", - "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "tablesdb", - "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, - { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." - }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, - { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." - }, - { - "name": "organization", - "description": "The Organization service allows you to manage organization-level projects." - }, - { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - }, - { - "name": "advisor", - "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." - }, - { - "name": "oauth2", - "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." - } - ], - "components": { - "schemas": { - "any": { - "description": "Any", - "type": "object", - "additionalProperties": true, - "example": [] }, - "rowList": { - "description": "Rows List", + "reportList": { + "description": "Reports List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of rows that matched your query.", + "description": "Total number of reports that matched your query.", "x-example": 5, "format": "int32" }, - "rows": { + "reports": { "type": "array", - "description": "List of rows.", + "description": "List of reports.", "items": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/report" }, "x-example": "" } }, "required": [ "total", - "rows" + "reports" ], "example": { "total": 5, - "rows": "" + "reports": "" } }, - "documentList": { - "description": "Documents List", + "database": { + "description": "Database", "type": "object", "properties": { - "total": { + "$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 + }, + "type": { + "type": "string", + "description": "Database type.", + "x-example": "legacy", + "enum": [ + "legacy", + "tablesdb", + "documentsdb", + "vectorsdb", + "mysql", + "postgresql", + "mongodb" + ], + "x-enum-name": "DatabaseType" + }, + "status": { + "type": "string", + "description": "Dedicated database lifecycle status. Null when the database has no valid dedicated backing.", + "x-example": "ready", + "readOnly": true, + "enum": [ + "provisioning", + "ready", + "inactive", + "paused", + "failed", + "deleting", + "deleted", + "restoring", + "scaling", + "upgrading", + "migrating", + "pausing", + "resuming", + "failing-over" + ], + "x-enum-name": "DatabaseStatus", + "nullable": true + }, + "engine": { + "type": "string", + "description": "Underlying engine of the dedicated backing: postgresql, mysql, or mongodb. A managed product (tablesdb, documentsdb, vectorsdb) reports the engine it runs on, so its type and engine can differ. Null when the database has no dedicated backing.", + "x-example": "postgresql", + "readOnly": true, + "nullable": true + }, + "specification": { + "type": "string", + "description": "Compute specification identifier of the dedicated backing, e.g. s-2vcpu-2gb. Null when the database has no dedicated backing.", + "x-example": "s-2vcpu-2gb", + "readOnly": true, + "nullable": true + }, + "replicas": { "type": "integer", - "description": "Total number of documents that matched your query.", - "x-example": 5, + "description": "Number of secondary high availability replicas, excluding the primary. Null when backing configuration is unavailable.", + "x-example": 0, + "format": "int32", + "readOnly": true, + "nullable": true + }, + "policies": { + "type": "array", + "description": "Database backup policies.", + "items": { + "$ref": "#\/components\/schemas\/backupPolicy" + }, + "x-example": {}, + "nullable": true + }, + "archives": { + "type": "array", + "description": "Database backup archives.", + "items": { + "$ref": "#\/components\/schemas\/backupArchive" + }, + "x-example": {}, + "nullable": true + } + }, + "required": [ + "$id", + "name", + "$createdAt", + "$updatedAt", + "enabled", + "type" + ], + "example": { + "$id": "5e5ea5c16897e", + "name": "My Database", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "enabled": false, + "type": "legacy", + "status": "ready", + "engine": "postgresql", + "specification": "s-2vcpu-2gb", + "replicas": 0, + "policies": {}, + "archives": {} + } + }, + "embedding": { + "description": "Embedding", + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Embedding model used to generate embeddings.", + "x-example": "nomic-embed-text" + }, + "dimension": { + "type": "integer", + "description": "Number of dimensions for each embedding vector.", + "x-example": 768, "format": "int32" }, - "documents": { + "embedding": { + "type": "array", + "description": "Embedding vector values. If an error occurs, this will be an empty array.", + "items": { + "type": "number", + "format": "double" + }, + "x-example": [ + 0.01, + 0.02, + 0.03 + ] + }, + "error": { + "type": "string", + "description": "Error message if embedding generation fails. Empty string if no error.", + "x-example": "Error message" + } + }, + "required": [ + "model", + "dimension", + "embedding", + "error" + ], + "example": { + "model": "nomic-embed-text", + "dimension": 768, + "embedding": [ + 0.01, + 0.02, + 0.03 + ], + "error": "Error message" + } + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Collection creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Collection update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeBigint" + }, + { + "$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\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "bigint": "#\/components\/schemas\/attributeBigint", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeBigint": { + "type": "bigint" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } + }, + "x-example": {} + }, + "indexes": { "type": "array", - "description": "List of documents.", + "description": "Collection indexes.", "items": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/index" }, - "x-example": "" - } - }, - "required": [ - "total", - "documents" - ], - "example": { - "total": 5, - "documents": "" - } - }, - "presenceList": { - "description": "Presences List", - "type": "object", - "properties": { - "total": { + "x-example": {} + }, + "bytesMax": { "type": "integer", - "description": "Total number of presences that matched your query.", - "x-example": 5, + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, "format": "int32" }, - "presences": { - "type": "array", - "description": "List of presences.", - "items": { - "$ref": "#\/components\/schemas\/presence" - }, - "x-example": "" - } - }, - "required": [ - "total", - "presences" - ], - "example": { - "total": 5, - "presences": "" - } - }, - "tableList": { - "description": "Tables List", - "type": "object", - "properties": { - "total": { + "bytesUsed": { "type": "integer", - "description": "Total number of tables that matched your query.", - "x-example": 5, + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, "format": "int32" - }, - "tables": { - "type": "array", - "description": "List of tables.", - "items": { - "$ref": "#\/components\/schemas\/table" - }, - "x-example": "" } }, "required": [ - "total", - "tables" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed" ], "example": { - "total": 5, - "tables": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 } }, - "collectionList": { - "description": "Collections List", + "attributeList": { + "description": "Attributes List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections that matched your query.", + "description": "Total number of attributes in the given collection.", "x-example": 5, "format": "int32" }, - "collections": { + "attributes": { "type": "array", - "description": "List of collections.", + "description": "List of attributes.", "items": { - "$ref": "#\/components\/schemas\/collection" + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeBoolean" + }, + { + "$ref": "#\/components\/schemas\/attributeBigint" + }, + { + "$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\/attributePoint" + }, + { + "$ref": "#\/components\/schemas\/attributeLine" + }, + { + "$ref": "#\/components\/schemas\/attributePolygon" + }, + { + "$ref": "#\/components\/schemas\/attributeVarchar" + }, + { + "$ref": "#\/components\/schemas\/attributeText" + }, + { + "$ref": "#\/components\/schemas\/attributeMediumtext" + }, + { + "$ref": "#\/components\/schemas\/attributeLongtext" + }, + { + "$ref": "#\/components\/schemas\/attributeString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/attributeBoolean", + "bigint": "#\/components\/schemas\/attributeBigint", + "integer": "#\/components\/schemas\/attributeInteger", + "double": "#\/components\/schemas\/attributeFloat", + "string": "#\/components\/schemas\/attributeString", + "datetime": "#\/components\/schemas\/attributeDatetime", + "relationship": "#\/components\/schemas\/attributeRelationship", + "point": "#\/components\/schemas\/attributePoint", + "linestring": "#\/components\/schemas\/attributeLine", + "polygon": "#\/components\/schemas\/attributePolygon", + "varchar": "#\/components\/schemas\/attributeVarchar", + "text": "#\/components\/schemas\/attributeText", + "mediumtext": "#\/components\/schemas\/attributeMediumtext", + "longtext": "#\/components\/schemas\/attributeLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/attributeBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/attributeBigint": { + "type": "bigint" + }, + "#\/components\/schemas\/attributeInteger": { + "type": "integer" + }, + "#\/components\/schemas\/attributeFloat": { + "type": "double" + }, + "#\/components\/schemas\/attributeEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/attributeEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/attributeUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/attributeIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/attributeDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/attributeRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/attributePoint": { + "type": "point" + }, + "#\/components\/schemas\/attributeLine": { + "type": "linestring" + }, + "#\/components\/schemas\/attributePolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/attributeVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/attributeText": { + "type": "text" + }, + "#\/components\/schemas\/attributeMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/attributeLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/attributeString": { + "type": "string" + } + } + } }, "x-example": "" } }, "required": [ "total", - "collections" + "attributes" ], "example": { "total": 5, - "collections": "" + "attributes": "" } }, - "databaseList": { - "description": "Databases List", + "attributeString": { + "description": "AttributeString", "type": "object", "properties": { - "total": { + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { "type": "integer", - "description": "Total number of databases that matched your query.", - "x-example": 5, + "description": "Attribute size.", + "x-example": 128, "format": "int32" }, - "databases": { - "type": "array", - "description": "List of databases.", - "items": { - "$ref": "#\/components\/schemas\/database" - }, - "x-example": "" + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "databases" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" ], "example": { - "total": 5, - "databases": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false } }, - "indexList": { - "description": "Indexes List", + "attributeInteger": { + "description": "AttributeInteger", "type": "object", "properties": { - "total": { + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": "" + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "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": [ - "total", - "indexes" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "indexes": "" + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 } }, - "columnIndexList": { - "description": "Column Indexes List", + "attributeBigint": { + "description": "AttributeBigInt", "type": "object", "properties": { - "total": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "bigint" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { "type": "integer", - "description": "Total number of indexes that matched your query.", - "x-example": 5, - "format": "int32" + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { - "$ref": "#\/components\/schemas\/columnIndex" - }, - "x-example": "" + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int64", + "nullable": true } }, "required": [ - "total", - "indexes" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "indexes": "" + "key": "count", + "type": "bigint", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 } }, - "userList": { - "description": "Users List", + "attributeFloat": { + "description": "AttributeFloat", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of users that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" }, - "users": { - "type": "array", - "description": "List of users.", - "items": { - "$ref": "#\/components\/schemas\/user" - }, - "x-example": "" + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true } }, "required": [ - "total", - "users" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "users": "" + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 } }, - "sessionList": { - "description": "Sessions List", + "attributeBoolean": { + "description": "AttributeBoolean", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { - "$ref": "#\/components\/schemas\/session" - }, - "x-example": "" + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "sessions" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "sessions": "" + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false } }, - "identityList": { - "description": "Identities List", + "attributeEmail": { + "description": "AttributeEmail", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of identities that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" }, - "identities": { - "type": "array", - "description": "List of identities.", - "items": { - "$ref": "#\/components\/schemas\/identity" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true } }, "required": [ - "total", - "identities" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "identities": "" + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" } }, - "logList": { - "description": "Logs List", + "attributeEnum": { + "description": "AttributeEnum", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of logs that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" }, - "logs": { + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { "type": "array", - "description": "List of logs.", + "description": "Array of elements in enumerated type.", "items": { - "$ref": "#\/components\/schemas\/log" + "type": "string" }, - "x-example": "" + "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": [ - "total", - "logs" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" ], "example": { - "total": 5, - "logs": "" + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" } }, - "fileList": { - "description": "Files List", + "attributeIp": { + "description": "AttributeIP", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of files that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" }, - "files": { - "type": "array", - "description": "List of files.", - "items": { - "$ref": "#\/components\/schemas\/file" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true } }, "required": [ - "total", - "files" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "files": "" + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" } }, - "bucketList": { - "description": "Buckets List", + "attributeUrl": { + "description": "AttributeURL", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { - "$ref": "#\/components\/schemas\/bucket" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http:\/\/example.com", + "nullable": true } }, "required": [ - "total", - "buckets" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "buckets": "" + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "http:\/\/example.com" } }, - "resourceTokenList": { - "description": "Resource Tokens List", + "attributeDatetime": { + "description": "AttributeDatetime", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of tokens that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "birthDay" }, - "tokens": { - "type": "array", - "description": "List of tokens.", - "items": { - "$ref": "#\/components\/schemas\/resourceToken" - }, - "x-example": "" + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ - "total", - "tokens" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "tokens": "" + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" } }, - "teamList": { - "description": "Teams List", + "attributeRelationship": { + "description": "AttributeRelationship", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of teams that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { - "$ref": "#\/components\/schemas\/team" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedCollection": { + "type": "string", + "description": "The ID of the related collection.", + "x-example": "collection" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" } }, "required": [ - "total", - "teams" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedCollection", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" ], "example": { - "total": 5, - "teams": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedCollection": "collection", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" } }, - "membershipList": { - "description": "Memberships List", + "attributePoint": { + "description": "AttributePoint", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "memberships": { + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { "type": "array", - "description": "List of memberships.", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + 0, + 0 + ], "items": { - "$ref": "#\/components\/schemas\/membership" + "type": "number", + "format": "double" }, - "x-example": "" + "nullable": true } }, "required": [ - "total", - "memberships" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "memberships": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + 0, + 0 + ] } }, - "siteList": { - "description": "Sites List", + "attributeLine": { + "description": "AttributeLine", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of sites that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "sites": { + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { "type": "array", - "description": "List of sites.", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ], "items": { - "$ref": "#\/components\/schemas\/site" + "type": "array", + "items": { + "type": "number", + "format": "double" + } }, - "x-example": "" + "nullable": true } }, "required": [ - "total", - "sites" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "sites": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] } }, - "functionList": { - "description": "Functions List", + "attributePolygon": { + "description": "AttributePolygon", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of functions that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "functions": { + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { "type": "array", - "description": "List of functions.", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ], "items": { - "$ref": "#\/components\/schemas\/function" + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } }, - "x-example": "" + "nullable": true } }, "required": [ - "total", - "functions" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "functions": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] } }, - "frameworkList": { - "description": "Frameworks List", + "attributeVarchar": { + "description": "AttributeVarchar", "type": "object", "properties": { - "total": { + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { "type": "integer", - "description": "Total number of frameworks that matched your query.", - "x-example": 5, + "description": "Attribute size.", + "x-example": 128, "format": "int32" }, - "frameworks": { - "type": "array", - "description": "List of frameworks.", - "items": { - "$ref": "#\/components\/schemas\/framework" - }, - "x-example": "" + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "frameworks" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" ], "example": { - "total": 5, - "frameworks": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false } }, - "runtimeList": { - "description": "Runtimes List", + "attributeText": { + "description": "AttributeText", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { - "$ref": "#\/components\/schemas\/runtime" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "runtimes" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "runtimes": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false } }, - "deploymentList": { - "description": "Deployments List", + "attributeMediumtext": { + "description": "AttributeMediumtext", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { - "$ref": "#\/components\/schemas\/deployment" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "deployments" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "deployments": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false } }, - "executionList": { - "description": "Executions List", + "attributeLongtext": { + "description": "AttributeLongtext", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of executions that matched your query.", - "x-example": 5, - "format": "int32" + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { - "$ref": "#\/components\/schemas\/execution" - }, - "x-example": "" + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this attribute is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "executions" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "executions": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false } }, - "projectList": { - "description": "Projects List", + "vectorsdbCollection": { + "description": "VectorsDB Collection", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of projects that matched your query.", - "x-example": 5, - "format": "int32" + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" }, - "projects": { + "$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": "List of projects.", + "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { - "$ref": "#\/components\/schemas\/project" + "type": "string" }, - "x-example": "" - } - }, - "required": [ - "total", - "projects" - ], - "example": { - "total": 5, - "projects": "" - } - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks that matched your query.", - "x-example": 5, - "format": "int32" + "x-example": [ + "read(\"any\")" + ] }, - "webhooks": { + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "documentSecurity": { + "type": "boolean", + "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "attributes": { "type": "array", - "description": "List of webhooks.", + "description": "Collection attributes.", "items": { - "$ref": "#\/components\/schemas\/webhook" + "anyOf": [ + { + "$ref": "#\/components\/schemas\/attributeObject" + }, + { + "$ref": "#\/components\/schemas\/attributeVector" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "object": "#\/components\/schemas\/attributeObject", + "vector": "#\/components\/schemas\/attributeVector" + } + } }, - "x-example": "" - } - }, - "required": [ - "total", - "webhooks" - ], - "example": { - "total": 5, - "webhooks": "" - } - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys that matched your query.", - "x-example": 5, - "format": "int32" + "x-example": {} }, - "keys": { + "indexes": { "type": "array", - "description": "List of keys.", + "description": "Collection indexes.", "items": { - "$ref": "#\/components\/schemas\/key" + "$ref": "#\/components\/schemas\/index" }, - "x-example": "" - } - }, - "required": [ - "total", - "keys" - ], - "example": { - "total": 5, - "keys": "" - } - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { + "x-example": {} + }, + "bytesMax": { "type": "integer", - "description": "Total number of countries that matched your query.", - "x-example": 5, + "description": "Maximum document size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, "format": "int32" }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { - "$ref": "#\/components\/schemas\/country" - }, - "x-example": "" - } - }, - "required": [ - "total", - "countries" - ], - "example": { - "total": 5, - "countries": "" - } - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { + "bytesUsed": { "type": "integer", - "description": "Total number of continents that matched your query.", - "x-example": 5, + "description": "Currently used document size in bytes based on defined attributes.", + "x-example": 1500, "format": "int32" }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { - "$ref": "#\/components\/schemas\/continent" - }, - "x-example": "" - } - }, - "required": [ - "total", - "continents" - ], - "example": { - "total": 5, - "continents": "" - } - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { + "dimension": { "type": "integer", - "description": "Total number of languages that matched your query.", - "x-example": 5, + "description": "Embedding dimension.", + "x-example": 1536, "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { - "$ref": "#\/components\/schemas\/language" - }, - "x-example": "" } }, "required": [ - "total", - "languages" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "documentSecurity", + "attributes", + "indexes", + "bytesMax", + "bytesUsed", + "dimension" ], "example": { - "total": 5, - "languages": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Collection", + "enabled": false, + "documentSecurity": true, + "attributes": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500, + "dimension": 1536 } }, - "currencyList": { - "description": "Currencies List", + "attributeObject": { + "description": "AttributeObject", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { - "$ref": "#\/components\/schemas\/currency" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "total", - "currencies" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "currencies": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00" } }, - "phoneList": { - "description": "Phones List", + "attributeVector": { + "description": "AttributeVector", "type": "object", "properties": { - "total": { + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "AttributeStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Attribute creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Attribute update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { "type": "integer", - "description": "Total number of phones that matched your query.", - "x-example": 5, + "description": "Vector dimensions.", + "x-example": 1536, "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { - "$ref": "#\/components\/schemas\/phone" - }, - "x-example": "" } }, "required": [ - "total", - "phones" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" ], "example": { - "total": 5, - "phones": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 1536 } }, - "variableList": { - "description": "Variables List", + "table": { + "description": "Table", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of variables that matched your query.", - "x-example": 5, - "format": "int32" + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" }, - "variables": { + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { "type": "array", - "description": "List of variables.", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { - "$ref": "#\/components\/schemas\/variable" + "type": "string" }, - "x-example": "" - } - }, - "required": [ - "total", - "variables" - ], - "example": { - "total": 5, - "variables": "" - } - }, - "mockNumberList": { - "description": "Mock Numbers List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of mockNumbers that matched your query.", - "x-example": 5, - "format": "int32" + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" }, - "mockNumbers": { - "type": "array", - "description": "List of mockNumbers.", - "items": { - "$ref": "#\/components\/schemas\/mockNumber" - }, - "x-example": "" - } - }, - "required": [ - "total", - "mockNumbers" - ], - "example": { - "total": 5, - "mockNumbers": "" - } - }, - "policyList": { - "description": "Policies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of policies in the given project.", - "x-example": 10, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false }, - "policies": { + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { "type": "array", - "description": "List of policies.", + "description": "Table columns.", "items": { "anyOf": [ { - "$ref": "#\/components\/schemas\/policyPasswordDictionary" + "$ref": "#\/components\/schemas\/columnBoolean" }, { - "$ref": "#\/components\/schemas\/policyPasswordHistory" + "$ref": "#\/components\/schemas\/columnBigint" }, { - "$ref": "#\/components\/schemas\/policyPasswordStrength" + "$ref": "#\/components\/schemas\/columnInteger" }, { - "$ref": "#\/components\/schemas\/policyPasswordPersonalData" + "$ref": "#\/components\/schemas\/columnFloat" }, { - "$ref": "#\/components\/schemas\/policySessionAlert" + "$ref": "#\/components\/schemas\/columnEmail" }, { - "$ref": "#\/components\/schemas\/policySessionDuration" + "$ref": "#\/components\/schemas\/columnEnum" }, { - "$ref": "#\/components\/schemas\/policySessionInvalidation" + "$ref": "#\/components\/schemas\/columnUrl" }, { - "$ref": "#\/components\/schemas\/policySessionLimit" + "$ref": "#\/components\/schemas\/columnIp" }, { - "$ref": "#\/components\/schemas\/policyUserLimit" + "$ref": "#\/components\/schemas\/columnDatetime" }, { - "$ref": "#\/components\/schemas\/policyMembershipPrivacy" + "$ref": "#\/components\/schemas\/columnRelationship" }, { - "$ref": "#\/components\/schemas\/policyDenyAliasedEmail" + "$ref": "#\/components\/schemas\/columnPoint" }, { - "$ref": "#\/components\/schemas\/policyDenyDisposableEmail" + "$ref": "#\/components\/schemas\/columnLine" }, { - "$ref": "#\/components\/schemas\/policyDenyFreeEmail" + "$ref": "#\/components\/schemas\/columnPolygon" }, { - "$ref": "#\/components\/schemas\/policyDenyCorporateEmail" + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" } ], "discriminator": { - "propertyName": "$id", + "propertyName": "type", "mapping": { - "password-dictionary": "#\/components\/schemas\/policyPasswordDictionary", - "password-history": "#\/components\/schemas\/policyPasswordHistory", - "password-strength": "#\/components\/schemas\/policyPasswordStrength", - "password-personal-data": "#\/components\/schemas\/policyPasswordPersonalData", - "session-alert": "#\/components\/schemas\/policySessionAlert", - "session-duration": "#\/components\/schemas\/policySessionDuration", - "session-invalidation": "#\/components\/schemas\/policySessionInvalidation", - "session-limit": "#\/components\/schemas\/policySessionLimit", - "user-limit": "#\/components\/schemas\/policyUserLimit", - "membership-privacy": "#\/components\/schemas\/policyMembershipPrivacy", - "deny-aliased-email": "#\/components\/schemas\/policyDenyAliasedEmail", - "deny-disposable-email": "#\/components\/schemas\/policyDenyDisposableEmail", - "deny-free-email": "#\/components\/schemas\/policyDenyFreeEmail", - "deny-corporate-email": "#\/components\/schemas\/policyDenyCorporateEmail" + "boolean": "#\/components\/schemas\/columnBoolean", + "bigint": "#\/components\/schemas\/columnBigint", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnBigint": { + "type": "bigint" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } } } }, - "x-example": "" - } - }, - "required": [ - "total", - "policies" - ], - "example": { - "total": 10, - "policies": "" - } - }, - "emailTemplateList": { - "description": "Email Templates List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of templates that matched your query.", - "x-example": 5, - "format": "int32" + "x-example": {} }, - "templates": { + "indexes": { "type": "array", - "description": "List of templates.", + "description": "Table indexes.", "items": { - "$ref": "#\/components\/schemas\/emailTemplate" + "$ref": "#\/components\/schemas\/columnIndex" }, - "x-example": "" - } - }, - "required": [ - "total", - "templates" - ], - "example": { - "total": 5, - "templates": "" - } - }, - "healthStatusList": { - "description": "Status List", - "type": "object", - "properties": { - "total": { + "x-example": {} + }, + "bytesMax": { "type": "integer", - "description": "Total number of statuses that matched your query.", - "x-example": 5, + "description": "Maximum row size in bytes. Returns 0 when no limit applies.", + "x-example": 65535, "format": "int32" }, - "statuses": { - "type": "array", - "description": "List of statuses.", - "items": { - "$ref": "#\/components\/schemas\/healthStatus" - }, - "x-example": "" - } - }, - "required": [ - "total", - "statuses" - ], - "example": { - "total": 5, - "statuses": "" - } - }, - "proxyRuleList": { - "description": "Rule List", - "type": "object", - "properties": { - "total": { + "bytesUsed": { "type": "integer", - "description": "Total number of rules that matched your query.", - "x-example": 5, + "description": "Currently used row size in bytes based on defined columns.", + "x-example": 1500, "format": "int32" - }, - "rules": { - "type": "array", - "description": "List of rules.", - "items": { - "$ref": "#\/components\/schemas\/proxyRule" - }, - "x-example": "" } }, "required": [ - "total", - "rules" + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes", + "bytesMax", + "bytesUsed" ], "example": { - "total": 5, - "rules": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "databaseId": "5e5ea5c16897e", + "name": "My Table", + "enabled": false, + "rowSecurity": true, + "columns": {}, + "indexes": {}, + "bytesMax": 65535, + "bytesUsed": 1500 } }, - "localeCodeList": { - "description": "Locale codes list", + "columnList": { + "description": "Columns List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes that matched your query.", + "description": "Total number of columns in the given table.", "x-example": 5, "format": "int32" }, - "localeCodes": { + "columns": { "type": "array", - "description": "List of localeCodes.", + "description": "List of columns.", "items": { - "$ref": "#\/components\/schemas\/localeCode" + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnBigint" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnPoint" + }, + { + "$ref": "#\/components\/schemas\/columnLine" + }, + { + "$ref": "#\/components\/schemas\/columnPolygon" + }, + { + "$ref": "#\/components\/schemas\/columnVarchar" + }, + { + "$ref": "#\/components\/schemas\/columnText" + }, + { + "$ref": "#\/components\/schemas\/columnMediumtext" + }, + { + "$ref": "#\/components\/schemas\/columnLongtext" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "boolean": "#\/components\/schemas\/columnBoolean", + "bigint": "#\/components\/schemas\/columnBigint", + "integer": "#\/components\/schemas\/columnInteger", + "double": "#\/components\/schemas\/columnFloat", + "string": "#\/components\/schemas\/columnString", + "datetime": "#\/components\/schemas\/columnDatetime", + "relationship": "#\/components\/schemas\/columnRelationship", + "point": "#\/components\/schemas\/columnPoint", + "linestring": "#\/components\/schemas\/columnLine", + "polygon": "#\/components\/schemas\/columnPolygon", + "varchar": "#\/components\/schemas\/columnVarchar", + "text": "#\/components\/schemas\/columnText", + "mediumtext": "#\/components\/schemas\/columnMediumtext", + "longtext": "#\/components\/schemas\/columnLongtext" + }, + "x-propertyNames": [ + "type", + "format" + ], + "x-mapping": { + "#\/components\/schemas\/columnBoolean": { + "type": "boolean" + }, + "#\/components\/schemas\/columnBigint": { + "type": "bigint" + }, + "#\/components\/schemas\/columnInteger": { + "type": "integer" + }, + "#\/components\/schemas\/columnFloat": { + "type": "double" + }, + "#\/components\/schemas\/columnEmail": { + "type": "string", + "format": "email" + }, + "#\/components\/schemas\/columnEnum": { + "type": "string", + "format": "enum" + }, + "#\/components\/schemas\/columnUrl": { + "type": "string", + "format": "url" + }, + "#\/components\/schemas\/columnIp": { + "type": "string", + "format": "ip" + }, + "#\/components\/schemas\/columnDatetime": { + "type": "datetime" + }, + "#\/components\/schemas\/columnRelationship": { + "type": "relationship" + }, + "#\/components\/schemas\/columnPoint": { + "type": "point" + }, + "#\/components\/schemas\/columnLine": { + "type": "linestring" + }, + "#\/components\/schemas\/columnPolygon": { + "type": "polygon" + }, + "#\/components\/schemas\/columnVarchar": { + "type": "varchar" + }, + "#\/components\/schemas\/columnText": { + "type": "text" + }, + "#\/components\/schemas\/columnMediumtext": { + "type": "mediumtext" + }, + "#\/components\/schemas\/columnLongtext": { + "type": "longtext" + }, + "#\/components\/schemas\/columnString": { + "type": "string" + } + } + } }, "x-example": "" } }, "required": [ "total", - "localeCodes" + "columns" ], "example": { "total": 5, - "localeCodes": "" + "columns": "" } }, - "providerList": { - "description": "Provider list", + "columnString": { + "description": "ColumnString", "type": "object", "properties": { - "total": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { "type": "integer", - "description": "Total number of providers that matched your query.", - "x-example": 5, + "description": "Column size.", + "x-example": 128, "format": "int32" }, - "providers": { - "type": "array", - "description": "List of providers.", - "items": { - "$ref": "#\/components\/schemas\/provider" - }, - "x-example": "" + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "providers" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" ], "example": { - "total": 5, - "providers": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128, + "default": "default", + "encrypt": false } }, - "messageList": { - "description": "Message list", + "columnInteger": { + "description": "ColumnInteger", "type": "object", "properties": { - "total": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { "type": "integer", - "description": "Total number of messages that matched your query.", - "x-example": 5, - "format": "int32" + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true }, - "messages": { - "type": "array", - "description": "List of messages.", - "items": { - "$ref": "#\/components\/schemas\/message" - }, - "x-example": "" + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int32", + "nullable": true } }, "required": [ - "total", - "messages" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "messages": "" + "key": "count", + "type": "integer", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 } }, - "topicList": { - "description": "Topic list", + "columnBigint": { + "description": "ColumnBigInt", "type": "object", "properties": { - "total": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "bigint" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { "type": "integer", - "description": "Total number of topics that matched your query.", - "x-example": 5, - "format": "int32" + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int64", + "nullable": true }, - "topics": { - "type": "array", - "description": "List of topics.", - "items": { - "$ref": "#\/components\/schemas\/topic" - }, - "x-example": "" + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int64", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 10, + "format": "int64", + "nullable": true } }, "required": [ - "total", - "topics" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "topics": "" + "key": "count", + "type": "bigint", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1, + "max": 10, + "default": 10 } }, - "subscriberList": { - "description": "Subscriber list", + "columnFloat": { + "description": "ColumnFloat", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of subscribers that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" }, - "subscribers": { - "type": "array", - "description": "List of subscribers.", - "items": { - "$ref": "#\/components\/schemas\/subscriber" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": 2.5, + "format": "double", + "nullable": true } }, "required": [ - "total", - "subscribers" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "subscribers": "" + "key": "percentageCompleted", + "type": "double", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "min": 1.5, + "max": 10.5, + "default": 2.5 } }, - "targetList": { - "description": "Target list", + "columnBoolean": { + "description": "ColumnBoolean", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of targets that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" }, - "targets": { - "type": "array", - "description": "List of targets.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "nullable": true } }, "required": [ - "total", - "targets" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "targets": "" + "key": "isEnabled", + "type": "boolean", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": false } }, - "transactionList": { - "description": "Transaction List", + "columnEmail": { + "description": "ColumnEmail", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of transactions that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" }, - "transactions": { - "type": "array", - "description": "List of transactions.", - "items": { - "$ref": "#\/components\/schemas\/transaction" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default@example.com", + "nullable": true } }, "required": [ - "total", - "transactions" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "transactions": "" + "key": "userEmail", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "email", + "default": "default@example.com" } }, - "specificationList": { - "description": "Specifications List", + "columnEnum": { + "description": "ColumnEnum", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of specifications that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" }, - "specifications": { + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { "type": "array", - "description": "List of specifications.", + "description": "Array of elements in enumerated type.", "items": { - "$ref": "#\/components\/schemas\/specification" + "type": "string" }, - "x-example": "" + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "element", + "nullable": true } }, "required": [ - "total", - "specifications" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" ], "example": { - "total": 5, - "specifications": "" + "key": "status", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "elements": "element", + "format": "enum", + "default": "element" } }, - "vectorsdbCollectionList": { - "description": "VectorsDB Collections List", + "columnIp": { + "description": "ColumnIP", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of collections that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { - "$ref": "#\/components\/schemas\/vectorsdbCollection" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "192.0.2.0", + "nullable": true } }, "required": [ - "total", - "collections" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "collections": "" + "key": "ipAddress", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "ip", + "default": "192.0.2.0" } }, - "embeddingList": { - "description": "Embedding list", + "columnUrl": { + "description": "ColumnURL", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of embeddings that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" }, - "embeddings": { - "type": "array", - "description": "List of embeddings.", - "items": { - "$ref": "#\/components\/schemas\/embedding" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true } }, "required": [ - "total", - "embeddings" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "embeddings": "" + "key": "githubUrl", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "url", + "default": "https:\/\/example.com" } }, - "insightList": { - "description": "Insights List", + "columnDatetime": { + "description": "ColumnDatetime", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of insights that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" }, - "insights": { - "type": "array", - "description": "List of insights.", - "items": { - "$ref": "#\/components\/schemas\/insight" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ - "total", - "insights" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" ], "example": { - "total": 5, - "insights": "" + "key": "birthDay", + "type": "datetime", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "format": "datetime", + "default": "2020-10-15T06:38:00.000+00:00" } }, - "reportList": { - "description": "Reports List", + "columnRelationship": { + "description": "ColumnRelationship", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of reports that matched your query.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" }, - "reports": { - "type": "array", - "description": "List of reports.", - "items": { - "$ref": "#\/components\/schemas\/report" - }, - "x-example": "" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "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": [ - "total", - "reports" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" ], "example": { - "total": 5, - "reports": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "relatedTable": "table", + "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", + "twoWay": false, + "twoWayKey": "string", + "onDelete": "restrict|cascade|setNull", + "side": "parent|child" } }, - "database": { - "description": "Database", + "columnPoint": { + "description": "ColumnPoint", "type": "object", "properties": { - "$id": { + "key": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" + "description": "Column Key.", + "x-example": "fullName" }, - "name": { + "type": { "type": "string", - "description": "Database name.", - "x-example": "My Database" + "description": "Column type.", + "x-example": "string" }, - "$createdAt": { + "status": { "type": "string", - "description": "Database creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, - "$updatedAt": { + "error": { "type": "string", - "description": "Database update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" }, - "enabled": { + "required": { "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 + "description": "Is column required?", + "x-example": true }, - "type": { + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { "type": "string", - "description": "Database type.", - "x-example": "legacy", - "enum": [ - "legacy", - "tablesdb", - "documentsdb", - "vectorsdb" - ] + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "policies": { - "type": "array", - "description": "Database backup policies.", - "items": { - "$ref": "#\/components\/schemas\/backupPolicy" - }, - "x-example": {} + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "archives": { + "default": { "type": "array", - "description": "Database backup archives.", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + 0, + 0 + ], "items": { - "$ref": "#\/components\/schemas\/backupArchive" + "type": "number", + "format": "double" }, - "x-example": {} + "nullable": true } }, "required": [ - "$id", - "name", - "$createdAt", - "$updatedAt", - "enabled", + "key", "type", - "policies", - "archives" + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "$id": "5e5ea5c16897e", - "name": "My Database", + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "enabled": false, - "type": "legacy", - "policies": {}, - "archives": {} + "default": [ + 0, + 0 + ] } }, - "embedding": { - "description": "Embedding", + "columnLine": { + "description": "ColumnLine", "type": "object", "properties": { - "model": { + "key": { "type": "string", - "description": "Embedding model used to generate embeddings.", - "x-example": "nomic-embed-text" + "description": "Column Key.", + "x-example": "fullName" }, - "dimension": { - "type": "integer", - "description": "Number of dimensions for each embedding vector.", - "x-example": 768, - "format": "int32" + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" }, - "embedding": { - "type": "array", - "description": "Embedding vector values. If an error occurs, this will be an empty array.", - "items": { - "type": "number", - "format": "double" - }, - "x-example": [ - 0.01, - 0.02, - 0.03 - ] + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", - "description": "Error message if embedding generation fails. Empty string if no error.", - "x-example": "Error message" - } - }, - "required": [ - "model", - "dimension", - "embedding", - "error" - ], - "example": { - "model": "nomic-embed-text", - "dimension": 768, - "embedding": [ - 0.01, - 0.02, - 0.03 - ], - "error": "Error message" - } - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true }, "$createdAt": { "type": "string", - "description": "Collection creation date in ISO 8601 format.", + "description": "Column 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.", + "description": "Column update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$permissions": { + "default": { "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, + "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { - "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeBigint" - }, - { - "$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\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } + [ + 0, + 0 ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "bigint": "#\/components\/schemas\/attributeBigint", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeBigint": { - "type": "bigint" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } - } - } - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", + [ + 1, + 1 + ] + ], "items": { - "$ref": "#\/components\/schemas\/index" + "type": "array", + "items": { + "type": "number", + "format": "double" + } }, - "x-example": {} - }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" - }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" + "nullable": true } }, "required": [ - "$id", + "key", + "type", + "status", + "error", + "required", "$createdAt", - "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed" + "$updatedAt" ], "example": { - "$id": "5e5ea5c16897e", + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 + "default": [ + [ + 0, + 0 + ], + [ + 1, + 1 + ] + ] } }, - "attributeList": { - "description": "Attributes List", + "columnPolygon": { + "description": "ColumnPolygon", "type": "object", "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ], + "x-enum-name": "ColumnStatus" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true }, - "attributes": { + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { "type": "array", - "description": "List of attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeBoolean" - }, - { - "$ref": "#\/components\/schemas\/attributeBigint" - }, - { - "$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\/attributePoint" - }, - { - "$ref": "#\/components\/schemas\/attributeLine" - }, - { - "$ref": "#\/components\/schemas\/attributePolygon" - }, - { - "$ref": "#\/components\/schemas\/attributeVarchar" - }, - { - "$ref": "#\/components\/schemas\/attributeText" - }, - { - "$ref": "#\/components\/schemas\/attributeMediumtext" - }, - { - "$ref": "#\/components\/schemas\/attributeLongtext" - }, - { - "$ref": "#\/components\/schemas\/attributeString" - } + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/attributeBoolean", - "bigint": "#\/components\/schemas\/attributeBigint", - "integer": "#\/components\/schemas\/attributeInteger", - "double": "#\/components\/schemas\/attributeFloat", - "string": "#\/components\/schemas\/attributeString", - "datetime": "#\/components\/schemas\/attributeDatetime", - "relationship": "#\/components\/schemas\/attributeRelationship", - "point": "#\/components\/schemas\/attributePoint", - "linestring": "#\/components\/schemas\/attributeLine", - "polygon": "#\/components\/schemas\/attributePolygon", - "varchar": "#\/components\/schemas\/attributeVarchar", - "text": "#\/components\/schemas\/attributeText", - "mediumtext": "#\/components\/schemas\/attributeMediumtext", - "longtext": "#\/components\/schemas\/attributeLongtext" - }, - "x-propertyNames": [ - "type", - "format" + [ + [ + 10, + 10 ], - "x-mapping": { - "#\/components\/schemas\/attributeBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/attributeBigint": { - "type": "bigint" - }, - "#\/components\/schemas\/attributeInteger": { - "type": "integer" - }, - "#\/components\/schemas\/attributeFloat": { - "type": "double" - }, - "#\/components\/schemas\/attributeEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/attributeEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/attributeUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/attributeIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/attributeDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/attributeRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/attributePoint": { - "type": "point" - }, - "#\/components\/schemas\/attributeLine": { - "type": "linestring" - }, - "#\/components\/schemas\/attributePolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/attributeVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/attributeText": { - "type": "text" - }, - "#\/components\/schemas\/attributeMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/attributeLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/attributeString": { - "type": "string" - } + [ + 0, + 0 + ] + ] + ], + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "double" } } }, - "x-example": "" + "nullable": true } }, "required": [ - "total", - "attributes" + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" ], "example": { - "total": 5, - "attributes": "" + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": [ + [ + [ + 0, + 0 + ], + [ + 0, + 10 + ] + ], + [ + [ + 10, + 10 + ], + [ + 0, + 0 + ] + ] + ] } }, - "attributeString": { - "description": "AttributeString", + "columnVarchar": { + "description": "ColumnVarchar", "type": "object", "properties": { "key": { "type": "string", - "description": "Attribute Key.", + "description": "Column Key.", "x-example": "fullName" }, "type": { "type": "string", - "description": "Attribute type.", + "description": "Column type.", "x-example": "string" }, "status": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", "x-example": "available", "enum": [ "available", @@ -66914,49 +83067,49 @@ "stuck", "failed" ], - "x-enum-name": "AttributeStatus" + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", "x-example": "string" }, "required": { "type": "boolean", - "description": "Is attribute required?", + "description": "Is column required?", "x-example": true }, "array": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Is column an array?", "x-example": false, "nullable": true }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Column creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Column update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "size": { "type": "integer", - "description": "Attribute size.", + "description": "Column size.", "x-example": 128, "format": "int32" }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": "default", "nullable": true }, "encrypt": { "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", + "description": "Defines whether this column is encrypted or not.", "x-example": false, "nullable": true } @@ -66985,23 +83138,23 @@ "encrypt": false } }, - "attributeInteger": { - "description": "AttributeInteger", + "columnText": { + "description": "ColumnText", "type": "object", "properties": { "key": { "type": "string", - "description": "Attribute Key.", - "x-example": "count" + "description": "Column Key.", + "x-example": "fullName" }, "type": { "type": "string", - "description": "Attribute type.", - "x-example": "integer" + "description": "Column type.", + "x-example": "string" }, "status": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", "x-example": "available", "enum": [ "available", @@ -67010,53 +83163,44 @@ "stuck", "failed" ], - "x-enum-name": "AttributeStatus" + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", "x-example": "string" }, "required": { "type": "boolean", - "description": "Is attribute required?", + "description": "Is column required?", "x-example": true }, "array": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Is column an array?", "x-example": false, "nullable": true }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Column creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Column update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", "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", + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, "nullable": true } }, @@ -67070,36 +83214,35 @@ "$updatedAt" ], "example": { - "key": "count", - "type": "integer", + "key": "fullName", + "type": "string", "status": "available", "error": "string", "required": true, "array": false, "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 + "default": "default", + "encrypt": false } }, - "attributeBigint": { - "description": "AttributeBigInt", + "columnMediumtext": { + "description": "ColumnMediumtext", "type": "object", "properties": { "key": { "type": "string", - "description": "Attribute Key.", - "x-example": "count" + "description": "Column Key.", + "x-example": "fullName" }, "type": { "type": "string", - "description": "Attribute type.", - "x-example": "bigint" + "description": "Column type.", + "x-example": "string" }, "status": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", "x-example": "available", "enum": [ "available", @@ -67108,53 +83251,44 @@ "stuck", "failed" ], - "x-enum-name": "AttributeStatus" + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", "x-example": "string" }, "required": { "type": "boolean", - "description": "Is attribute required?", + "description": "Is column required?", "x-example": true }, "array": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Is column an array?", "x-example": false, "nullable": true }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Column creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Column update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", "nullable": true }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int64", + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, "nullable": true } }, @@ -67168,36 +83302,35 @@ "$updatedAt" ], "example": { - "key": "count", - "type": "bigint", + "key": "fullName", + "type": "string", "status": "available", "error": "string", "required": true, "array": false, "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 + "default": "default", + "encrypt": false } }, - "attributeFloat": { - "description": "AttributeFloat", + "columnLongtext": { + "description": "ColumnLongtext", "type": "object", "properties": { "key": { "type": "string", - "description": "Attribute Key.", - "x-example": "percentageCompleted" + "description": "Column Key.", + "x-example": "fullName" }, "type": { "type": "string", - "description": "Attribute type.", - "x-example": "double" + "description": "Column type.", + "x-example": "string" }, "status": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", "x-example": "available", "enum": [ "available", @@ -67206,1725 +83339,1665 @@ "stuck", "failed" ], - "x-enum-name": "AttributeStatus" + "x-enum-name": "ColumnStatus" }, "error": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", "x-example": "string" }, "required": { "type": "boolean", - "description": "Is attribute required?", + "description": "Is column required?", "x-example": true }, "array": { "type": "boolean", - "description": "Is attribute an array?", + "description": "Is column an array?", "x-example": false, "nullable": true }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Column creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Column update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", "nullable": true }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ], + "example": { + "key": "fullName", + "type": "string", + "status": "available", + "error": "string", + "required": true, + "array": false, + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "default": "default", + "encrypt": false + } + }, + "index": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "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", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] + }, + "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": [] + }, + "lengths": { + "type": "array", + "description": "Index attributes length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], "nullable": true } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", - "required", - "$createdAt", - "$updatedAt" + "attributes", + "lengths" ], "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "attributes": [], + "lengths": [], + "orders": [] } }, - "attributeBoolean": { - "description": "AttributeBoolean", + "columnIndex": { + "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Attribute Key.", - "x-example": "isEnabled" + "description": "Index Key.", + "x-example": "index1" }, "type": { "type": "string", - "description": "Attribute type.", - "x-example": "boolean" + "description": "Index type.", + "x-example": "primary" }, "status": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "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 attribute.", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", "x-example": "string" }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], "nullable": true } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", - "required", - "$createdAt", - "$updatedAt" + "columns", + "lengths" ], "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false + "key": "index1", + "type": "primary", + "status": "available", + "error": "string", + "columns": [], + "lengths": [], + "orders": [] } }, - "attributeEmail": { - "description": "AttributeEmail", + "row": { + "description": "Row", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Attribute Key.", - "x-example": "userEmail" + "description": "Row ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$sequence": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Row sequence ID.", + "x-example": "1", + "readOnly": true }, - "status": { + "$tableId": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Table ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true }, - "error": { + "$databaseId": { "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 + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Row creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Row update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "nullable": true + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] } }, + "additionalProperties": true, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", + "$sequence", + "$tableId", + "$databaseId", "$createdAt", "$updatedAt", - "format" + "$permissions" ], "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$tableId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" + "$permissions": [ + "read(\"any\")" + ] } }, - "attributeEnum": { - "description": "AttributeEnum", + "document": { + "description": "Document", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Attribute Key.", - "x-example": "status" + "description": "Document ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$sequence": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Document sequence ID.", + "x-example": "1", + "readOnly": true }, - "status": { + "$collectionId": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Collection ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true }, - "error": { + "$databaseId": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "Database ID.", + "x-example": "5e5ea5c15117e", + "readOnly": true }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true + "$createdAt": { + "type": "string", + "description": "Document creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "$updatedAt": { + "type": "string", + "description": "Document update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$collectionId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ], + "example": { + "$id": "5e5ea5c16897e", + "$sequence": "1", + "$collectionId": "5e5ea5c15117e", + "$databaseId": "5e5ea5c15117e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "username": "john.doe", + "email": "john.doe@example.com", + "fullName": "John Doe", + "age": 30, + "isAdmin": false + } + }, + "presence": { + "description": "Presence", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Presence ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Presence creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Presence update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "elements": { + "$permissions": { "type": "array", - "description": "Array of elements in enumerated type.", + "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { "type": "string" }, - "x-example": "element" + "x-example": [ + "read(\"any\")" + ] }, - "format": { + "userId": { "type": "string", - "description": "String format.", - "x-example": "enum" + "description": "User ID.", + "x-example": "674af8f3e12a5f9ac0be" }, - "default": { + "status": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", + "description": "Presence status.", + "x-example": "online", + "nullable": true + }, + "source": { + "type": "string", + "description": "Presence source.", + "x-example": "HTTP" + }, + "expiresAt": { + "type": "string", + "description": "Presence expiry date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Presence metadata.", + "x-example": { + "key": "value" + } } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "elements", - "format" + "$permissions", + "userId", + "source" ], "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" + "$permissions": [ + "read(\"any\")" + ], + "userId": "674af8f3e12a5f9ac0be", + "status": "online", + "source": "HTTP", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "metadata": { + "key": "value" + } } }, - "attributeIp": { - "description": "AttributeIP", + "log": { + "description": "Log", "type": "object", "properties": { - "key": { + "event": { "type": "string", - "description": "Attribute Key.", - "x-example": "ipAddress" + "description": "Event name.", + "x-example": "account.sessions.create" }, - "type": { + "userId": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", + "x-example": "610fc2f985ee0" }, - "status": { + "userEmail": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "john@appwrite.io" }, - "error": { + "userName": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", + "x-example": "John Doe" }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "userType": { + "type": "string", + "description": "User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization.", + "x-example": "user" + }, + "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" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" }, - "$createdAt": { + "deviceBrand": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Device brand name.", + "x-example": "Google" }, - "$updatedAt": { + "deviceModel": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Device model name.", + "x-example": "Nexus 5" }, - "format": { + "countryCode": { "type": "string", - "description": "String format.", - "x-example": "ip" + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" }, - "default": { + "countryName": { "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 + "description": "Country name.", + "x-example": "United States" } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" + "event", + "userId", + "userEmail", + "userName", + "mode", + "userType", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" ], "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" + "event": "account.sessions.create", + "userId": "610fc2f985ee0", + "userEmail": "john@appwrite.io", + "userName": "John Doe", + "mode": "admin", + "userType": "user", + "ip": "127.0.0.1", + "time": "2020-10-15T06:38:00.000+00:00", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States" } }, - "attributeUrl": { - "description": "AttributeURL", + "user": { + "description": "User", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Attribute Key.", - "x-example": "githubUrl" + "description": "User ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "User creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" + "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": {}, + "allOf": [ + { + "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" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "argon2": "#\/components\/schemas\/algoArgon2", + "scrypt": "#\/components\/schemas\/algoScrypt", + "scryptMod": "#\/components\/schemas\/algoScryptModified", + "bcrypt": "#\/components\/schemas\/algoBcrypt", + "phpass": "#\/components\/schemas\/algoPhpass", + "sha": "#\/components\/schemas\/algoSha", + "md5": "#\/components\/schemas\/algoMd5" + } + } + } ], - "x-enum-name": "AttributeStatus" + "nullable": true }, - "error": { + "registration": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "User registration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "required": { + "status": { "type": "boolean", - "description": "Is attribute required?", + "description": "User status. Pass `true` for enabled and `false` for disabled.", "x-example": true }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "x-example": [ + "vip" + ] }, - "$createdAt": { + "passwordUpdate": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Password update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "email": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "User email address.", + "x-example": "john@appwrite.io" }, - "format": { + "phone": { "type": "string", - "description": "String format.", - "x-example": "url" + "description": "User phone number in E.164 format.", + "x-example": "+4930901820" }, - "default": { + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "emailCanonical": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http:\/\/example.com", + "description": "Canonical form of the user email address.", + "x-example": "john@appwrite.io", "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "http:\/\/example.com" - } - }, - "attributeDatetime": { - "description": "AttributeDatetime", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "birthDay" }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "datetime" + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "x-example": true, + "nullable": true }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "x-example": false, + "nullable": true }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "x-example": true, + "nullable": true }, - "required": { + "emailIsCanonical": { "type": "boolean", - "description": "Is attribute required?", + "description": "Whether the user email is in its canonical form.", + "x-example": true, + "nullable": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", "x-example": true }, - "array": { + "mfa": { "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "description": "Multi factor authentication status.", + "x-example": true }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] }, - "$updatedAt": { + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "x-example": [] + }, + "accessedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "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" }, - "format": { - "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "x-example": false, + "nullable": true }, - "default": { + "impersonatorUserId": { "type": "string", - "description": "Default value for attribute when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "x-example": "5e5ea5c16897e", "nullable": true } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "format" + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" ], "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" + "name": "John Doe", + "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", + "hash": "argon2", + "hashOptions": {}, + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "emailCanonical": "john@appwrite.io", + "emailIsFree": true, + "emailIsDisposable": false, + "emailIsCorporate": true, + "emailIsCanonical": true, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" } }, - "attributeRelationship": { - "description": "AttributeRelationship", + "algoMd5": { + "description": "AlgoMD5", "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", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "relatedCollection": { - "type": "string", - "description": "The ID of the related collection.", - "x-example": "collection" - }, - "relationType": { - "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" - }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false - }, - "twoWayKey": { - "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" - }, - "onDelete": { - "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" - }, - "side": { + "description": "Algo type.", + "x-example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" + "description": "Algo type.", + "x-example": "sha" } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "relatedCollection", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" + "type" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedCollection": "collection", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" + "type": "sha" } }, - "attributePoint": { - "description": "AttributePoint", + "algoPhpass": { + "description": "AlgoPHPass", "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", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - 0, - 0 - ], - "items": { - "type": "number", - "format": "double" - }, - "nullable": true + "description": "Algo type.", + "x-example": "phpass" } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "type" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] + "type": "phpass" } }, - "attributeLine": { - "description": "AttributeLine", + "algoBcrypt": { + "description": "AlgoBcrypt", "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", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { + "description": "Algo type.", + "x-example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { "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 + "description": "Algo type.", + "x-example": "scrypt" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "x-example": 8, + "format": "int32" }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "x-example": 14, + "format": "int32" }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "x-example": 1, + "format": "int32" }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "nullable": true + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "x-example": 64, + "format": "int32" } }, "required": [ - "key", "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "costCpu", + "costMemory", + "costParallel", + "length" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ] + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 } }, - "attributePolygon": { - "description": "AttributePolygon", + "algoScryptModified": { + "description": "AlgoScryptModified", "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", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Algo type.", + "x-example": "scryptMod" }, - "error": { + "salt": { "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 + "description": "Salt used to compute hash.", + "x-example": "UxLMreBr6tYyjQ==" }, - "$createdAt": { + "saltSeparator": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Separator used to compute hash.", + "x-example": "Bw==" }, - "$updatedAt": { + "signerKey": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "array", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ], - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - }, - "nullable": true + "description": "Key used to compute hash.", + "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" } }, "required": [ - "key", "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "salt", + "saltSeparator", + "signerKey" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" } }, - "attributeVarchar": { - "description": "AttributeVarchar", + "algoArgon2": { + "description": "AlgoArgon2", "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", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Algo type.", + "x-example": "argon2" }, - "size": { + "memoryCost": { "type": "integer", - "description": "Attribute size.", - "x-example": 128, + "description": "Memory used to compute hash.", + "x-example": 65536, "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 + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "x-example": 4, + "format": "int32" }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "x-example": 3, + "format": "int32" } }, "required": [ - "key", "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" + "memoryCost", + "timeCost", + "threads" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 } }, - "attributeText": { - "description": "AttributeText", + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true, + "example": { + "language": "en", + "timezone": "UTC", + "darkTheme": true + } + }, + "session": { + "description": "Session", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" + "description": "Session ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Session creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Session update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "userId": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "User ID.", + "x-example": "5e5bb8c16897e" }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true + "expire": { + "type": "string", + "description": "Session expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" }, - "$createdAt": { + "providerUid": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Session Provider User ID.", + "x-example": "user@example.com" }, - "$updatedAt": { + "providerAccessToken": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "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" }, - "default": { + "providerRefreshToken": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeMediumtext": { - "description": "AttributeMediumtext", - "type": "object", - "properties": { - "key": { + "ip": { "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" }, - "type": { + "osCode": { "type": "string", - "description": "Attribute type.", - "x-example": "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" }, - "status": { + "osName": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Operating system name.", + "x-example": "Mac" }, - "error": { + "osVersion": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "Operating system version.", + "x-example": "Mac" }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "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" }, - "$createdAt": { + "clientName": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Client name.", + "x-example": "Chrome Mobile iOS" }, - "$updatedAt": { + "clientVersion": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Client version.", + "x-example": "84.0" }, - "default": { + "clientEngine": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true + "description": "Client engine name.", + "x-example": "WebKit" }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false - } - }, - "attributeLongtext": { - "description": "AttributeLongtext", - "type": "object", - "properties": { - "key": { + "clientEngineVersion": { "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" + "description": "Client engine name.", + "x-example": "605.1.15" }, - "type": { + "deviceName": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Device name.", + "x-example": "smartphone" }, - "status": { + "deviceBrand": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Device brand name.", + "x-example": "Google" }, - "error": { + "deviceModel": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "string" + "description": "Device model name.", + "x-example": "Nexus 5" }, - "required": { + "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": "Is attribute required?", + "description": "Returns true if this the current user session.", "x-example": true }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "factors": { + "type": "array", + "description": "Returns a list of active session factors.", + "items": { + "type": "string" + }, + "x-example": [ + "email" + ] }, - "$createdAt": { + "secret": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Secret used to authenticate the user. Only included if the request was made with an API key", + "x-example": "5e5bb8c16897e" }, - "$updatedAt": { + "mfaUpdatedAt": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", + "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "nullable": true - }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this attribute is encrypted or not.", - "x-example": false, - "nullable": true } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", - "$updatedAt" + "$updatedAt", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current", + "factors", + "secret", + "mfaUpdatedAt" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false + "userId": "5e5bb8c16897e", + "expire": "2020-10-15T06:38:00.000+00:00", + "provider": "email", + "providerUid": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "ip": "127.0.0.1", + "osCode": "Mac", + "osName": "Mac", + "osVersion": "Mac", + "clientType": "browser", + "clientCode": "CM", + "clientName": "Chrome Mobile iOS", + "clientVersion": "84.0", + "clientEngine": "WebKit", + "clientEngineVersion": "605.1.15", + "deviceName": "smartphone", + "deviceBrand": "Google", + "deviceModel": "Nexus 5", + "countryCode": "US", + "countryName": "United States", + "current": true, + "factors": [ + "email" + ], + "secret": "5e5bb8c16897e", + "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" } }, - "vectorsdbCollection": { - "description": "VectorsDB Collection", + "identity": { + "description": "Identity", "type": "object", "properties": { "$id": { "type": "string", - "description": "Collection ID.", + "description": "Identity ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Collection creation date in ISO 8601 format.", + "description": "Identity 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.", + "description": "Identity update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$permissions": { - "type": "array", - "description": "Collection permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "databaseId": { + "userId": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" + "description": "User ID.", + "x-example": "5e5bb8c16897e" }, - "name": { + "provider": { "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false - }, - "documentSecurity": { - "type": "boolean", - "description": "Whether document-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true + "description": "Identity Provider.", + "x-example": "email" }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/attributeObject" - }, - { - "$ref": "#\/components\/schemas\/attributeVector" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "object": "#\/components\/schemas\/attributeObject", - "vector": "#\/components\/schemas\/attributeVector" - } - } - }, - "x-example": {} + "providerUid": { + "type": "string", + "description": "ID of the User in the Identity Provider.", + "x-example": "5e5bb8c16897e" }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { - "$ref": "#\/components\/schemas\/index" - }, - "x-example": {} + "providerEmail": { + "type": "string", + "description": "Email of the User in the Identity Provider.", + "x-example": "user@example.com" }, - "bytesMax": { - "type": "integer", - "description": "Maximum document size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, - "format": "int32" + "providerAccessToken": { + "type": "string", + "description": "Identity Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" }, - "bytesUsed": { - "type": "integer", - "description": "Currently used document size in bytes based on defined attributes.", - "x-example": 1500, - "format": "int32" + "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" }, - "dimension": { - "type": "integer", - "description": "Embedding dimension.", - "x-example": 1536, - "format": "int32" + "providerRefreshToken": { + "type": "string", + "description": "Identity Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "$permissions", - "databaseId", - "name", - "enabled", - "documentSecurity", - "attributes", - "indexes", - "bytesMax", - "bytesUsed", - "dimension" + "userId", + "provider", + "providerUid", + "providerEmail", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "databaseId": "5e5ea5c16897e", - "name": "My Collection", - "enabled": false, - "documentSecurity": true, - "attributes": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500, - "dimension": 1536 + "userId": "5e5bb8c16897e", + "provider": "email", + "providerUid": "5e5bb8c16897e", + "providerEmail": "user@example.com", + "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", + "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", + "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" } }, - "attributeObject": { - "description": "AttributeObject", + "token": { + "description": "Token", "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { + "properties": { + "$id": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Token ID.", + "x-example": "bb8ea5c16897e" }, - "status": { + "$createdAt": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "userId": { "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 + "description": "User ID.", + "x-example": "5e5ea5c168bb8" }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "nullable": true + "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": "" }, - "$createdAt": { + "expire": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", + "description": "Token expiration date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "phrase": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", + "x-example": "Golden Fox" } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", - "$updatedAt" + "userId", + "secret", + "expire", + "phrase" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "bb8ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" + "userId": "5e5ea5c168bb8", + "secret": "", + "expire": "2020-10-15T06:38:00.000+00:00", + "phrase": "Golden Fox" } }, - "attributeVector": { - "description": "AttributeVector", + "jwt": { + "description": "JWT", "type": "object", "properties": { - "key": { + "jwt": { "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": [ + "jwt" + ], + "example": { + "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" }, - "type": { + "countryCode": { "type": "string", - "description": "Attribute type.", - "x-example": "string" + "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", + "x-example": "US" }, - "status": { + "country": { "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "AttributeStatus" + "description": "Country name. This field support localization.", + "x-example": "United States" }, - "error": { + "continentCode": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an attribute.", - "x-example": "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" }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" }, - "array": { + "eu": { "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, + "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" + }, + "city": { + "type": "string", + "description": "City", + "x-example": "Kathmandu", "nullable": true }, - "$createdAt": { + "timeZone": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Name of timezone", + "x-example": "Asia\/Kathmandu", + "nullable": true }, - "$updatedAt": { + "postalCode": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Postal code", + "x-example": "44600", + "nullable": true }, - "size": { - "type": "integer", - "description": "Vector dimensions.", - "x-example": 1536, - "format": "int32" + "latitude": { + "type": "number", + "description": "Latitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "x-example": "82.345", + "format": "double", + "nullable": true + }, + "autonomousSystemNumber": { + "type": "string", + "description": "Autonomous System Number (ASN) of the IP", + "x-example": "15169", + "nullable": true + }, + "autonomousSystemOrganization": { + "type": "string", + "description": "Organization that owns the ASN", + "x-example": "GOOGLE", + "nullable": true + }, + "isp": { + "type": "string", + "description": "Internet service provider of the IP", + "x-example": "Google", + "nullable": true + }, + "connectionType": { + "type": "string", + "description": "Connection type of the IP (e.g. cable, cellular, corporate)", + "x-example": "cable", + "nullable": true + }, + "connectionUsageType": { + "type": "string", + "description": "User type classification of the IP (e.g. residential, business, hosting)", + "x-example": "residential", + "nullable": true + }, + "connectionOrganization": { + "type": "string", + "description": "Registered organization of the IP", + "x-example": "Google LLC", + "nullable": true } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "size" + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 1536 + "ip": "127.0.0.1", + "countryCode": "US", + "country": "United States", + "continentCode": "NA", + "continent": "North America", + "eu": false, + "currency": "USD", + "city": "Kathmandu", + "timeZone": "Asia\/Kathmandu", + "postalCode": "44600", + "latitude": "82.345", + "longitude": "82.345", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "isp": "Google", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC" } }, - "table": { - "description": "Table", + "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" + ], + "example": { + "code": "en-us", + "name": "US" + } + }, + "file": { + "description": "File", "type": "object", "properties": { "$id": { "type": "string", - "description": "Table ID.", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Table creation date in ISO 8601 format.", + "description": "File creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Table update date in ISO 8601 format.", + "description": "File update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$permissions": { "type": "array", - "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { "type": "string" }, @@ -68932,190 +85005,190 @@ "read(\"any\")" ] }, - "databaseId": { + "name": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c16897e" + "description": "File name.", + "x-example": "Pink.png" }, - "name": { + "folder": { "type": "string", - "description": "Table name.", - "x-example": "My Table" + "description": "Virtual folder containing the file, with a trailing slash. Empty for the bucket root.", + "x-example": "photos\/2026\/" }, - "enabled": { - "type": "boolean", - "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", - "x-example": false + "key": { + "type": "string", + "description": "Full virtual path of the file: the folder followed by the file name.", + "x-example": "photos\/2026\/Pink.png" }, - "rowSecurity": { + "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" + }, + "sizeActual": { + "type": "integer", + "description": "File actual stored size in bytes after compression and\/or encryption.", + "x-example": 12345, + "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" + }, + "encryption": { "type": "boolean", - "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "Whether file contents are encrypted at rest.", "x-example": true }, - "columns": { - "type": "array", - "description": "Table columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnBigint" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "bigint": "#\/components\/schemas\/columnBigint", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnBigint": { - "type": "bigint" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } - }, - "x-example": {} + "compression": { + "type": "string", + "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", + "x-example": "gzip" + } + }, + "required": [ + "$id", + "bucketId", + "$createdAt", + "$updatedAt", + "$permissions", + "name", + "folder", + "key", + "signature", + "mimeType", + "sizeOriginal", + "sizeActual", + "chunksTotal", + "chunksUploaded", + "encryption", + "compression" + ], + "example": { + "$id": "5e5ea5c16897e", + "bucketId": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "$permissions": [ + "read(\"any\")" + ], + "name": "Pink.png", + "folder": "photos\/2026\/", + "key": "photos\/2026\/Pink.png", + "signature": "5d529fd02b544198ae075bd57c1762bb", + "mimeType": "image\/png", + "sizeOriginal": 17890, + "sizeActual": 12345, + "chunksTotal": 17890, + "chunksUploaded": 17890, + "encryption": true, + "compression": "gzip" + } + }, + "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" }, - "indexes": { + "$permissions": { "type": "array", - "description": "Table indexes.", + "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "items": { - "$ref": "#\/components\/schemas\/columnIndex" + "type": "string" }, - "x-example": {} + "x-example": [ + "read(\"any\")" + ] }, - "bytesMax": { + "fileSecurity": { + "type": "boolean", + "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { "type": "integer", - "description": "Maximum row size in bytes. Returns 0 when no limit applies.", - "x-example": 65535, + "description": "Maximum file size supported.", + "x-example": 100, "format": "int32" }, - "bytesUsed": { + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "jpg", + "png" + ] + }, + "compression": { + "type": "string", + "description": "Compression algorithm chosen 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 + }, + "transformations": { + "type": "boolean", + "description": "Image transformations are enabled.", + "x-example": false + }, + "totalSize": { "type": "integer", - "description": "Currently used row size in bytes based on defined columns.", - "x-example": 1500, + "description": "Total size of this bucket in bytes.", + "x-example": 128, "format": "int32" } }, @@ -69124,14 +85197,16 @@ "$createdAt", "$updatedAt", "$permissions", - "databaseId", + "fileSecurity", "name", "enabled", - "rowSecurity", - "columns", - "indexes", - "bytesMax", - "bytesUsed" + "maximumFileSize", + "allowedFileExtensions", + "compression", + "encryption", + "antivirus", + "transformations", + "totalSize" ], "example": { "$id": "5e5ea5c16897e", @@ -69140,5271 +85215,4632 @@ "$permissions": [ "read(\"any\")" ], - "databaseId": "5e5ea5c16897e", - "name": "My Table", + "fileSecurity": true, + "name": "Documents", "enabled": false, - "rowSecurity": true, - "columns": {}, - "indexes": {}, - "bytesMax": 65535, - "bytesUsed": 1500 + "maximumFileSize": 100, + "allowedFileExtensions": [ + "jpg", + "png" + ], + "compression": "gzip", + "encryption": false, + "antivirus": false, + "transformations": false, + "totalSize": 128 } }, - "columnList": { - "description": "Columns List", + "resourceToken": { + "description": "ResourceToken", + "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" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "files" + }, + "expire": { + "type": "string", + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "secret": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "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", + "resourceId", + "resourceType", + "expire", + "secret", + "accessedAt" + ], + "example": { + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", + "resourceType": "files", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", + "accessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "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 columns in the given table.", - "x-example": 5, + "description": "Total number of team members.", + "x-example": 7, "format": "int32" }, - "columns": { - "type": "array", - "description": "List of columns.", - "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/columnBoolean" - }, - { - "$ref": "#\/components\/schemas\/columnBigint" - }, - { - "$ref": "#\/components\/schemas\/columnInteger" - }, - { - "$ref": "#\/components\/schemas\/columnFloat" - }, - { - "$ref": "#\/components\/schemas\/columnEmail" - }, - { - "$ref": "#\/components\/schemas\/columnEnum" - }, - { - "$ref": "#\/components\/schemas\/columnUrl" - }, - { - "$ref": "#\/components\/schemas\/columnIp" - }, - { - "$ref": "#\/components\/schemas\/columnDatetime" - }, - { - "$ref": "#\/components\/schemas\/columnRelationship" - }, - { - "$ref": "#\/components\/schemas\/columnPoint" - }, - { - "$ref": "#\/components\/schemas\/columnLine" - }, - { - "$ref": "#\/components\/schemas\/columnPolygon" - }, - { - "$ref": "#\/components\/schemas\/columnVarchar" - }, - { - "$ref": "#\/components\/schemas\/columnText" - }, - { - "$ref": "#\/components\/schemas\/columnMediumtext" - }, - { - "$ref": "#\/components\/schemas\/columnLongtext" - }, - { - "$ref": "#\/components\/schemas\/columnString" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "boolean": "#\/components\/schemas\/columnBoolean", - "bigint": "#\/components\/schemas\/columnBigint", - "integer": "#\/components\/schemas\/columnInteger", - "double": "#\/components\/schemas\/columnFloat", - "string": "#\/components\/schemas\/columnString", - "datetime": "#\/components\/schemas\/columnDatetime", - "relationship": "#\/components\/schemas\/columnRelationship", - "point": "#\/components\/schemas\/columnPoint", - "linestring": "#\/components\/schemas\/columnLine", - "polygon": "#\/components\/schemas\/columnPolygon", - "varchar": "#\/components\/schemas\/columnVarchar", - "text": "#\/components\/schemas\/columnText", - "mediumtext": "#\/components\/schemas\/columnMediumtext", - "longtext": "#\/components\/schemas\/columnLongtext" - }, - "x-propertyNames": [ - "type", - "format" - ], - "x-mapping": { - "#\/components\/schemas\/columnBoolean": { - "type": "boolean" - }, - "#\/components\/schemas\/columnBigint": { - "type": "bigint" - }, - "#\/components\/schemas\/columnInteger": { - "type": "integer" - }, - "#\/components\/schemas\/columnFloat": { - "type": "double" - }, - "#\/components\/schemas\/columnEmail": { - "type": "string", - "format": "email" - }, - "#\/components\/schemas\/columnEnum": { - "type": "string", - "format": "enum" - }, - "#\/components\/schemas\/columnUrl": { - "type": "string", - "format": "url" - }, - "#\/components\/schemas\/columnIp": { - "type": "string", - "format": "ip" - }, - "#\/components\/schemas\/columnDatetime": { - "type": "datetime" - }, - "#\/components\/schemas\/columnRelationship": { - "type": "relationship" - }, - "#\/components\/schemas\/columnPoint": { - "type": "point" - }, - "#\/components\/schemas\/columnLine": { - "type": "linestring" - }, - "#\/components\/schemas\/columnPolygon": { - "type": "polygon" - }, - "#\/components\/schemas\/columnVarchar": { - "type": "varchar" - }, - "#\/components\/schemas\/columnText": { - "type": "text" - }, - "#\/components\/schemas\/columnMediumtext": { - "type": "mediumtext" - }, - "#\/components\/schemas\/columnLongtext": { - "type": "longtext" - }, - "#\/components\/schemas\/columnString": { - "type": "string" - } - } - } + "prefs": { + "type": "object", + "description": "Team preferences as a key-value object", + "x-example": { + "theme": "pink", + "timezone": "UTC" }, - "x-example": "" + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", "total", - "columns" + "prefs" ], "example": { - "total": 5, - "columns": "" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + } } }, - "columnString": { - "description": "ColumnString", + "membership": { + "description": "Membership", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "fullName" + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Membership creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Membership update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "userId": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "User ID.", + "x-example": "5e5ea5c16897e" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "userName": { + "type": "string", + "description": "User name. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "John Doe" }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "userEmail": { + "type": "string", + "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "john@appwrite.io" }, - "$createdAt": { + "userPhone": { "type": "string", - "description": "Column creation date in ISO 8601 format.", + "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", + "x-example": "+1 555 555 5555" + }, + "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" }, - "$updatedAt": { + "joined": { "type": "string", - "description": "Column update date in ISO 8601 format.", + "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" }, - "size": { - "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false }, - "default": { + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", + "x-example": false + }, + "userAccessedAt": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true + "description": "Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true + "roles": { + "type": "array", + "description": "User list of roles", + "items": { + "type": "string" + }, + "x-example": [ + "owner" + ] } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "size" + "userId", + "userName", + "userEmail", + "userPhone", + "teamId", + "teamName", + "invited", + "joined", + "confirm", + "mfa", + "userAccessedAt", + "roles" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false + "userId": "5e5ea5c16897e", + "userName": "John Doe", + "userEmail": "john@appwrite.io", + "userPhone": "+1 555 555 5555", + "teamId": "5e5ea5c16897e", + "teamName": "VIP", + "invited": "2020-10-15T06:38:00.000+00:00", + "joined": "2020-10-15T06:38:00.000+00:00", + "confirm": false, + "mfa": false, + "userAccessedAt": "2020-10-15T06:38:00.000+00:00", + "roles": [ + "owner" + ] } }, - "columnInteger": { - "description": "ColumnInteger", + "site": { + "description": "Site", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "count" + "description": "Site ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "integer" + "description": "Site creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Site update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "name": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "Site name.", + "x-example": "My Site" }, - "required": { + "enabled": { "type": "boolean", - "description": "Is column required?", - "x-example": true + "description": "Site enabled.", + "x-example": false }, - "array": { + "live": { "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "description": "Is the site 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 site to update it with the latest configuration.", + "x-example": false }, - "$createdAt": { + "logging": { + "type": "boolean", + "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "x-example": false + }, + "framework": { "type": "string", - "description": "Column creation date in ISO 8601 format.", + "description": "Site framework.", + "x-example": "react" + }, + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" + }, + "deploymentId": { + "type": "string", + "description": "Site's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentCreatedAt": { + "type": "string", + "description": "Active deployment creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "deploymentScreenshotLight": { "type": "string", - "description": "Column update date in ISO 8601 format.", + "description": "Screenshot of active deployment with light theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "deploymentScreenshotDark": { + "type": "string", + "description": "Screenshot of active deployment with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentId": { + "type": "string", + "description": "Site's latest deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "latestDeploymentCreatedAt": { + "type": "string", + "description": "Latest deployment creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true + "latestDeploymentStatus": { + "type": "string", + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true + "vars": { + "type": "array", + "description": "Site variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] }, - "default": { + "timeout": { "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int32", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "count", - "type": "integer", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 - } - }, - "columnBigint": { - "description": "ColumnBigInt", - "type": "object", - "properties": { - "key": { + "description": "Site request timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "installCommand": { "type": "string", - "description": "Column Key.", - "x-example": "count" + "description": "The install command used to install the site dependencies.", + "x-example": "npm install" }, - "type": { + "buildCommand": { "type": "string", - "description": "Column type.", - "x-example": "bigint" + "description": "The build command used to build the site.", + "x-example": "npm run build" }, - "status": { + "startCommand": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Custom command to use when starting site runtime.", + "x-example": "node custom-server.mjs" }, - "error": { + "outputDirectory": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "The directory where the site build output is located.", + "x-example": "build" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "installationId": { + "type": "string", + "description": "Site VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" }, - "array": { + "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 site in VCS (Version Control System) repository", + "x-example": "sites\/helloWorld" + }, + "providerSilentMode": { "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "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 }, - "$createdAt": { + "providerBranches": { + "type": "array", + "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", + "items": { + "type": "string" + }, + "x-example": [ + "main", + "feat\/*" + ] + }, + "providerPaths": { + "type": "array", + "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", + "items": { + "type": "string" + }, + "x-example": [ + "src\/**", + "!docs\/**" + ] + }, + "buildSpecification": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" }, - "$updatedAt": { + "runtimeSpecification": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Machine specification for SSR executions.", + "x-example": "s-1vcpu-512mb" }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int64", - "nullable": true + "buildRuntime": { + "type": "string", + "description": "Site build runtime.", + "x-example": "node-22" }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int64", - "nullable": true + "adapter": { + "type": "string", + "description": "Site framework adapter.", + "x-example": "static" }, - "default": { - "type": "integer", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 10, - "format": "int64", - "nullable": true + "fallbackFile": { + "type": "string", + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", - "$updatedAt" + "$updatedAt", + "name", + "enabled", + "live", + "logging", + "framework", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "deploymentScreenshotLight", + "deploymentScreenshotDark", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "vars", + "timeout", + "installCommand", + "buildCommand", + "startCommand", + "outputDirectory", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "providerBranches", + "providerPaths", + "buildSpecification", + "runtimeSpecification", + "buildRuntime", + "adapter", + "fallbackFile" ], "example": { - "key": "count", - "type": "bigint", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1, - "max": 10, - "default": 10 + "name": "My Site", + "enabled": false, + "live": false, + "logging": false, + "framework": "react", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "deploymentScreenshotLight": "5e5ea5c16897e", + "deploymentScreenshotDark": "5e5ea5c16897e", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "vars": [], + "timeout": 300, + "installCommand": "npm install", + "buildCommand": "npm run build", + "startCommand": "node custom-server.mjs", + "outputDirectory": "build", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "sites\/helloWorld", + "providerSilentMode": false, + "providerBranches": [ + "main", + "feat\/*" + ], + "providerPaths": [ + "src\/**", + "!docs\/**" + ], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb", + "buildRuntime": "node-22", + "adapter": "static", + "fallbackFile": "index.html" } }, - "columnFloat": { - "description": "ColumnFloat", + "function": { + "description": "Function", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "percentageCompleted" + "description": "Function ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "double" + "description": "Function creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Function update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { + "type": "string" + }, + "x-example": "users" + }, + "name": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "Function name.", + "x-example": "My Function" }, - "required": { + "enabled": { "type": "boolean", - "description": "Is column required?", - "x-example": true + "description": "Function enabled.", + "x-example": false }, - "array": { + "live": { "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "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 }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "logging": { + "type": "boolean", + "description": "When disabled, executions will exclude logs and errors, and will be slightly faster.", + "x-example": false }, - "$updatedAt": { + "runtime": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Function execution and build runtime.", + "x-example": "python-3.8" }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "nullable": true + "deploymentRetention": { + "type": "integer", + "description": "How many days to keep the non-active deployments before they will be automatically deleted.", + "x-example": 7, + "format": "int32" }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "nullable": true + "deploymentId": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" }, - "default": { - "type": "number", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": 2.5, - "format": "double", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "percentageCompleted", - "type": "double", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "min": 1.5, - "max": 10.5, - "default": 2.5 - } - }, - "columnBoolean": { - "description": "ColumnBoolean", - "type": "object", - "properties": { - "key": { + "deploymentCreatedAt": { "type": "string", - "description": "Column Key.", - "x-example": "isEnabled" + "description": "Active deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "type": { + "latestDeploymentId": { "type": "string", - "description": "Column type.", - "x-example": "boolean" + "description": "Function's latest deployment ID.", + "x-example": "5e5ea5c16897e" }, - "status": { + "latestDeploymentCreatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Latest deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "latestDeploymentStatus": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", + "x-example": "ready" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "vars": { + "type": "array", + "description": "Function variables.", + "items": { + "$ref": "#\/components\/schemas\/variable" + }, + "x-example": [] }, - "$createdAt": { + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { + "type": "string" + }, + "x-example": "account.create" + }, + "schedule": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Function execution schedule in CRON format.", + "x-example": "5 4 * * *" }, - "$updatedAt": { + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 300, + "format": "int32" + }, + "entrypoint": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "The entrypoint file used to execute the deployment.", + "x-example": "index.js" }, - "default": { - "type": "boolean", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": false, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "isEnabled", - "type": "boolean", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": false - } - }, - "columnEmail": { - "description": "ColumnEmail", - "type": "object", - "properties": { - "key": { + "commands": { "type": "string", - "description": "Column Key.", - "x-example": "userEmail" + "description": "The build command used to build the deployment.", + "x-example": "npm install" }, - "type": { + "version": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Version of Open Runtimes used for the function.", + "x-example": "v2" }, - "status": { + "installationId": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Function VCS (Version Control System) installation id.", + "x-example": "6m40at4ejk5h2u9s1hboo" }, - "error": { + "providerRepositoryId": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "VCS (Version Control System) Repository ID", + "x-example": "appwrite" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "providerBranch": { + "type": "string", + "description": "VCS (Version Control System) branch name", + "x-example": "main" }, - "array": { + "providerRootDirectory": { + "type": "string", + "description": "Path to function in VCS (Version Control System) repository", + "x-example": "functions\/helloWorld" + }, + "providerSilentMode": { "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "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 }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "providerBranches": { + "type": "array", + "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", + "items": { + "type": "string" + }, + "x-example": [ + "main", + "feat\/*" + ] }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "providerPaths": { + "type": "array", + "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", + "items": { + "type": "string" + }, + "x-example": [ + "src\/**", + "!docs\/**" + ] }, - "format": { + "buildSpecification": { "type": "string", - "description": "String format.", - "x-example": "email" + "description": "Machine specification for deployment builds.", + "x-example": "s-1vcpu-512mb" }, - "default": { + "runtimeSpecification": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default@example.com", - "nullable": true + "description": "Machine specification for executions.", + "x-example": "s-1vcpu-512mb" } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "format" + "execute", + "name", + "enabled", + "live", + "logging", + "runtime", + "deploymentRetention", + "deploymentId", + "deploymentCreatedAt", + "latestDeploymentId", + "latestDeploymentCreatedAt", + "latestDeploymentStatus", + "scopes", + "vars", + "events", + "schedule", + "timeout", + "entrypoint", + "commands", + "version", + "installationId", + "providerRepositoryId", + "providerBranch", + "providerRootDirectory", + "providerSilentMode", + "providerBranches", + "providerPaths", + "buildSpecification", + "runtimeSpecification" ], "example": { - "key": "userEmail", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "email", - "default": "default@example.com" + "execute": "users", + "name": "My Function", + "enabled": false, + "live": false, + "logging": false, + "runtime": "python-3.8", + "deploymentRetention": 7, + "deploymentId": "5e5ea5c16897e", + "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentId": "5e5ea5c16897e", + "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", + "latestDeploymentStatus": "ready", + "scopes": "users.read", + "vars": [], + "events": "account.create", + "schedule": "5 4 * * *", + "timeout": 300, + "entrypoint": "index.js", + "commands": "npm install", + "version": "v2", + "installationId": "6m40at4ejk5h2u9s1hboo", + "providerRepositoryId": "appwrite", + "providerBranch": "main", + "providerRootDirectory": "functions\/helloWorld", + "providerSilentMode": false, + "providerBranches": [ + "main", + "feat\/*" + ], + "providerPaths": [ + "src\/**", + "!docs\/**" + ], + "buildSpecification": "s-1vcpu-512mb", + "runtimeSpecification": "s-1vcpu-512mb" } }, - "columnEnum": { - "description": "ColumnEnum", + "runtime": { + "description": "Runtime", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "status" + "description": "Runtime ID.", + "x-example": "python-3.8" }, - "type": { + "key": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Parent runtime key.", + "x-example": "python" }, - "status": { + "name": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Runtime Name.", + "x-example": "Python" }, - "error": { + "version": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "description": "Runtime version.", + "x-example": "3.8" }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" }, - "$createdAt": { + "image": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\\/runtime-for-python:3.8" }, - "$updatedAt": { + "logo": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Name of the logo image.", + "x-example": "python.png" }, - "elements": { + "supports": { "type": "array", - "description": "Array of elements in enumerated type.", + "description": "List of supported architectures.", "items": { "type": "string" }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "element", - "nullable": true + "x-example": "amd64" } }, "required": [ + "$id", "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "elements", - "format" + "name", + "version", + "base", + "image", + "logo", + "supports" ], "example": { - "key": "status", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "elements": "element", - "format": "enum", - "default": "element" + "$id": "python-3.8", + "key": "python", + "name": "Python", + "version": "3.8", + "base": "python:3.8-alpine", + "image": "appwrite\\\/runtime-for-python:3.8", + "logo": "python.png", + "supports": "amd64" } }, - "columnIp": { - "description": "ColumnIP", + "framework": { + "description": "Framework", "type": "object", "properties": { "key": { "type": "string", - "description": "Column Key.", - "x-example": "ipAddress" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "description": "Framework key.", + "x-example": "sveltekit" }, - "$createdAt": { + "name": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Framework Name.", + "x-example": "SvelteKit" }, - "$updatedAt": { + "buildRuntime": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Default runtime version.", + "x-example": "node-22" }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" + "runtimes": { + "type": "array", + "description": "List of supported runtime versions.", + "items": { + "type": "string" + }, + "x-example": [ + "static-1", + "node-22" + ] }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "192.0.2.0", - "nullable": true + "adapters": { + "type": "array", + "description": "List of supported adapters.", + "items": { + "$ref": "#\/components\/schemas\/frameworkAdapter" + }, + "x-example": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] } }, "required": [ "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" + "name", + "buildRuntime", + "runtimes", + "adapters" ], "example": { - "key": "ipAddress", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "ip", - "default": "192.0.2.0" + "key": "sveltekit", + "name": "SvelteKit", + "buildRuntime": "node-22", + "runtimes": [ + "static-1", + "node-22" + ], + "adapters": [ + { + "key": "static", + "buildRuntime": "node-22", + "buildCommand": "npm run build", + "installCommand": "npm install", + "outputDirectory": ".\/dist" + } + ] } }, - "columnUrl": { - "description": "ColumnURL", + "frameworkAdapter": { + "description": "Framework Adapter", "type": "object", "properties": { "key": { "type": "string", - "description": "Column Key.", - "x-example": "githubUrl" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "description": "Adapter key.", + "x-example": "static" }, - "$createdAt": { + "installCommand": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Default command to download dependencies.", + "x-example": "npm install" }, - "$updatedAt": { + "buildCommand": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Default command to build site into output directory.", + "x-example": "npm run build" }, - "format": { + "outputDirectory": { "type": "string", - "description": "String format.", - "x-example": "url" + "description": "Default output directory of build.", + "x-example": ".\/dist" }, - "default": { + "fallbackFile": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "https:\/\/example.com", - "nullable": true + "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", + "x-example": "index.html" } }, "required": [ "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" + "installCommand", + "buildCommand", + "outputDirectory", + "fallbackFile" ], "example": { - "key": "githubUrl", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "url", - "default": "https:\/\/example.com" + "key": "static", + "installCommand": "npm install", + "buildCommand": "npm run build", + "outputDirectory": ".\/dist", + "fallbackFile": "index.html" } }, - "columnDatetime": { - "description": "ColumnDatetime", + "deployment": { + "description": "Deployment", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "birthDay" + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "datetime" + "description": "Deployment creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Deployment update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "type": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "description": "Type of deployment.", + "x-example": "vcs" }, - "$createdAt": { + "resourceId": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" }, - "$updatedAt": { + "resourceType": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Resource type.", + "x-example": "functions" }, - "format": { + "entrypoint": { "type": "string", - "description": "ISO 8601 format.", - "x-example": "datetime" + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "index.js" }, - "default": { + "sourceSize": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "The build output size in bytes.", + "x-example": 128, + "format": "int32" + }, + "totalSize": { + "type": "integer", + "description": "The total size in bytes (source and build output).", + "x-example": 128, + "format": "int32" + }, + "buildId": { "type": "string", - "description": "Default value for column when not provided. Only null is optional", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt", - "format" - ], - "example": { - "key": "birthDay", - "type": "datetime", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "format": "datetime", - "default": "2020-10-15T06:38:00.000+00:00" - } - }, - "columnRelationship": { - "description": "ColumnRelationship", - "type": "object", - "properties": { - "key": { + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "screenshotLight": { "type": "string", - "description": "Column Key.", - "x-example": "fullName" + "description": "Screenshot with light theme preference file ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "screenshotDark": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Screenshot with dark theme preference file ID.", + "x-example": "5e5ea5c16897e" }, "status": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", + "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", + "x-example": "ready", "enum": [ - "available", + "waiting", "processing", - "deleting", - "stuck", + "building", + "ready", + "canceled", "failed" - ], - "x-enum-name": "ColumnStatus" + ] }, - "error": { + "buildLogs": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "The build logs.", + "x-example": "Compiling source files..." }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "buildDuration": { + "type": "integer", + "description": "The current build time in seconds.", + "x-example": 128, + "format": "int32" }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "providerRepositoryName": { + "type": "string", + "description": "The name of the vcs provider repository", + "x-example": "database" }, - "$createdAt": { + "providerRepositoryOwner": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "The name of the vcs provider repository owner", + "x-example": "utopia" }, - "$updatedAt": { + "providerRepositoryUrl": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "The url of the vcs provider repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "relatedTable": { + "providerCommitHash": { "type": "string", - "description": "The ID of the related table.", - "x-example": "table" + "description": "The commit hash of the vcs commit", + "x-example": "7c3f25d" }, - "relationType": { + "providerCommitAuthorUrl": { "type": "string", - "description": "The type of the relationship.", - "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + "description": "The url of vcs commit author", + "x-example": "https:\/\/github.com\/vermakhushboo" }, - "twoWay": { - "type": "boolean", - "description": "Is the relationship two-way?", - "x-example": false + "providerCommitAuthor": { + "type": "string", + "description": "The name of vcs commit author", + "x-example": "Khushboo Verma" }, - "twoWayKey": { + "providerCommitMessage": { "type": "string", - "description": "The key of the two-way relationship.", - "x-example": "string" + "description": "The commit message", + "x-example": "Update index.js" }, - "onDelete": { + "providerCommitUrl": { "type": "string", - "description": "How deleting the parent document will propagate to child documents.", - "x-example": "restrict|cascade|setNull" + "description": "The url of the vcs commit", + "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, - "side": { + "providerBranch": { "type": "string", - "description": "Whether this is the parent or child side of the relationship", - "x-example": "parent|child" + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, + "providerBranchUrl": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "relatedTable", - "relationType", - "twoWay", - "twoWayKey", - "onDelete", - "side" + "type", + "resourceId", + "resourceType", + "entrypoint", + "sourceSize", + "buildSize", + "totalSize", + "buildId", + "activate", + "screenshotLight", + "screenshotDark", + "status", + "buildLogs", + "buildDuration", + "providerRepositoryName", + "providerRepositoryOwner", + "providerRepositoryUrl", + "providerCommitHash", + "providerCommitAuthorUrl", + "providerCommitAuthor", + "providerCommitMessage", + "providerCommitUrl", + "providerBranch", + "providerBranchUrl" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "relatedTable": "table", - "relationType": "oneToOne|oneToMany|manyToOne|manyToMany", - "twoWay": false, - "twoWayKey": "string", - "onDelete": "restrict|cascade|setNull", - "side": "parent|child" + "type": "vcs", + "resourceId": "5e5ea6g16897e", + "resourceType": "functions", + "entrypoint": "index.js", + "sourceSize": 128, + "buildSize": 128, + "totalSize": 128, + "buildId": "5e5ea5c16897e", + "activate": true, + "screenshotLight": "5e5ea5c16897e", + "screenshotDark": "5e5ea5c16897e", + "status": "ready", + "buildLogs": "Compiling source files...", + "buildDuration": 128, + "providerRepositoryName": "database", + "providerRepositoryOwner": "utopia", + "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", + "providerCommitHash": "7c3f25d", + "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", + "providerCommitAuthor": "Khushboo Verma", + "providerCommitMessage": "Update index.js", + "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", + "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, - "columnPoint": { - "description": "ColumnPoint", + "execution": { + "description": "Execution", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "fullName" + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Execution creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Execution update 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" + }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", + "x-example": "processing", "enum": [ - "available", + "waiting", "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "completed", + "failed", + "scheduled" + ] }, - "error": { + "requestMethod": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "HTTP request method type.", + "x-example": "GET" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "requestPath": { + "type": "string", + "description": "HTTP request path and query.", + "x-example": "\/articles?id=5" }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "requestHeaders": { + "type": "array", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] + }, + "responseStatusCode": { + "type": "integer", + "description": "HTTP response status code.", + "x-example": 200, + "format": "int32" + }, + "responseBody": { + "type": "string", + "description": "HTTP response body. This will return empty unless execution is created as synchronous.", + "x-example": "" + }, + "responseHeaders": { + "type": "array", + "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "items": { + "$ref": "#\/components\/schemas\/headers" + }, + "x-example": [ + { + "Content-Type": "application\/json" + } + ] }, - "$createdAt": { + "logs": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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": "" }, - "$updatedAt": { + "errors": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "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": "" }, - "default": { - "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - 0, - 0 - ], - "items": { - "type": "number", - "format": "double" - }, + "duration": { + "type": "number", + "description": "Resource(function\/site) execution duration in seconds.", + "x-example": 0.4, + "format": "double" + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", - "$updatedAt" + "$updatedAt", + "$permissions", + "functionId", + "deploymentId", + "trigger", + "status", + "requestMethod", + "requestPath", + "requestHeaders", + "responseStatusCode", + "responseBody", + "responseHeaders", + "logs", + "errors", + "duration" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - 0, - 0 - ] + "$permissions": [ + "any" + ], + "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", + "trigger": "http", + "status": "processing", + "requestMethod": "GET", + "requestPath": "\/articles?id=5", + "requestHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "responseStatusCode": 200, + "responseBody": "", + "responseHeaders": [ + { + "Content-Type": "application\/json" + } + ], + "logs": "", + "errors": "", + "duration": 0.4, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" } }, - "columnLine": { - "description": "ColumnLine", + "project": { + "description": "Project", "type": "object", "properties": { - "key": { + "$id": { "type": "string", - "description": "Column Key.", - "x-example": "fullName" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" }, - "type": { + "$createdAt": { "type": "string", - "description": "Column type.", - "x-example": "string" + "description": "Project creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "status": { + "$updatedAt": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Project update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "error": { + "name": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "Project name.", + "x-example": "New Project" }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" }, - "array": { + "region": { + "type": "string", + "description": "Project region", + "x-example": "fra" + }, + "devKeys": { + "type": "array", + "description": "Deprecated since 1.9.5: List of dev keys.", + "items": { + "$ref": "#\/components\/schemas\/devKey" + }, + "x-example": {} + }, + "smtpEnabled": { "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true + "description": "Status for custom SMTP", + "x-example": false }, - "$createdAt": { + "smtpSenderName": { "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "SMTP sender name", + "x-example": "John Appwrite" }, - "$updatedAt": { + "smtpSenderEmail": { "type": "string", - "description": "Column update date in ISO 8601 format.", + "description": "SMTP sender email", + "x-example": "john@appwrite.io" + }, + "smtpReplyToName": { + "type": "string", + "description": "SMTP reply to name", + "x-example": "Support Team" + }, + "smtpReplyToEmail": { + "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. This property is write-only and always returned empty.", + "x-example": "smtp-password", + "format": "password" + }, + "smtpSecure": { + "type": "string", + "description": "SMTP server secure protocol", + "x-example": "tls" + }, + "pingCount": { + "type": "integer", + "description": "Number of times the ping was received for this project.", + "x-example": 1, + "format": "int32" + }, + "pingedAt": { + "type": "string", + "description": "Last ping datetime in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "default": { + "labels": { "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": [ - [ - 0, - 0 - ], - [ - 1, - 1 - ] - ], + "description": "Labels for the project.", "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } + "type": "string" }, - "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - 0, - 0 - ], - [ - 1, - 1 + "x-example": [ + "vip" ] - ] - } - }, - "columnPolygon": { - "description": "ColumnPolygon", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" }, "status": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "description": "Project status", + "x-example": "active" }, - "error": { + "onboarding": { + "type": "object", + "additionalProperties": true, + "description": "Stage progress (completed or skipped) with timestamps and actor types, keyed by stage id.", + "x-example": [] + }, + "authMethods": { + "type": "array", + "description": "List of auth methods.", + "items": { + "$ref": "#\/components\/schemas\/projectAuthMethod" + }, + "x-example": {} + }, + "services": { + "type": "array", + "description": "List of services.", + "items": { + "$ref": "#\/components\/schemas\/projectService" + }, + "x-example": {} + }, + "protocols": { + "type": "array", + "description": "List of protocols.", + "items": { + "$ref": "#\/components\/schemas\/projectProtocol" + }, + "x-example": {} + }, + "blocks": { + "type": "array", + "description": "Project blocks information", + "items": { + "$ref": "#\/components\/schemas\/block" + }, + "x-example": "" + }, + "consoleAccessedAt": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "description": "Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "required": { + "wafEnabled": { "type": "boolean", - "description": "Is column required?", + "description": "Whether WAF enforcement is enabled for the project.", "x-example": true }, - "array": { + "billingLimits": { + "type": "object", + "description": "Billing limits reached", + "x-example": "", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingLimits" + } + ], + "nullable": true + }, + "oAuth2ServerEnabled": { "type": "boolean", - "description": "Is column an array?", + "description": "OAuth2 server status", "x-example": false, "nullable": true }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { + "oAuth2ServerAuthorizationUrl": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "OAuth2 server authorization URL", + "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "nullable": true }, - "default": { + "oAuth2ServerScopes": { "type": "array", - "description": "Default value for column when not provided. Cannot be set when column is required.", + "description": "OAuth2 server allowed scopes", + "items": { + "type": "string" + }, "x-example": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] - ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] + "read", + "write" ], + "nullable": true + }, + "oAuth2ServerDefaultScopes": { + "type": "array", + "description": "OAuth2 server scopes used when an authorization request omits the scope parameter", "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } + "type": "string" }, + "x-example": [ + "read" + ], "nullable": true - } - }, - "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" - ], - "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": [ - [ - [ - 0, - 0 - ], - [ - 0, - 10 - ] + }, + "oAuth2ServerAuthorizationDetailsTypes": { + "type": "array", + "description": "OAuth2 server accepted RFC 9396 authorization_details types", + "items": { + "type": "string" + }, + "x-example": [ + "calendar" ], - [ - [ - 10, - 10 - ], - [ - 0, - 0 - ] - ] - ] - } - }, - "columnVarchar": { - "description": "ColumnVarchar", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" + "nullable": true }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" + "oAuth2ServerAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for confidential clients", + "x-example": 3600, + "format": "int32", + "nullable": true }, - "status": { - "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ], - "x-enum-name": "ColumnStatus" + "oAuth2ServerRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for confidential clients", + "x-example": 86400, + "format": "int32", + "nullable": true }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" + "oAuth2ServerPublicAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 3600, + "format": "int32", + "nullable": true + }, + "oAuth2ServerPublicRefreshTokenDuration": { + "type": "integer", + "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", + "x-example": 2592000, + "format": "int32", + "nullable": true }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true + "oAuth2ServerInstallationAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for app installation access tokens", + "x-example": 3600, + "format": "int32", + "nullable": true }, - "array": { + "oAuth2ServerConfidentialPkce": { "type": "boolean", - "description": "Is column an array?", + "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", "x-example": false, "nullable": true }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { + "oAuth2ServerVerificationUrl": { "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured.", + "x-example": "https:\/\/cloud.appwrite.io\/device", + "nullable": true }, - "size": { + "oAuth2ServerUserCodeLength": { "type": "integer", - "description": "Column size.", - "x-example": 128, - "format": "int32" + "description": "Number of characters in the device flow user code, excluding the formatting separator.", + "x-example": 8, + "format": "int32", + "nullable": true }, - "default": { + "oAuth2ServerUserCodeFormat": { "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", + "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", + "x-example": "alphanumeric", "nullable": true }, - "encrypt": { - "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, + "oAuth2ServerDeviceCodeDuration": { + "type": "integer", + "description": "Lifetime in seconds of device flow device codes and user codes.", + "x-example": 600, + "format": "int32", + "nullable": true + }, + "oAuth2ServerDiscoveryUrl": { + "type": "string", + "description": "OAuth2 server discovery URL", + "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration", "nullable": true } }, "required": [ - "key", - "type", - "status", - "error", - "required", + "$id", "$createdAt", "$updatedAt", - "size" + "name", + "teamId", + "region", + "devKeys", + "smtpEnabled", + "smtpSenderName", + "smtpSenderEmail", + "smtpReplyToName", + "smtpReplyToEmail", + "smtpHost", + "smtpPort", + "smtpUsername", + "smtpPassword", + "smtpSecure", + "pingCount", + "pingedAt", + "labels", + "status", + "onboarding", + "authMethods", + "services", + "protocols", + "blocks", + "consoleAccessedAt", + "wafEnabled" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "size": 128, - "default": "default", - "encrypt": false + "name": "New Project", + "teamId": "1592981250", + "region": "fra", + "devKeys": {}, + "smtpEnabled": false, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyToName": "Support Team", + "smtpReplyToEmail": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "smtp-password", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [ + "vip" + ], + "status": "active", + "onboarding": [], + "authMethods": {}, + "services": {}, + "protocols": {}, + "blocks": "", + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", + "wafEnabled": true, + "billingLimits": "", + "oAuth2ServerEnabled": false, + "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", + "oAuth2ServerScopes": [ + "read", + "write" + ], + "oAuth2ServerDefaultScopes": [ + "read" + ], + "oAuth2ServerAuthorizationDetailsTypes": [ + "calendar" + ], + "oAuth2ServerAccessTokenDuration": 3600, + "oAuth2ServerRefreshTokenDuration": 86400, + "oAuth2ServerPublicAccessTokenDuration": 3600, + "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerInstallationAccessTokenDuration": 3600, + "oAuth2ServerConfidentialPkce": false, + "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", + "oAuth2ServerUserCodeLength": 8, + "oAuth2ServerUserCodeFormat": "alphanumeric", + "oAuth2ServerDeviceCodeDuration": 600, + "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" } }, - "columnText": { - "description": "ColumnText", + "projectAuthMethod": { + "description": "ProjectAuthMethod", "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { + "$id": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", + "description": "Auth method ID.", + "x-example": "email-password", "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" + "email-password", + "magic-url", + "email-otp", + "anonymous", + "invites", + "jwt", + "phone" ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true + "x-enum-name": "ProjectAuthMethodId" }, - "encrypt": { + "enabled": { "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true + "description": "Auth method status.", + "x-example": false } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "$id", + "enabled" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false + "$id": "email-password", + "enabled": false } }, - "columnMediumtext": { - "description": "ColumnMediumtext", + "projectService": { + "description": "ProjectService", "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { + "$id": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", + "description": "Service ID.", + "x-example": "sites", "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" + "account", + "avatars", + "databases", + "tablesdb", + "locale", + "health", + "project", + "storage", + "teams", + "users", + "vcs", + "sites", + "functions", + "proxy", + "graphql", + "migrations", + "messaging", + "advisor" ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true + "x-enum-name": "ProjectServiceId" }, - "encrypt": { + "enabled": { "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true + "description": "Service status.", + "x-example": false } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "$id", + "enabled" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false + "$id": "sites", + "enabled": false } }, - "columnLongtext": { - "description": "ColumnLongtext", + "projectProtocol": { + "description": "ProjectProtocol", "type": "object", "properties": { - "key": { - "type": "string", - "description": "Column Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Column type.", - "x-example": "string" - }, - "status": { + "$id": { "type": "string", - "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", + "description": "Protocol ID.", + "x-example": "graphql", "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" + "rest", + "graphql", + "websocket" ], - "x-enum-name": "ColumnStatus" - }, - "error": { - "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an column.", - "x-example": "string" - }, - "required": { - "type": "boolean", - "description": "Is column required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is column an array?", - "x-example": false, - "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Column creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Column update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "default": { - "type": "string", - "description": "Default value for column when not provided. Cannot be set when column is required.", - "x-example": "default", - "nullable": true + "x-enum-name": "ProjectProtocolId" }, - "encrypt": { + "enabled": { "type": "boolean", - "description": "Defines whether this column is encrypted or not.", - "x-example": false, - "nullable": true + "description": "Protocol status.", + "x-example": false } }, "required": [ - "key", - "type", - "status", - "error", - "required", - "$createdAt", - "$updatedAt" + "$id", + "enabled" ], "example": { - "key": "fullName", - "type": "string", - "status": "available", - "error": "string", - "required": true, - "array": false, - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "default": "default", - "encrypt": false + "$id": "graphql", + "enabled": false } }, - "index": { - "description": "Index", + "webhook": { + "description": "Webhook", "type": "object", "properties": { "$id": { "type": "string", - "description": "Index ID.", + "description": "Webhook ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Index creation date in ISO 8601 format.", + "description": "Webhook creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Index update date in ISO 8601 format.", + "description": "Webhook update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "key": { - "type": "string", - "description": "Index key.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { + "name": { "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available", - "enum": [ - "available", - "processing", - "deleting", - "stuck", - "failed" - ] + "description": "Webhook name.", + "x-example": "My Webhook" }, - "error": { + "url": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" + "description": "Webhook URL endpoint.", + "x-example": "https:\/\/example.com\/webhook" }, - "attributes": { + "events": { "type": "array", - "description": "Index attributes.", + "description": "Webhook trigger events.", "items": { "type": "string" }, - "x-example": [] + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, - "lengths": { - "type": "array", - "description": "Index attributes length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] + "tls": { + "type": "boolean", + "description": "Indicates if SSL \/ TLS certificate verification is enabled.", + "x-example": true + }, + "authUsername": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "authPassword": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "webhook-password", + "format": "password" + }, + "secret": { + "type": "string", + "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", + "x-example": "ad3d581ca230e2b7059c545e5a" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if this webhook is enabled.", + "x-example": true + }, + "logs": { + "type": "string", + "description": "Webhook error logs from the most recent failure.", + "x-example": "Failed to connect to remote server." }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { - "type": "string" - }, - "x-example": [], - "nullable": true + "attempts": { + "type": "integer", + "description": "Number of consecutive failed webhook attempts.", + "x-example": 10, + "format": "int32" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "key", - "type", - "status", - "error", - "attributes", - "lengths" + "name", + "url", + "events", + "tls", + "authUsername", + "authPassword", + "secret", + "enabled", + "logs", + "attempts" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "attributes": [], - "lengths": [], - "orders": [] + "name": "My Webhook", + "url": "https:\/\/example.com\/webhook", + "events": [ + "databases.tables.update", + "databases.collections.update" + ], + "tls": true, + "authUsername": "username", + "authPassword": "webhook-password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 } }, - "columnIndex": { - "description": "Index", + "key": { + "description": "Key", "type": "object", "properties": { "$id": { "type": "string", - "description": "Index ID.", + "description": "Key ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Index creation date in ISO 8601 format.", + "description": "Key creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Index update date in ISO 8601 format.", + "description": "Key update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "key": { - "type": "string", - "description": "Index Key.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { + "name": { "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "description": "Key name.", + "x-example": "My API Key" }, - "error": { + "expire": { "type": "string", - "description": "Error message. Displays error generated on failure of creating or deleting an index.", - "x-example": "string" + "description": "Key expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "columns": { + "scopes": { "type": "array", - "description": "Index columns.", + "description": "Allowed permission scopes.", "items": { "type": "string" }, - "x-example": [] + "x-example": "users.read" }, - "lengths": { - "type": "array", - "description": "Index columns length.", - "items": { - "type": "integer", - "format": "int32" - }, - "x-example": [] + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" }, - "orders": { + "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": "Index orders.", + "description": "List of SDK user agents that used this key.", "items": { "type": "string" }, - "x-example": [], - "nullable": true + "x-example": "appwrite:flutter" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "key", - "type", - "status", - "error", - "columns", - "lengths" + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "index1", - "type": "primary", - "status": "available", - "error": "string", - "columns": [], - "lengths": [], - "orders": [] + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" } }, - "row": { - "description": "Row", + "ephemeralKey": { + "description": "Ephemeral Key", "type": "object", "properties": { "$id": { "type": "string", - "description": "Row ID.", + "description": "Key ID.", "x-example": "5e5ea5c16897e" }, - "$sequence": { + "$createdAt": { "type": "string", - "description": "Row sequence ID.", - "x-example": "1", - "readOnly": true + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$tableId": { + "$updatedAt": { "type": "string", - "description": "Table ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$databaseId": { + "name": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Key name.", + "x-example": "My API Key" }, - "$createdAt": { + "expire": { "type": "string", - "description": "Row creation date in ISO 8601 format.", + "description": "Key expiration date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { + "type": "string" + }, + "x-example": "users.read" + }, + "secret": { "type": "string", - "description": "Row update date in ISO 8601 format.", + "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" }, - "$permissions": { + "sdks": { "type": "array", - "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "List of SDK user agents that used this key.", "items": { "type": "string" }, - "x-example": [ - "read(\"any\")" - ] + "x-example": "appwrite:flutter" } }, - "additionalProperties": true, "required": [ "$id", - "$sequence", - "$tableId", - "$databaseId", "$createdAt", "$updatedAt", - "$permissions" + "name", + "expire", + "scopes", + "secret", + "accessedAt", + "sdks" ], "example": { "$id": "5e5ea5c16897e", - "$sequence": "1", - "$tableId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ] + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": "users.read", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" } }, - "document": { - "description": "Document", + "devKey": { + "description": "DevKey", "type": "object", "properties": { "$id": { "type": "string", - "description": "Document ID.", + "description": "Key ID.", "x-example": "5e5ea5c16897e" }, - "$sequence": { + "$createdAt": { "type": "string", - "description": "Document sequence ID.", - "x-example": "1", - "readOnly": true + "description": "Key creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$collectionId": { + "$updatedAt": { "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Key update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$databaseId": { + "name": { "type": "string", - "description": "Database ID.", - "x-example": "5e5ea5c15117e", - "readOnly": true + "description": "Key name.", + "x-example": "Dev API Key" }, - "$createdAt": { + "expire": { "type": "string", - "description": "Document creation date in ISO 8601 format.", + "description": "Key expiration date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "secret": { "type": "string", - "description": "Document update date in ISO 8601 format.", + "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" }, - "$permissions": { + "sdks": { "type": "array", - "description": "Document permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "List of SDK user agents that used this key.", "items": { "type": "string" }, - "x-example": [ - "read(\"any\")" - ] + "x-example": "appwrite:flutter" } }, - "additionalProperties": true, "required": [ "$id", - "$sequence", - "$collectionId", - "$databaseId", "$createdAt", "$updatedAt", - "$permissions" + "name", + "expire", + "secret", + "accessedAt", + "sdks" ], "example": { "$id": "5e5ea5c16897e", - "$sequence": "1", - "$collectionId": "5e5ea5c15117e", - "$databaseId": "5e5ea5c15117e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "username": "john.doe", - "email": "john.doe@example.com", - "fullName": "John Doe", - "age": 30, - "isAdmin": false + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": "appwrite:flutter" } }, - "presence": { - "description": "Presence", + "mockNumber": { + "description": "Mock Number", "type": "object", "properties": { - "$id": { + "number": { "type": "string", - "description": "Presence ID.", - "x-example": "5e5ea5c16897e" + "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", + "x-example": "+1612842323" + }, + "otp": { + "type": "string", + "description": "Mock OTP for the number. ", + "x-example": "123456" }, "$createdAt": { "type": "string", - "description": "Presence creation date in ISO 8601 format.", + "description": "Attribute creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Presence update date in ISO 8601 format.", + "description": "Attribute update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Presence permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "674af8f3e12a5f9ac0be" - }, - "status": { - "type": "string", - "description": "Presence status.", - "x-example": "online", - "nullable": true - }, - "source": { - "type": "string", - "description": "Presence source.", - "x-example": "HTTP" - }, - "expiresAt": { - "type": "string", - "description": "Presence expiry date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true - }, - "metadata": { - "type": "object", - "additionalProperties": true, - "description": "Presence metadata.", - "x-example": { - "key": "value" - } } }, "required": [ - "$id", + "number", + "otp", "$createdAt", - "$updatedAt", - "$permissions", - "userId", - "source" + "$updatedAt" ], "example": { - "$id": "5e5ea5c16897e", + "number": "+1612842323", + "otp": "123456", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "userId": "674af8f3e12a5f9ac0be", - "status": "online", - "source": "HTTP", - "expiresAt": "2020-10-15T06:38:00.000+00:00", - "metadata": { - "key": "value" - } + "$updatedAt": "2020-10-15T06:38:00.000+00:00" } }, - "log": { - "description": "Log", + "oAuth2Github": { + "description": "OAuth2GitHub", "type": "object", "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User email of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User name of the actor recorded for this log. During impersonation, this is the original impersonator.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "userType": { - "type": "string", - "description": "User type who triggered the audit log. Possible values: user, admin, guest, keyProject, keyAccount, keyOrganization.", - "x-example": "user" - }, - "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": { + "$id": { "type": "string", - "description": "Operating system version.", - "x-example": "Mac" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "clientCode": { + "clientId": { "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" + "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", + "x-example": "e4d87900000000540733" }, - "clientName": { + "clientSecret": { "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { + "description": "GitHub OAuth2 client secret.", + "x-example": "5e07c00000000000000000000000000000198bcc" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "e4d87900000000540733", + "clientSecret": "5e07c00000000000000000000000000000198bcc" + } + }, + "oAuth2Discord": { + "description": "OAuth2Discord", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Client version.", - "x-example": "84.0" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "clientEngineVersion": { + "clientId": { "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" + "description": "Discord OAuth2 client ID.", + "x-example": "950722000000343754" }, - "deviceName": { + "clientSecret": { "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { + "description": "Discord OAuth2 client secret.", + "x-example": "YmPXnM000000000000000000002zFg5D" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "950722000000343754", + "clientSecret": "YmPXnM000000000000000000002zFg5D" + } + }, + "oAuth2Figma": { + "description": "OAuth2Figma", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Device brand name.", - "x-example": "Google" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "countryCode": { + "clientId": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Figma OAuth2 client ID.", + "x-example": "byay5H0000000000VtiI40" }, - "countryName": { + "clientSecret": { "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "Figma OAuth2 client secret.", + "x-example": "yEpOYn0000000000000000004iIsU5" } }, "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "userType", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "event": "account.sessions.create", - "userId": "610fc2f985ee0", - "userEmail": "john@appwrite.io", - "userName": "John Doe", - "mode": "admin", - "userType": "user", - "ip": "127.0.0.1", - "time": "2020-10-15T06:38:00.000+00:00", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States" + "$id": "github", + "enabled": false, + "clientId": "byay5H0000000000VtiI40", + "clientSecret": "yEpOYn0000000000000000004iIsU5" } }, - "user": { - "description": "User", + "oAuth2Dropbox": { + "description": "OAuth2Dropbox", "type": "object", "properties": { "$id": { "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { - "type": "string", - "description": "User creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "$updatedAt": { + "appKey": { "type": "string", - "description": "User update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Dropbox OAuth2 app key.", + "x-example": "jl000000000009t" }, - "name": { + "appSecret": { "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "password": { + "description": "Dropbox OAuth2 app secret.", + "x-example": "g200000000000vw" + } + }, + "required": [ + "$id", + "enabled", + "appKey", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appKey": "jl000000000009t", + "appSecret": "g200000000000vw" + } + }, + "oAuth2Dailymotion": { + "description": "OAuth2Dailymotion", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Hashed user password.", - "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "nullable": true + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "hash": { - "type": "string", - "description": "Password hashing algorithm.", - "x-example": "argon2", - "nullable": true + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "hashOptions": { - "type": "object", - "description": "Password hashing algorithm configuration.", - "x-example": {}, - "allOf": [ - { - "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" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "argon2": "#\/components\/schemas\/algoArgon2", - "scrypt": "#\/components\/schemas\/algoScrypt", - "scryptMod": "#\/components\/schemas\/algoScryptModified", - "bcrypt": "#\/components\/schemas\/algoBcrypt", - "phpass": "#\/components\/schemas\/algoPhpass", - "sha": "#\/components\/schemas\/algoSha", - "md5": "#\/components\/schemas\/algoMd5" - } - } - } - ], - "nullable": true + "apiKey": { + "type": "string", + "description": "Dailymotion OAuth2 API key.", + "x-example": "07a9000000000000067f" }, - "registration": { + "apiSecret": { "type": "string", - "description": "User registration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Dailymotion OAuth2 API secret.", + "x-example": "a399a90000000000000000000000000000d90639" + } + }, + "required": [ + "$id", + "enabled", + "apiKey", + "apiSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "apiKey": "07a9000000000000067f", + "apiSecret": "a399a90000000000000000000000000000d90639" + } + }, + "oAuth2Bitbucket": { + "description": "OAuth2Bitbucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "status": { + "enabled": { "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" - ] + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "passwordUpdate": { + "key": { "type": "string", - "description": "Password update time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Bitbucket OAuth2 key.", + "x-example": "Knt70000000000ByRc" }, - "email": { + "secret": { "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "phone": { + "description": "Bitbucket OAuth2 secret.", + "x-example": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "required": [ + "$id", + "enabled", + "key", + "secret" + ], + "example": { + "$id": "github", + "enabled": false, + "key": "Knt70000000000ByRc", + "secret": "NMfLZJ00000000000000000000TLQdDx" + } + }, + "oAuth2Bitly": { + "description": "OAuth2Bitly", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "User phone number in E.164 format.", - "x-example": "+4930901820" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "emailVerification": { + "enabled": { "type": "boolean", - "description": "Email verification status.", - "x-example": true + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "emailCanonical": { + "clientId": { "type": "string", - "description": "Canonical form of the user email address.", - "x-example": "john@appwrite.io", - "nullable": true - }, - "emailIsFree": { - "type": "boolean", - "description": "Whether the user email is from a free email provider.", - "x-example": true, - "nullable": true + "description": "Bitly OAuth2 client ID.", + "x-example": "d95151000000000000000000000000000067af9b" }, - "emailIsDisposable": { - "type": "boolean", - "description": "Whether the user email is from a disposable email provider.", - "x-example": false, - "nullable": true + "clientSecret": { + "type": "string", + "description": "Bitly OAuth2 client secret.", + "x-example": "a13e250000000000000000000000000000d73095" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "d95151000000000000000000000000000067af9b", + "clientSecret": "a13e250000000000000000000000000000d73095" + } + }, + "oAuth2Box": { + "description": "OAuth2Box", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "emailIsCorporate": { + "enabled": { "type": "boolean", - "description": "Whether the user email is from a corporate domain.", - "x-example": true, - "nullable": true + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "emailIsCanonical": { - "type": "boolean", - "description": "Whether the user email is in its canonical form.", - "x-example": true, - "nullable": true + "clientId": { + "type": "string", + "description": "Box OAuth2 client ID.", + "x-example": "deglcs00000000000000000000x2og6y" }, - "phoneVerification": { - "type": "boolean", - "description": "Phone verification status.", - "x-example": true + "clientSecret": { + "type": "string", + "description": "Box OAuth2 client secret.", + "x-example": "OKM1f100000000000000000000eshEif" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "deglcs00000000000000000000x2og6y", + "clientSecret": "OKM1f100000000000000000000eshEif" + } + }, + "oAuth2Autodesk": { + "description": "OAuth2Autodesk", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "mfa": { + "enabled": { "type": "boolean", - "description": "Multi factor authentication status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/preferences" - } - ] - }, - "targets": { - "type": "array", - "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", - "items": { - "$ref": "#\/components\/schemas\/target" - }, - "x-example": [] + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "accessedAt": { + "clientId": { "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" - }, - "impersonator": { - "type": "boolean", - "description": "Whether the user can impersonate other users.", - "x-example": false, - "nullable": true + "description": "Autodesk OAuth2 client ID.", + "x-example": "5zw90v00000000000000000000kVYXN7" }, - "impersonatorUserId": { + "clientSecret": { "type": "string", - "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", - "x-example": "5e5ea5c16897e", - "nullable": true + "description": "Autodesk OAuth2 client secret.", + "x-example": "7I000000000000MW" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "name", - "registration", - "status", - "labels", - "passwordUpdate", - "email", - "phone", - "emailVerification", - "phoneVerification", - "mfa", - "prefs", - "targets", - "accessedAt" + "enabled", + "clientId", + "clientSecret" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "John Doe", - "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE", - "hash": "argon2", - "hashOptions": {}, - "registration": "2020-10-15T06:38:00.000+00:00", - "status": true, - "labels": [ - "vip" - ], - "passwordUpdate": "2020-10-15T06:38:00.000+00:00", - "email": "john@appwrite.io", - "phone": "+4930901820", - "emailVerification": true, - "emailCanonical": "john@appwrite.io", - "emailIsFree": true, - "emailIsDisposable": false, - "emailIsCorporate": true, - "emailIsCanonical": true, - "phoneVerification": true, - "mfa": true, - "prefs": { - "theme": "pink", - "timezone": "UTC" - }, - "targets": [], - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "impersonator": false, - "impersonatorUserId": "5e5ea5c16897e" + "$id": "github", + "enabled": false, + "clientId": "5zw90v00000000000000000000kVYXN7", + "clientSecret": "7I000000000000MW" } }, - "algoMd5": { - "description": "AlgoMD5", + "oAuth2Google": { + "description": "OAuth2Google", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "md5" + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Google OAuth2 client ID.", + "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + }, + "clientSecret": { + "type": "string", + "description": "Google OAuth2 client secret.", + "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + }, + "prompt": { + "type": "array", + "description": "Google OAuth2 prompt values.", + "items": { + "type": "string", + "enum": [ + "none", + "consent", + "select_account" + ] + }, + "x-example": [ + "consent" + ] } }, "required": [ - "type" + "$id", + "enabled", + "clientId", + "clientSecret", + "prompt" ], "example": { - "type": "md5" + "$id": "github", + "enabled": false, + "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", + "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj", + "prompt": [ + "consent" + ] } }, - "algoSha": { - "description": "AlgoSHA", + "oAuth2Zoom": { + "description": "OAuth2Zoom", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "sha" + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoom OAuth2 client ID.", + "x-example": "QMAC00000000000000w0AQ" + }, + "clientSecret": { + "type": "string", + "description": "Zoom OAuth2 client secret.", + "x-example": "GAWsG4000000000000000000007U01ON" } }, "required": [ - "type" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "type": "sha" + "$id": "github", + "enabled": false, + "clientId": "QMAC00000000000000w0AQ", + "clientSecret": "GAWsG4000000000000000000007U01ON" } }, - "algoPhpass": { - "description": "AlgoPHPass", + "oAuth2Zoho": { + "description": "OAuth2Zoho", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "phpass" + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Zoho OAuth2 client ID.", + "x-example": "1000.83C178000000000000000000RPNX0B" + }, + "clientSecret": { + "type": "string", + "description": "Zoho OAuth2 client secret.", + "x-example": "fb5cac000000000000000000000000000000a68f6e" } }, "required": [ - "type" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "type": "phpass" + "$id": "github", + "enabled": false, + "clientId": "1000.83C178000000000000000000RPNX0B", + "clientSecret": "fb5cac000000000000000000000000000000a68f6e" } }, - "algoBcrypt": { - "description": "AlgoBcrypt", + "oAuth2Yandex": { + "description": "OAuth2Yandex", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "bcrypt" + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { + "type": "string", + "description": "Yandex OAuth2 client ID.", + "x-example": "6a8a6a0000000000000000000091483c" + }, + "clientSecret": { + "type": "string", + "description": "Yandex OAuth2 client secret.", + "x-example": "bbf98500000000000000000000c75a63" } }, "required": [ - "type" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "type": "bcrypt" + "$id": "github", + "enabled": false, + "clientId": "6a8a6a0000000000000000000091483c", + "clientSecret": "bbf98500000000000000000000c75a63" } }, - "algoScrypt": { - "description": "AlgoScrypt", + "oAuth2X": { + "description": "OAuth2X", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "x-example": 8, - "format": "int32" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "x-example": 14, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "x-example": 1, - "format": "int32" + "customerKey": { + "type": "string", + "description": "X OAuth2 customer key.", + "x-example": "slzZV0000000000000NFLaWT" }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "x-example": 64, - "format": "int32" + "secretKey": { + "type": "string", + "description": "X OAuth2 secret key.", + "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" } }, "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" + "$id", + "enabled", + "customerKey", + "secretKey" ], "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 + "$id": "github", + "enabled": false, + "customerKey": "slzZV0000000000000NFLaWT", + "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" } }, - "algoScryptModified": { - "description": "AlgoScryptModified", + "oAuth2WordPress": { + "description": "OAuth2WordPress", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "scryptMod" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "x-example": "UxLMreBr6tYyjQ==" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "saltSeparator": { + "clientId": { "type": "string", - "description": "Separator used to compute hash.", - "x-example": "Bw==" + "description": "WordPress OAuth2 client ID.", + "x-example": "130005" }, - "signerKey": { + "clientSecret": { "type": "string", - "description": "Key used to compute hash.", - "x-example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + "description": "WordPress OAuth2 client secret.", + "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" } }, "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + "$id": "github", + "enabled": false, + "clientId": "130005", + "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" } }, - "algoArgon2": { - "description": "AlgoArgon2", + "oAuth2Twitch": { + "description": "OAuth2Twitch", "type": "object", "properties": { - "type": { + "$id": { "type": "string", - "description": "Algo type.", - "x-example": "argon2" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "x-example": 65536, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "x-example": 4, - "format": "int32" + "clientId": { + "type": "string", + "description": "Twitch OAuth2 client ID.", + "x-example": "vvi0in000000000000000000ikmt9p" }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "x-example": 3, - "format": "int32" + "clientSecret": { + "type": "string", + "description": "Twitch OAuth2 client secret.", + "x-example": "pmapue000000000000000000zylw3v" } }, "required": [ - "type", - "memoryCost", - "timeCost", - "threads" + "$id", + "enabled", + "clientId", + "clientSecret" ], "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true, - "example": { - "language": "en", - "timezone": "UTC", - "darkTheme": true + "$id": "github", + "enabled": false, + "clientId": "vvi0in000000000000000000ikmt9p", + "clientSecret": "pmapue000000000000000000zylw3v" } }, - "session": { - "description": "Session", + "oAuth2Stripe": { + "description": "OAuth2Stripe", "type": "object", "properties": { "$id": { "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Session creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Session update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "string", - "description": "Session expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "string", - "description": "The date of when the access token expires in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "current": { + "enabled": { "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - }, - "factors": { - "type": "array", - "description": "Returns a list of active session factors.", - "items": { - "type": "string" - }, - "x-example": [ - "email" - ] + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "secret": { + "clientId": { "type": "string", - "description": "Secret used to authenticate the user. Only included if the request was made with an API key", - "x-example": "5e5bb8c16897e" + "description": "Stripe OAuth2 client ID.", + "x-example": "ca_UKibXX0000000000000000000006byvR" }, - "mfaUpdatedAt": { + "apiSecretKey": { "type": "string", - "description": "Most recent date in ISO 8601 format when the session successfully passed MFA challenge.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Stripe OAuth2 API secret key.", + "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current", - "factors", - "secret", - "mfaUpdatedAt" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "expire": "2020-10-15T06:38:00.000+00:00", - "provider": "email", - "providerUid": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "ip": "127.0.0.1", - "osCode": "Mac", - "osName": "Mac", - "osVersion": "Mac", - "clientType": "browser", - "clientCode": "CM", - "clientName": "Chrome Mobile iOS", - "clientVersion": "84.0", - "clientEngine": "WebKit", - "clientEngineVersion": "605.1.15", - "deviceName": "smartphone", - "deviceBrand": "Google", - "deviceModel": "Nexus 5", - "countryCode": "US", - "countryName": "United States", - "current": true, - "factors": [ - "email" - ], - "secret": "5e5bb8c16897e", - "mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00" + "enabled", + "clientId", + "apiSecretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "ca_UKibXX0000000000000000000006byvR", + "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" } }, - "identity": { - "description": "Identity", + "oAuth2Spotify": { + "description": "OAuth2Spotify", "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" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "provider": { + "clientId": { "type": "string", - "description": "Identity Provider.", - "x-example": "email" + "description": "Spotify OAuth2 client ID.", + "x-example": "6ec271000000000000000000009beace" }, - "providerUid": { + "clientSecret": { "type": "string", - "description": "ID of the User in the Identity Provider.", - "x-example": "5e5bb8c16897e" - }, - "providerEmail": { + "description": "Spotify OAuth2 client secret.", + "x-example": "db068a000000000000000000008b5b9f" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "6ec271000000000000000000009beace", + "clientSecret": "db068a000000000000000000008b5b9f" + } + }, + "oAuth2Slack": { + "description": "OAuth2Slack", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Email of the User in the Identity Provider.", - "x-example": "user@example.com" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "providerAccessToken": { - "type": "string", - "description": "Identity Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "providerAccessTokenExpiry": { + "clientId": { "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" + "description": "Slack OAuth2 client ID.", + "x-example": "23000000089.15000000000023" }, - "providerRefreshToken": { + "clientSecret": { "type": "string", - "description": "Identity Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "description": "Slack OAuth2 client secret.", + "x-example": "81656000000000000000000000f3d2fd" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "userId", - "provider", - "providerUid", - "providerEmail", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken" + "enabled", + "clientId", + "clientSecret" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5bb8c16897e", - "provider": "email", - "providerUid": "5e5bb8c16897e", - "providerEmail": "user@example.com", - "providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", - "providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00", - "providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + "$id": "github", + "enabled": false, + "clientId": "23000000089.15000000000023", + "clientSecret": "81656000000000000000000000f3d2fd" } }, - "token": { - "description": "Token", + "oAuth2Podio": { + "description": "OAuth2Podio", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { - "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "userId": { + "clientId": { "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" + "description": "Podio OAuth2 client ID.", + "x-example": "appwrite-oauth-test-app" }, - "secret": { + "clientSecret": { "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": "" + "description": "Podio OAuth2 client secret.", + "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-oauth-test-app", + "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + } + }, + "oAuth2Notion": { + "description": "OAuth2Notion", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "expire": { + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "oauthClientId": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Notion OAuth2 client ID.", + "x-example": "341d8700-0000-0000-0000-000000446ee3" }, - "phrase": { + "oauthClientSecret": { "type": "string", - "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.", - "x-example": "Golden Fox" + "description": "Notion OAuth2 client secret.", + "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" } }, "required": [ "$id", - "$createdAt", - "userId", - "secret", - "expire", - "phrase" + "enabled", + "oauthClientId", + "oauthClientSecret" ], "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "secret": "", - "expire": "2020-10-15T06:38:00.000+00:00", - "phrase": "Golden Fox" + "$id": "github", + "enabled": false, + "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", + "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" } }, - "jwt": { - "description": "JWT", + "oAuth2Salesforce": { + "description": "OAuth2Salesforce", "type": "object", "properties": { - "jwt": { + "$id": { "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "description": "OAuth2 provider ID.", + "x-example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "customerKey": { + "type": "string", + "description": "Salesforce OAuth2 consumer key.", + "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + }, + "customerSecret": { + "type": "string", + "description": "Salesforce OAuth2 consumer secret.", + "x-example": "3w000000000000e2" } }, "required": [ - "jwt" + "$id", + "enabled", + "customerKey", + "customerSecret" ], "example": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "$id": "github", + "enabled": false, + "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", + "customerSecret": "3w000000000000e2" } }, - "locale": { - "description": "Locale", + "oAuth2Yahoo": { + "description": "OAuth2Yahoo", "type": "object", "properties": { - "ip": { + "$id": { "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format", - "x-example": "US" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "country": { + "clientId": { "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" + "description": "Yahoo OAuth2 client ID.", + "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" }, - "continentCode": { + "clientSecret": { "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": { + "description": "Yahoo OAuth2 client secret.", + "x-example": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", + "clientSecret": "cf978f0000000000000000000000000000c5e2e9" + } + }, + "oAuth2Linkedin": { + "description": "OAuth2Linkedin", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "eu": { + "enabled": { "type": "boolean", - "description": "True if country is part of the European Union.", + "description": "OAuth2 provider is active and can be used to create sessions.", "x-example": false }, - "currency": { + "clientId": { "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format", - "x-example": "USD" + "description": "LinkedIn OAuth2 client ID.", + "x-example": "770000000000dv" + }, + "primaryClientSecret": { + "type": "string", + "description": "LinkedIn OAuth2 primary client secret.", + "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" } }, "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" + "$id", + "enabled", + "clientId", + "primaryClientSecret" ], "example": { - "ip": "127.0.0.1", - "countryCode": "US", - "country": "United States", - "continentCode": "NA", - "continent": "North America", - "eu": false, - "currency": "USD" + "$id": "github", + "enabled": false, + "clientId": "770000000000dv", + "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" } }, - "localeCode": { - "description": "LocaleCode", + "oAuth2Disqus": { + "description": "OAuth2Disqus", "type": "object", "properties": { - "code": { + "$id": { "type": "string", - "description": "Locale codes in [ISO 639-1](https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes)", - "x-example": "en-us" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "name": { + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "publicKey": { "type": "string", - "description": "Locale name", - "x-example": "US" + "description": "Disqus OAuth2 public key.", + "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + }, + "secretKey": { + "type": "string", + "description": "Disqus OAuth2 secret key.", + "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" } }, "required": [ - "code", - "name" + "$id", + "enabled", + "publicKey", + "secretKey" ], "example": { - "code": "en-us", - "name": "US" + "$id": "github", + "enabled": false, + "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", + "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" } }, - "file": { - "description": "File", + "oAuth2Amazon": { + "description": "OAuth2Amazon", "type": "object", "properties": { "$id": { "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "$createdAt": { + "clientId": { "type": "string", - "description": "File creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Amazon OAuth2 client ID.", + "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" }, - "$updatedAt": { + "clientSecret": { "type": "string", - "description": "File update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Amazon OAuth2 client secret.", + "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", + "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + } + }, + "oAuth2Etsy": { + "description": "OAuth2Etsy", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$permissions": { - "type": "array", - "description": "File permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "name": { + "keyString": { "type": "string", - "description": "File name.", - "x-example": "Pink.png" + "description": "Etsy OAuth2 keystring.", + "x-example": "nsgzxh0000000000008j85a2" }, - "signature": { + "sharedSecret": { "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { + "description": "Etsy OAuth2 shared secret.", + "x-example": "tp000000ru" + } + }, + "required": [ + "$id", + "enabled", + "keyString", + "sharedSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "keyString": "nsgzxh0000000000008j85a2", + "sharedSecret": "tp000000ru" + } + }, + "oAuth2Facebook": { + "description": "OAuth2Facebook", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "File mime type.", - "x-example": "image\/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "sizeActual": { - "type": "integer", - "description": "File actual stored size in bytes after compression and\/or encryption.", - "x-example": 12345, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" + "appId": { + "type": "string", + "description": "Facebook OAuth2 app ID.", + "x-example": "260600000007694" }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" + "appSecret": { + "type": "string", + "description": "Facebook OAuth2 app secret.", + "x-example": "2d0b2800000000000000000000d38af4" + } + }, + "required": [ + "$id", + "enabled", + "appId", + "appSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "appId": "260600000007694", + "appSecret": "2d0b2800000000000000000000d38af4" + } + }, + "oAuth2Tradeshift": { + "description": "OAuth2Tradeshift", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "encryption": { + "enabled": { "type": "boolean", - "description": "Whether file contents are encrypted at rest.", - "x-example": true + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "compression": { + "oauth2ClientId": { "type": "string", - "description": "Compression algorithm used for the file. Will be one of none, [gzip](https:\/\/en.wikipedia.org\/wiki\/Gzip), or [zstd](https:\/\/en.wikipedia.org\/wiki\/Zstd).", - "x-example": "gzip" + "description": "Tradeshift OAuth2 client ID.", + "x-example": "appwrite-test-org.appwrite-test-app" + }, + "oauth2ClientSecret": { + "type": "string", + "description": "Tradeshift OAuth2 client secret.", + "x-example": "7cb52700-0000-0000-0000-000000ca5b83" } }, "required": [ "$id", - "bucketId", - "$createdAt", - "$updatedAt", - "$permissions", - "name", - "signature", - "mimeType", - "sizeOriginal", - "sizeActual", - "chunksTotal", - "chunksUploaded", - "encryption", - "compression" + "enabled", + "oauth2ClientId", + "oauth2ClientSecret" ], "example": { - "$id": "5e5ea5c16897e", - "bucketId": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "name": "Pink.png", - "signature": "5d529fd02b544198ae075bd57c1762bb", - "mimeType": "image\/png", - "sizeOriginal": 17890, - "sizeActual": 12345, - "chunksTotal": 17890, - "chunksUploaded": 17890, - "encryption": true, - "compression": "gzip" + "$id": "github", + "enabled": false, + "oauth2ClientId": "appwrite-test-org.appwrite-test-app", + "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" } }, - "bucket": { - "description": "Bucket", + "oAuth2Paypal": { + "description": "OAuth2Paypal", "type": "object", "properties": { "$id": { "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { - "type": "string", - "description": "Bucket creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "$updatedAt": { + "clientId": { "type": "string", - "description": "Bucket update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$permissions": { - "type": "array", - "description": "Bucket permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "items": { - "type": "string" - }, - "x-example": [ - "read(\"any\")" - ] - }, - "fileSecurity": { - "type": "boolean", - "description": "Whether file-level security is enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": true + "description": "PayPal OAuth2 client ID.", + "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" }, - "name": { + "secretKey": { "type": "string", - "description": "Bucket name.", - "x-example": "Documents" + "description": "PayPal OAuth2 secret key.", + "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "secretKey" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", + "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" + } + }, + "oAuth2Gitlab": { + "description": "OAuth2Gitlab", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, "enabled": { "type": "boolean", - "description": "Bucket enabled.", + "description": "OAuth2 provider is active and can be used to create sessions.", "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" - ] + "applicationId": { + "type": "string", + "description": "GitLab OAuth2 application ID.", + "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" }, - "compression": { + "secret": { "type": "string", - "description": "Compression algorithm chosen 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" + "description": "GitLab OAuth2 secret.", + "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false + "endpoint": { + "type": "string", + "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", + "x-example": "https:\/\/gitlab.com" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "secret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", + "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", + "endpoint": "https:\/\/gitlab.com" + } + }, + "oAuth2Appwrite": { + "description": "OAuth2Appwrite", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "antivirus": { + "enabled": { "type": "boolean", - "description": "Virus scanning is enabled.", + "description": "OAuth2 provider is active and can be used to create sessions.", "x-example": false }, - "transformations": { - "type": "boolean", - "description": "Image transformations are enabled.", - "x-example": false + "clientId": { + "type": "string", + "description": "Appwrite OAuth2 client ID.", + "x-example": "6a42000000000000b5a0" }, - "totalSize": { - "type": "integer", - "description": "Total size of this bucket in bytes.", - "x-example": 128, - "format": "int32" + "clientSecret": { + "type": "string", + "description": "Appwrite OAuth2 client secret.", + "x-example": "b86afd000000000000000000000000000000000000000000000000000ced5f93" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "$permissions", - "fileSecurity", - "name", "enabled", - "maximumFileSize", - "allowedFileExtensions", - "compression", - "encryption", - "antivirus", - "transformations", - "totalSize" + "clientId", + "clientSecret" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "read(\"any\")" - ], - "fileSecurity": true, - "name": "Documents", + "$id": "github", "enabled": false, - "maximumFileSize": 100, - "allowedFileExtensions": [ - "jpg", - "png" - ], - "compression": "gzip", - "encryption": false, - "antivirus": false, - "transformations": false, - "totalSize": 128 + "clientId": "6a42000000000000b5a0", + "clientSecret": "b86afd000000000000000000000000000000000000000000000000000ced5f93" } }, - "resourceToken": { - "description": "ResourceToken", + "oAuth2Authentik": { + "description": "OAuth2Authentik", "type": "object", "properties": { "$id": { "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { "type": "string", - "description": "Token creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Authentik OAuth2 client ID.", + "x-example": "dTKOPa0000000000000000000000000000e7G8hv" }, - "resourceId": { + "clientSecret": { "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea5c168bb8:5e5ea5c168bb8" + "description": "Authentik OAuth2 client secret.", + "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" }, - "resourceType": { + "endpoint": { "type": "string", - "description": "Resource type.", - "x-example": "files" + "description": "Authentik OAuth2 endpoint domain.", + "x-example": "example.authentik.com" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "dTKOPa0000000000000000000000000000e7G8hv", + "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", + "endpoint": "example.authentik.com" + } + }, + "oAuth2Auth0": { + "description": "OAuth2Auth0", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "expire": { + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false + }, + "clientId": { "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Auth0 OAuth2 client ID.", + "x-example": "OaOkIA000000000000000000005KLSYq" }, - "secret": { + "clientSecret": { "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + "description": "Auth0 OAuth2 client secret.", + "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" }, - "accessedAt": { + "endpoint": { "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" + "description": "Auth0 OAuth2 endpoint domain.", + "x-example": "example.us.auth0.com" } }, "required": [ "$id", - "$createdAt", - "resourceId", - "resourceType", - "expire", - "secret", - "accessedAt" + "enabled", + "clientId", + "clientSecret", + "endpoint" ], "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceId": "5e5ea5c168bb8:5e5ea5c168bb8", - "resourceType": "files", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "accessedAt": "2020-10-15T06:38:00.000+00:00" + "$id": "github", + "enabled": false, + "clientId": "OaOkIA000000000000000000005KLSYq", + "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "endpoint": "example.us.auth0.com" } }, - "team": { - "description": "Team", + "oAuth2FusionAuth": { + "description": "OAuth2FusionAuth", "type": "object", "properties": { "$id": { "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { - "type": "string", - "description": "Team creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "$updatedAt": { + "clientId": { "type": "string", - "description": "Team update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "FusionAuth OAuth2 client ID.", + "x-example": "b2222c00-0000-0000-0000-000000862097" }, - "name": { + "clientSecret": { "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" + "description": "FusionAuth OAuth2 client secret.", + "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" }, - "prefs": { - "type": "object", - "description": "Team preferences as a key-value object", - "x-example": { - "theme": "pink", - "timezone": "UTC" - }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/preferences" - } - ] + "endpoint": { + "type": "string", + "description": "FusionAuth OAuth2 endpoint domain.", + "x-example": "example.fusionauth.io" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "name", - "total", - "prefs" + "enabled", + "clientId", + "clientSecret", + "endpoint" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "VIP", - "total": 7, - "prefs": { - "theme": "pink", - "timezone": "UTC" - } + "$id": "github", + "enabled": false, + "clientId": "b2222c00-0000-0000-0000-000000862097", + "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", + "endpoint": "example.fusionauth.io" } }, - "membership": { - "description": "Membership", + "oAuth2Keycloak": { + "description": "OAuth2Keycloak", "type": "object", "properties": { "$id": { "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "$createdAt": { - "type": "string", - "description": "Membership creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "$updatedAt": { + "clientId": { "type": "string", - "description": "Membership update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Keycloak OAuth2 client ID.", + "x-example": "appwrite-o0000000st-app" }, - "userId": { + "clientSecret": { "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" + "description": "Keycloak OAuth2 client secret.", + "x-example": "jdjrJd00000000000000000000HUsaZO" }, - "userName": { + "endpoint": { "type": "string", - "description": "User name. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "John Doe" + "description": "Keycloak OAuth2 endpoint domain.", + "x-example": "keycloak.example.com" }, - "userEmail": { + "realmName": { "type": "string", - "description": "User email address. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "john@appwrite.io" - }, - "userPhone": { + "description": "Keycloak OAuth2 realm name.", + "x-example": "appwrite-realm" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "endpoint", + "realmName" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "appwrite-o0000000st-app", + "clientSecret": "jdjrJd00000000000000000000HUsaZO", + "endpoint": "keycloak.example.com", + "realmName": "appwrite-realm" + } + }, + "oAuth2Oidc": { + "description": "OAuth2Oidc", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "User phone number. Hide this attribute by toggling membership privacy in the Console.", - "x-example": "+1 555 555 5555" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "teamName": { + "clientId": { "type": "string", - "description": "Team name.", - "x-example": "VIP" + "description": "OpenID Connect OAuth2 client ID.", + "x-example": "qibI2x0000000000000000000000000006L2YFoG" }, - "invited": { + "clientSecret": { "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" + "description": "OpenID Connect OAuth2 client secret.", + "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" }, - "joined": { + "wellKnownURL": { "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" + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" }, - "mfa": { - "type": "boolean", - "description": "Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console.", - "x-example": false + "tokenURL": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/token" }, - "userAccessedAt": { + "userInfoURL": { "type": "string", - "description": "Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "OpenID Connect user info endpoint URL.", + "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" }, - "roles": { + "prompt": { "type": "array", - "description": "User list of roles", + "description": "OpenID Connect prompt values controlling the authentication and consent screens.", "items": { - "type": "string" + "type": "string", + "enum": [ + "none", + "login", + "consent", + "select_account" + ] }, "x-example": [ - "owner" + "consent" ] + }, + "maxAge": { + "type": "integer", + "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds.", + "x-example": 3600, + "format": "int32", + "nullable": true } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "userId", - "userName", - "userEmail", - "userPhone", - "teamId", - "teamName", - "invited", - "joined", - "confirm", - "mfa", - "userAccessedAt", - "roles" + "enabled", + "clientId", + "clientSecret", + "wellKnownURL", + "authorizationURL", + "tokenURL", + "userInfoURL", + "prompt" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "userName": "John Doe", - "userEmail": "john@appwrite.io", - "userPhone": "+1 555 555 5555", - "teamId": "5e5ea5c16897e", - "teamName": "VIP", - "invited": "2020-10-15T06:38:00.000+00:00", - "joined": "2020-10-15T06:38:00.000+00:00", - "confirm": false, - "mfa": false, - "userAccessedAt": "2020-10-15T06:38:00.000+00:00", - "roles": [ - "owner" - ] + "$id": "github", + "enabled": false, + "clientId": "qibI2x0000000000000000000000000006L2YFoG", + "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", + "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", + "tokenURL": "https:\/\/myoauth.com\/oauth2\/token", + "userInfoURL": "https:\/\/myoauth.com\/oauth2\/userinfo", + "prompt": [ + "consent" + ], + "maxAge": 3600 } }, - "site": { - "description": "Site", + "oAuth2Okta": { + "description": "OAuth2Okta", "type": "object", "properties": { "$id": { "type": "string", - "description": "Site ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Site creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Site update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "name": { - "type": "string", - "description": "Site name.", - "x-example": "My Site" + "description": "OAuth2 provider ID.", + "x-example": "github" }, "enabled": { "type": "boolean", - "description": "Site enabled.", - "x-example": false - }, - "live": { - "type": "boolean", - "description": "Is the site 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 site to update it with the latest configuration.", - "x-example": false - }, - "logging": { - "type": "boolean", - "description": "When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.", + "description": "OAuth2 provider is active and can be used to create sessions.", "x-example": false }, - "framework": { + "clientId": { "type": "string", - "description": "Site framework.", - "x-example": "react" - }, - "deploymentRetention": { - "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, - "format": "int32" + "description": "Okta OAuth2 client ID.", + "x-example": "0oa00000000000000698" }, - "deploymentId": { + "clientSecret": { "type": "string", - "description": "Site's active deployment ID.", - "x-example": "5e5ea5c16897e" + "description": "Okta OAuth2 client secret.", + "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" }, - "deploymentCreatedAt": { + "domain": { "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Okta OAuth2 domain.", + "x-example": "trial-6400025.okta.com" }, - "deploymentScreenshotLight": { + "authorizationServerId": { "type": "string", - "description": "Screenshot of active deployment with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentScreenshotDark": { + "description": "Okta OAuth2 authorization server ID.", + "x-example": "aus000000000000000h7z" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret", + "domain", + "authorizationServerId" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "0oa00000000000000698", + "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "domain": "trial-6400025.okta.com", + "authorizationServerId": "aus000000000000000h7z" + } + }, + "oAuth2Kick": { + "description": "OAuth2Kick", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Screenshot of active deployment with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "latestDeploymentId": { - "type": "string", - "description": "Site's latest deployment ID.", - "x-example": "5e5ea5c16897e" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "latestDeploymentCreatedAt": { + "clientId": { "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Kick OAuth2 client ID.", + "x-example": "01KQ7C00000000000001MFHS32" }, - "latestDeploymentStatus": { + "clientSecret": { "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "vars": { - "type": "array", - "description": "Site variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] + "description": "Kick OAuth2 client secret.", + "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "01KQ7C00000000000001MFHS32", + "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + } + }, + "oAuth2Apple": { + "description": "OAuth2Apple", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "x-example": "apple" }, - "timeout": { - "type": "integer", - "description": "Site request timeout in seconds.", - "x-example": 300, - "format": "int32" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "installCommand": { + "serviceId": { "type": "string", - "description": "The install command used to install the site dependencies.", - "x-example": "npm install" + "description": "Apple OAuth2 service ID.", + "x-example": "ip.appwrite.app.web" }, - "buildCommand": { + "keyId": { "type": "string", - "description": "The build command used to build the site.", - "x-example": "npm run build" + "description": "Apple OAuth2 key ID.", + "x-example": "P4000000N8" }, - "startCommand": { + "teamId": { "type": "string", - "description": "Custom command to use when starting site runtime.", - "x-example": "node custom-server.mjs" + "description": "Apple OAuth2 team ID.", + "x-example": "D4000000R6" }, - "outputDirectory": { + "p8File": { "type": "string", - "description": "The directory where the site build output is located.", - "x-example": "build" - }, - "installationId": { + "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", + "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "required": [ + "$id", + "enabled", + "serviceId", + "keyId", + "teamId", + "p8File" + ], + "example": { + "$id": "apple", + "enabled": false, + "serviceId": "ip.appwrite.app.web", + "keyId": "P4000000N8", + "teamId": "D4000000R6", + "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + } + }, + "oAuth2Microsoft": { + "description": "OAuth2Microsoft", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Site VCS (Version Control System) installation id.", - "x-example": "6m40at4ejk5h2u9s1hboo" + "description": "OAuth2 provider ID.", + "x-example": "github" }, - "providerRepositoryId": { - "type": "string", - "description": "VCS (Version Control System) Repository ID", - "x-example": "appwrite" + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "x-example": false }, - "providerBranch": { + "applicationId": { "type": "string", - "description": "VCS (Version Control System) branch name", - "x-example": "main" + "description": "Microsoft OAuth2 application ID.", + "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" }, - "providerRootDirectory": { + "applicationSecret": { "type": "string", - "description": "Path to site in VCS (Version Control System) repository", - "x-example": "sites\/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 + "description": "Microsoft OAuth2 application secret.", + "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", - "items": { - "type": "string" - }, - "x-example": [ - "main", - "feat\/*" - ] + "tenant": { + "type": "string", + "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", + "x-example": "common" + } + }, + "required": [ + "$id", + "enabled", + "applicationId", + "applicationSecret", + "tenant" + ], + "example": { + "$id": "github", + "enabled": false, + "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", + "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "tenant": "common" + } + }, + "oAuth2ProviderList": { + "description": "OAuth2 Providers List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of OAuth2 providers in the given project.", + "x-example": 5, + "format": "int32" }, - "providerPaths": { + "providers": { "type": "array", - "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", + "description": "List of OAuth2 providers.", "items": { - "type": "string" + "anyOf": [ + { + "$ref": "#\/components\/schemas\/oAuth2Github" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Discord" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Figma" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dropbox" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Dailymotion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitbucket" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Bitly" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Box" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Autodesk" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Google" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoom" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Zoho" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yandex" + }, + { + "$ref": "#\/components\/schemas\/oAuth2X" + }, + { + "$ref": "#\/components\/schemas\/oAuth2WordPress" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Twitch" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Stripe" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Slack" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Podio" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Notion" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Salesforce" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Yahoo" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Linkedin" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Disqus" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Amazon" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Etsy" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Facebook" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Paypal" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Gitlab" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Appwrite" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Authentik" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Auth0" + }, + { + "$ref": "#\/components\/schemas\/oAuth2FusionAuth" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Keycloak" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Oidc" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Apple" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Okta" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Kick" + }, + { + "$ref": "#\/components\/schemas\/oAuth2Microsoft" + } + ], + "discriminator": { + "propertyName": "$id", + "mapping": { + "github": "#\/components\/schemas\/oAuth2Github", + "discord": "#\/components\/schemas\/oAuth2Discord", + "figma": "#\/components\/schemas\/oAuth2Figma", + "dropbox": "#\/components\/schemas\/oAuth2Dropbox", + "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", + "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", + "bitly": "#\/components\/schemas\/oAuth2Bitly", + "box": "#\/components\/schemas\/oAuth2Box", + "autodesk": "#\/components\/schemas\/oAuth2Autodesk", + "google": "#\/components\/schemas\/oAuth2Google", + "zoom": "#\/components\/schemas\/oAuth2Zoom", + "zoho": "#\/components\/schemas\/oAuth2Zoho", + "yandex": "#\/components\/schemas\/oAuth2Yandex", + "x": "#\/components\/schemas\/oAuth2X", + "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "twitch": "#\/components\/schemas\/oAuth2Twitch", + "stripe": "#\/components\/schemas\/oAuth2Stripe", + "spotify": "#\/components\/schemas\/oAuth2Spotify", + "slack": "#\/components\/schemas\/oAuth2Slack", + "podio": "#\/components\/schemas\/oAuth2Podio", + "notion": "#\/components\/schemas\/oAuth2Notion", + "salesforce": "#\/components\/schemas\/oAuth2Salesforce", + "yahoo": "#\/components\/schemas\/oAuth2Yahoo", + "linkedin": "#\/components\/schemas\/oAuth2Linkedin", + "disqus": "#\/components\/schemas\/oAuth2Disqus", + "amazon": "#\/components\/schemas\/oAuth2Amazon", + "etsy": "#\/components\/schemas\/oAuth2Etsy", + "facebook": "#\/components\/schemas\/oAuth2Facebook", + "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", + "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", + "paypal": "#\/components\/schemas\/oAuth2Paypal", + "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", + "gitlab": "#\/components\/schemas\/oAuth2Gitlab", + "appwrite": "#\/components\/schemas\/oAuth2Appwrite", + "authentik": "#\/components\/schemas\/oAuth2Authentik", + "auth0": "#\/components\/schemas\/oAuth2Auth0", + "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", + "keycloak": "#\/components\/schemas\/oAuth2Keycloak", + "oidc": "#\/components\/schemas\/oAuth2Oidc", + "apple": "#\/components\/schemas\/oAuth2Apple", + "okta": "#\/components\/schemas\/oAuth2Okta", + "kick": "#\/components\/schemas\/oAuth2Kick", + "microsoft": "#\/components\/schemas\/oAuth2Microsoft" + } + } }, - "x-example": [ - "src\/**", - "!docs\/**" - ] - }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" - }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for SSR executions.", - "x-example": "s-1vcpu-512mb" - }, - "buildRuntime": { - "type": "string", - "description": "Site build runtime.", - "x-example": "node-22" - }, - "adapter": { - "type": "string", - "description": "Site framework adapter.", - "x-example": "static" - }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" + "x-example": "" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "enabled", - "live", - "logging", - "framework", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "deploymentScreenshotLight", - "deploymentScreenshotDark", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "vars", - "timeout", - "installCommand", - "buildCommand", - "startCommand", - "outputDirectory", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "providerBranches", - "providerPaths", - "buildSpecification", - "runtimeSpecification", - "buildRuntime", - "adapter", - "fallbackFile" + "total", + "providers" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Site", - "enabled": false, - "live": false, - "logging": false, - "framework": "react", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "deploymentScreenshotLight": "5e5ea5c16897e", - "deploymentScreenshotDark": "5e5ea5c16897e", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "vars": [], - "timeout": 300, - "installCommand": "npm install", - "buildCommand": "npm run build", - "startCommand": "node custom-server.mjs", - "outputDirectory": "build", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "sites\/helloWorld", - "providerSilentMode": false, - "providerBranches": [ - "main", - "feat\/*" - ], - "providerPaths": [ - "src\/**", - "!docs\/**" - ], - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb", - "buildRuntime": "node-22", - "adapter": "static", - "fallbackFile": "index.html" + "total": 5, + "providers": "" } }, - "function": { - "description": "Function", + "policyPasswordDictionary": { + "description": "Policy Password Dictionary", "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" + "description": "Policy ID.", + "x-example": "password-dictionary" }, "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": "When disabled, executions will exclude logs and errors, and will be slightly faster.", - "x-example": false - }, - "runtime": { + "description": "Whether password dictionary policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policyPasswordHistory": { + "description": "Policy Password History", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Function execution and build runtime.", - "x-example": "python-3.8" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "deploymentRetention": { + "total": { "type": "integer", - "description": "How many days to keep the non-active deployments before they will be automatically deleted.", - "x-example": 7, + "description": "Password history length. A value of 0 means the policy is disabled.", + "x-example": 5, "format": "int32" - }, - "deploymentId": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "deploymentCreatedAt": { - "type": "string", - "description": "Active deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentId": { - "type": "string", - "description": "Function's latest deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "latestDeploymentCreatedAt": { - "type": "string", - "description": "Latest deployment creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "latestDeploymentStatus": { - "type": "string", - "description": "Status of latest deployment. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" - }, - "vars": { - "type": "array", - "description": "Function variables.", - "items": { - "$ref": "#\/components\/schemas\/variable" - }, - "x-example": [] - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { - "type": "string" - }, - "x-example": "account.create" - }, - "schedule": { + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 5 + } + }, + "policyPasswordStrength": { + "description": "Policy Password Strength", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Function execution schedule in CRON format.", - "x-example": "5 4 * * *" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "timeout": { + "min": { "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 300, + "description": "Minimum password length required for user passwords.", + "x-example": 12, "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": { + "uppercase": { "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 - }, - "providerBranches": { - "type": "array", - "description": "List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches.", - "items": { - "type": "string" - }, - "x-example": [ - "main", - "feat\/*" - ] + "description": "Whether passwords must include at least one uppercase letter.", + "x-example": true }, - "providerPaths": { - "type": "array", - "description": "List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes.", - "items": { - "type": "string" - }, - "x-example": [ - "src\/**", - "!docs\/**" - ] + "lowercase": { + "type": "boolean", + "description": "Whether passwords must include at least one lowercase letter.", + "x-example": true }, - "buildSpecification": { - "type": "string", - "description": "Machine specification for deployment builds.", - "x-example": "s-1vcpu-512mb" + "number": { + "type": "boolean", + "description": "Whether passwords must include at least one number.", + "x-example": true }, - "runtimeSpecification": { - "type": "string", - "description": "Machine specification for executions.", - "x-example": "s-1vcpu-512mb" + "symbols": { + "type": "boolean", + "description": "Whether passwords must include at least one symbol.", + "x-example": true } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "execute", - "name", - "enabled", - "live", - "logging", - "runtime", - "deploymentRetention", - "deploymentId", - "deploymentCreatedAt", - "latestDeploymentId", - "latestDeploymentCreatedAt", - "latestDeploymentStatus", - "scopes", - "vars", - "events", - "schedule", - "timeout", - "entrypoint", - "commands", - "version", - "installationId", - "providerRepositoryId", - "providerBranch", - "providerRootDirectory", - "providerSilentMode", - "providerBranches", - "providerPaths", - "buildSpecification", - "runtimeSpecification" + "min", + "uppercase", + "lowercase", + "number", + "symbols" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "execute": "users", - "name": "My Function", - "enabled": false, - "live": false, - "logging": false, - "runtime": "python-3.8", - "deploymentRetention": 7, - "deploymentId": "5e5ea5c16897e", - "deploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentId": "5e5ea5c16897e", - "latestDeploymentCreatedAt": "2020-10-15T06:38:00.000+00:00", - "latestDeploymentStatus": "ready", - "scopes": "users.read", - "vars": [], - "events": "account.create", - "schedule": "5 4 * * *", - "timeout": 300, - "entrypoint": "index.js", - "commands": "npm install", - "version": "v2", - "installationId": "6m40at4ejk5h2u9s1hboo", - "providerRepositoryId": "appwrite", - "providerBranch": "main", - "providerRootDirectory": "functions\/helloWorld", - "providerSilentMode": false, - "providerBranches": [ - "main", - "feat\/*" - ], - "providerPaths": [ - "src\/**", - "!docs\/**" - ], - "buildSpecification": "s-1vcpu-512mb", - "runtimeSpecification": "s-1vcpu-512mb" + "$id": "password-dictionary", + "min": 12, + "uppercase": true, + "lowercase": true, + "number": true, + "symbols": true } }, - "runtime": { - "description": "Runtime", + "policyPasswordPersonalData": { + "description": "Policy Password Personal Data", "type": "object", "properties": { "$id": { "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "key": { - "type": "string", - "description": "Parent runtime key.", - "x-example": "python" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\\/runtime-for-python:3.8" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "logo": { + "enabled": { + "type": "boolean", + "description": "Whether password personal data policy is enabled.", + "x-example": true + } + }, + "required": [ + "$id", + "enabled" + ], + "example": { + "$id": "password-dictionary", + "enabled": true + } + }, + "policySessionAlert": { + "description": "Policy Session Alert", + "type": "object", + "properties": { + "$id": { "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" + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether session alert policy is enabled.", + "x-example": true } }, "required": [ "$id", - "key", - "name", - "version", - "base", - "image", - "logo", - "supports" + "enabled" ], "example": { - "$id": "python-3.8", - "key": "python", - "name": "Python", - "version": "3.8", - "base": "python:3.8-alpine", - "image": "appwrite\\\/runtime-for-python:3.8", - "logo": "python.png", - "supports": "amd64" + "$id": "password-dictionary", + "enabled": true } }, - "framework": { - "description": "Framework", + "policySessionDuration": { + "description": "Policy Session Duration", "type": "object", "properties": { - "key": { - "type": "string", - "description": "Framework key.", - "x-example": "sveltekit" - }, - "name": { - "type": "string", - "description": "Framework Name.", - "x-example": "SvelteKit" - }, - "buildRuntime": { + "$id": { "type": "string", - "description": "Default runtime version.", - "x-example": "node-22" - }, - "runtimes": { - "type": "array", - "description": "List of supported runtime versions.", - "items": { - "type": "string" - }, - "x-example": [ - "static-1", - "node-22" - ] + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "adapters": { - "type": "array", - "description": "List of supported adapters.", - "items": { - "$ref": "#\/components\/schemas\/frameworkAdapter" - }, - "x-example": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] + "duration": { + "type": "integer", + "description": "Session duration in seconds.", + "x-example": 3600, + "format": "int32" } }, "required": [ - "key", - "name", - "buildRuntime", - "runtimes", - "adapters" + "$id", + "duration" ], "example": { - "key": "sveltekit", - "name": "SvelteKit", - "buildRuntime": "node-22", - "runtimes": [ - "static-1", - "node-22" - ], - "adapters": [ - { - "key": "static", - "buildRuntime": "node-22", - "buildCommand": "npm run build", - "installCommand": "npm install", - "outputDirectory": ".\/dist" - } - ] + "$id": "password-dictionary", + "duration": 3600 } }, - "frameworkAdapter": { - "description": "Framework Adapter", + "policySessionInvalidation": { + "description": "Policy Session Invalidation", "type": "object", "properties": { - "key": { - "type": "string", - "description": "Adapter key.", - "x-example": "static" - }, - "installCommand": { - "type": "string", - "description": "Default command to download dependencies.", - "x-example": "npm install" - }, - "buildCommand": { - "type": "string", - "description": "Default command to build site into output directory.", - "x-example": "npm run build" - }, - "outputDirectory": { + "$id": { "type": "string", - "description": "Default output directory of build.", - "x-example": ".\/dist" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "fallbackFile": { - "type": "string", - "description": "Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed.", - "x-example": "index.html" + "enabled": { + "type": "boolean", + "description": "Whether session invalidation policy is enabled.", + "x-example": true } }, "required": [ - "key", - "installCommand", - "buildCommand", - "outputDirectory", - "fallbackFile" + "$id", + "enabled" ], "example": { - "key": "static", - "installCommand": "npm install", - "buildCommand": "npm run build", - "outputDirectory": ".\/dist", - "fallbackFile": "index.html" + "$id": "password-dictionary", + "enabled": true } }, - "deployment": { - "description": "Deployment", + "policySessionLimit": { + "description": "Policy Session Limit", "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" - }, - "sourceSize": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildSize": { - "type": "integer", - "description": "The build output size in bytes.", - "x-example": 128, - "format": "int32" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "totalSize": { + "total": { "type": "integer", - "description": "The total size in bytes (source and build output).", - "x-example": 128, + "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", + "x-example": 10, "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 - }, - "screenshotLight": { - "type": "string", - "description": "Screenshot with light theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "screenshotDark": { - "type": "string", - "description": "Screenshot with dark theme preference file ID.", - "x-example": "5e5ea5c16897e" - }, - "status": { - "type": "string", - "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", \"canceled\" and \"failed\".", - "x-example": "ready", - "enum": [ - "waiting", - "processing", - "building", - "ready", - "canceled", - "failed" - ] - }, - "buildLogs": { + } + }, + "required": [ + "$id", + "total" + ], + "example": { + "$id": "password-dictionary", + "total": 10 + } + }, + "policyUserLimit": { + "description": "Policy User Limit", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "The build logs.", - "x-example": "Compiling source files..." + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "buildDuration": { + "total": { "type": "integer", - "description": "The current build time in seconds.", - "x-example": 128, + "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "x-example": 100, "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" - }, - "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" - }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, - "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", - "sourceSize", - "buildSize", - "totalSize", - "buildId", - "activate", - "screenshotLight", - "screenshotDark", - "status", - "buildLogs", - "buildDuration", - "providerRepositoryName", - "providerRepositoryOwner", - "providerRepositoryUrl", - "providerCommitHash", - "providerCommitAuthorUrl", - "providerCommitAuthor", - "providerCommitMessage", - "providerCommitUrl", - "providerBranch", - "providerBranchUrl" + "total" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "type": "vcs", - "resourceId": "5e5ea6g16897e", - "resourceType": "functions", - "entrypoint": "index.js", - "sourceSize": 128, - "buildSize": 128, - "totalSize": 128, - "buildId": "5e5ea5c16897e", - "activate": true, - "screenshotLight": "5e5ea5c16897e", - "screenshotDark": "5e5ea5c16897e", - "status": "ready", - "buildLogs": "Compiling source files...", - "buildDuration": 128, - "providerRepositoryName": "database", - "providerRepositoryOwner": "utopia", - "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerCommitHash": "7c3f25d", - "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", - "providerCommitAuthor": "Khushboo Verma", - "providerCommitMessage": "Update index.js", - "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", - "providerBranch": "0.7.x", - "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" + "$id": "password-dictionary", + "total": 100 } }, - "execution": { - "description": "Execution", + "policyMembershipPrivacy": { + "description": "Policy Membership Privacy", "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 update 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" - }, - "deploymentId": { - "type": "string", - "description": "Function's deployment ID used to create the execution.", - "x-example": "5e5ea5c16897e" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http", - "enum": [ - "http", - "schedule", - "event" - ] - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.", - "x-example": "processing", - "enum": [ - "waiting", - "processing", - "completed", - "failed", - "scheduled" - ] + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "requestMethod": { - "type": "string", - "description": "HTTP request method type.", - "x-example": "GET" + "userId": { + "type": "boolean", + "description": "Whether user ID is visible in memberships.", + "x-example": true }, - "requestPath": { - "type": "string", - "description": "HTTP request path and query.", - "x-example": "\/articles?id=5" + "userEmail": { + "type": "boolean", + "description": "Whether user email is visible in memberships.", + "x-example": true }, - "requestHeaders": { - "type": "array", - "description": "HTTP request 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" - } - ] + "userPhone": { + "type": "boolean", + "description": "Whether user phone is visible in memberships.", + "x-example": true }, - "responseStatusCode": { - "type": "integer", - "description": "HTTP response status code.", - "x-example": 200, - "format": "int32" + "userName": { + "type": "boolean", + "description": "Whether user name is visible in memberships.", + "x-example": true }, - "responseBody": { - "type": "string", - "description": "HTTP response body. This will return empty unless execution is created as synchronous.", - "x-example": "" + "userMFA": { + "type": "boolean", + "description": "Whether user MFA status is visible in memberships.", + "x-example": true }, - "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" - } - ] + "userAccessedAt": { + "type": "boolean", + "description": "Whether user last access time is visible in memberships.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "userEmail", + "userPhone", + "userName", + "userMFA", + "userAccessedAt" + ], + "example": { + "$id": "password-dictionary", + "userId": true, + "userEmail": true, + "userPhone": true, + "userName": true, + "userMFA": true, + "userAccessedAt": true + } + }, + "platformWeb": { + "description": "Platform Web", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" }, - "logs": { + "$createdAt": { "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": "" + "description": "Platform creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "errors": { + "$updatedAt": { "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": "" + "description": "Platform update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "duration": { - "type": "number", - "description": "Resource(function\/site) execution duration in seconds.", - "x-example": 0.4, - "format": "double" + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" }, - "scheduledAt": { + "type": { "type": "string", - "description": "The scheduled time for execution. If left empty, execution will be queued immediately.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": "app.example.com" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "$permissions", - "functionId", - "deploymentId", - "trigger", - "status", - "requestMethod", - "requestPath", - "requestHeaders", - "responseStatusCode", - "responseBody", - "responseHeaders", - "logs", - "errors", - "duration" + "name", + "type", + "hostname", + "key" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "$permissions": [ - "any" - ], - "functionId": "5e5ea6g16897e", - "deploymentId": "5e5ea5c16897e", - "trigger": "http", - "status": "processing", - "requestMethod": "GET", - "requestPath": "\/articles?id=5", - "requestHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "responseStatusCode": 200, - "responseBody": "", - "responseHeaders": [ - { - "Content-Type": "application\/json" - } - ], - "logs": "", - "errors": "", - "duration": 0.4, - "scheduledAt": "2020-10-15T06:38:00.000+00:00" + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" } }, - "project": { - "description": "Project", + "platformApple": { + "description": "Platform Apple", "type": "object", "properties": { "$id": { "type": "string", - "description": "Project ID.", + "description": "Platform ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Project creation date in ISO 8601 format.", + "description": "Platform 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.", + "description": "Platform 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" - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "region": { - "type": "string", - "description": "Project region", - "x-example": "fra" - }, - "devKeys": { - "type": "array", - "description": "Deprecated since 1.9.5: List of dev keys.", - "items": { - "$ref": "#\/components\/schemas\/devKey" - }, - "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" - }, - "smtpReplyToName": { - "type": "string", - "description": "SMTP reply to name", - "x-example": "Support Team" - }, - "smtpReplyToEmail": { - "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" + "description": "Platform name.", + "x-example": "My Web App" }, - "smtpUsername": { + "type": { "type": "string", - "description": "SMTP server username", - "x-example": "emailuser" + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" }, - "smtpPassword": { + "bundleIdentifier": { "type": "string", - "description": "SMTP server password. This property is write-only and always returned empty.", - "x-example": "smtp-password", - "format": "password" - }, - "smtpSecure": { + "description": "Apple bundle identifier.", + "x-example": "com.company.appname" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "type", + "bundleIdentifier" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" + } + }, + "platformAndroid": { + "description": "Platform Android", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "SMTP server secure protocol", - "x-example": "tls" - }, - "pingCount": { - "type": "integer", - "description": "Number of times the ping was received for this project.", - "x-example": 1, - "format": "int32" + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" }, - "pingedAt": { + "$createdAt": { "type": "string", - "description": "Last ping datetime in ISO 8601 format.", + "description": "Platform creation date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "labels": { - "type": "array", - "description": "Labels for the project.", - "items": { - "type": "string" - }, - "x-example": [ - "vip" - ] - }, - "status": { - "type": "string", - "description": "Project status", - "x-example": "active" - }, - "authMethods": { - "type": "array", - "description": "List of auth methods.", - "items": { - "$ref": "#\/components\/schemas\/projectAuthMethod" - }, - "x-example": {} - }, - "services": { - "type": "array", - "description": "List of services.", - "items": { - "$ref": "#\/components\/schemas\/projectService" - }, - "x-example": {} - }, - "protocols": { - "type": "array", - "description": "List of protocols.", - "items": { - "$ref": "#\/components\/schemas\/projectProtocol" - }, - "x-example": {} - }, - "blocks": { - "type": "array", - "description": "Project blocks information", - "items": { - "$ref": "#\/components\/schemas\/block" - }, - "x-example": "" - }, - "consoleAccessedAt": { + "$updatedAt": { "type": "string", - "description": "Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.", + "description": "Platform update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "billingLimits": { - "type": "object", - "description": "Billing limits reached", - "x-example": "", - "allOf": [ - { - "$ref": "#\/components\/schemas\/billingLimits" - } - ], - "nullable": true - }, - "oAuth2ServerEnabled": { - "type": "boolean", - "description": "OAuth2 server status", - "x-example": false, - "nullable": true - }, - "oAuth2ServerAuthorizationUrl": { - "type": "string", - "description": "OAuth2 server authorization URL", - "x-example": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", - "nullable": true - }, - "oAuth2ServerScopes": { - "type": "array", - "description": "OAuth2 server allowed scopes", - "items": { - "type": "string" - }, - "x-example": [ - "read", - "write" - ], - "nullable": true - }, - "oAuth2ServerAuthorizationDetailsTypes": { - "type": "array", - "description": "OAuth2 server accepted RFC 9396 authorization_details types", - "items": { - "type": "string" - }, - "x-example": [ - "calendar" - ], - "nullable": true - }, - "oAuth2ServerAccessTokenDuration": { - "type": "integer", - "description": "OAuth2 server access token duration in seconds for confidential clients", - "x-example": 3600, - "format": "int32", - "nullable": true - }, - "oAuth2ServerRefreshTokenDuration": { - "type": "integer", - "description": "OAuth2 server refresh token duration in seconds for confidential clients", - "x-example": 86400, - "format": "int32", - "nullable": true - }, - "oAuth2ServerPublicAccessTokenDuration": { - "type": "integer", - "description": "OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native)", - "x-example": 3600, - "format": "int32", - "nullable": true - }, - "oAuth2ServerPublicRefreshTokenDuration": { - "type": "integer", - "description": "OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native)", - "x-example": 2592000, - "format": "int32", - "nullable": true - }, - "oAuth2ServerConfidentialPkce": { - "type": "boolean", - "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", - "x-example": false, - "nullable": true - }, - "oAuth2ServerVerificationUrl": { + "name": { "type": "string", - "description": "URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured.", - "x-example": "https:\/\/cloud.appwrite.io\/device", - "nullable": true - }, - "oAuth2ServerUserCodeLength": { - "type": "integer", - "description": "Number of characters in the device flow user code, excluding the formatting separator.", - "x-example": 8, - "format": "int32", - "nullable": true + "description": "Platform name.", + "x-example": "My Web App" }, - "oAuth2ServerUserCodeFormat": { + "type": { "type": "string", - "description": "Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`.", - "x-example": "alphanumeric", - "nullable": true - }, - "oAuth2ServerDeviceCodeDuration": { - "type": "integer", - "description": "Lifetime in seconds of device flow device codes and user codes.", - "x-example": 600, - "format": "int32", - "nullable": true + "description": "Platform type. Possible values are: windows, apple, android, linux, web.", + "x-example": "web", + "enum": [ + "windows", + "apple", + "android", + "linux", + "web" + ], + "x-enum-name": "PlatformType" }, - "oAuth2ServerDiscoveryUrl": { + "applicationId": { "type": "string", - "description": "OAuth2 server discovery URL", - "x-example": "https:\/\/auth.example.com\/.well-known\/openid-configuration", - "nullable": true + "description": "Android application ID.", + "x-example": "com.company.appname" } }, "required": [ @@ -74412,4470 +89848,6014 @@ "$createdAt", "$updatedAt", "name", - "teamId", - "region", - "devKeys", - "smtpEnabled", - "smtpSenderName", - "smtpSenderEmail", - "smtpReplyToName", - "smtpReplyToEmail", - "smtpHost", - "smtpPort", - "smtpUsername", - "smtpPassword", - "smtpSecure", - "pingCount", - "pingedAt", - "labels", - "status", - "authMethods", - "services", - "protocols", - "blocks", - "consoleAccessedAt" + "type", + "applicationId" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "New Project", - "teamId": "1592981250", - "region": "fra", - "devKeys": {}, - "smtpEnabled": false, - "smtpSenderName": "John Appwrite", - "smtpSenderEmail": "john@appwrite.io", - "smtpReplyToName": "Support Team", - "smtpReplyToEmail": "support@appwrite.io", - "smtpHost": "mail.appwrite.io", - "smtpPort": 25, - "smtpUsername": "emailuser", - "smtpPassword": "smtp-password", - "smtpSecure": "tls", - "pingCount": 1, - "pingedAt": "2020-10-15T06:38:00.000+00:00", - "labels": [ - "vip" - ], - "status": "active", - "authMethods": {}, - "services": {}, - "protocols": {}, - "blocks": "", - "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00", - "billingLimits": "", - "oAuth2ServerEnabled": false, - "oAuth2ServerAuthorizationUrl": "https:\/\/cloud.appwrite.io\/oauth2\/.well-known\/openid-configuration", - "oAuth2ServerScopes": [ - "read", - "write" - ], - "oAuth2ServerAuthorizationDetailsTypes": [ - "calendar" - ], - "oAuth2ServerAccessTokenDuration": 3600, - "oAuth2ServerRefreshTokenDuration": 86400, - "oAuth2ServerPublicAccessTokenDuration": 3600, - "oAuth2ServerPublicRefreshTokenDuration": 2592000, - "oAuth2ServerConfidentialPkce": false, - "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", - "oAuth2ServerUserCodeLength": 8, - "oAuth2ServerUserCodeFormat": "alphanumeric", - "oAuth2ServerDeviceCodeDuration": 600, - "oAuth2ServerDiscoveryUrl": "https:\/\/auth.example.com\/.well-known\/openid-configuration" + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" } }, - "projectAuthMethod": { - "description": "ProjectAuthMethod", + "platformWindows": { + "description": "Platform Windows", "type": "object", "properties": { "$id": { "type": "string", - "description": "Auth method ID.", - "x-example": "email-password", + "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: windows, apple, android, linux, web.", + "x-example": "web", "enum": [ - "email-password", - "magic-url", - "email-otp", - "anonymous", - "invites", - "jwt", - "phone" + "windows", + "apple", + "android", + "linux", + "web" ], - "x-enum-name": "ProjectAuthMethodId" + "x-enum-name": "PlatformType" }, - "enabled": { - "type": "boolean", - "description": "Auth method status.", - "x-example": false + "packageIdentifierName": { + "type": "string", + "description": "Windows package identifier name.", + "x-example": "com.company.appname" } }, "required": [ "$id", - "enabled" + "$createdAt", + "$updatedAt", + "name", + "type", + "packageIdentifierName" ], "example": { - "$id": "email-password", - "enabled": false + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" } }, - "projectService": { - "description": "ProjectService", + "platformLinux": { + "description": "Platform Linux", "type": "object", "properties": { "$id": { "type": "string", - "description": "Service ID.", - "x-example": "sites", + "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: windows, apple, android, linux, web.", + "x-example": "web", "enum": [ - "account", - "avatars", - "databases", - "tablesdb", - "locale", - "health", - "project", - "storage", - "teams", - "users", - "vcs", - "sites", - "functions", - "proxy", - "graphql", - "migrations", - "messaging", - "advisor" + "windows", + "apple", + "android", + "linux", + "web" ], - "x-enum-name": "ProjectServiceId" + "x-enum-name": "PlatformType" }, - "enabled": { - "type": "boolean", - "description": "Service status.", - "x-example": false + "packageName": { + "type": "string", + "description": "Linux package name.", + "x-example": "com.company.appname" } }, "required": [ "$id", - "enabled" + "$createdAt", + "$updatedAt", + "name", + "type", + "packageName" ], "example": { - "$id": "sites", - "enabled": false + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" } }, - "projectProtocol": { - "description": "ProjectProtocol", + "platformList": { + "description": "Platforms List", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Protocol ID.", - "x-example": "graphql", - "enum": [ - "rest", - "graphql", - "websocket" - ], - "x-enum-name": "ProjectProtocolId" + "total": { + "type": "integer", + "description": "Total number of platforms in the given project.", + "x-example": 5, + "format": "int32" }, - "enabled": { - "type": "boolean", - "description": "Protocol status.", - "x-example": false + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/platformWeb" + }, + { + "$ref": "#\/components\/schemas\/platformApple" + }, + { + "$ref": "#\/components\/schemas\/platformAndroid" + }, + { + "$ref": "#\/components\/schemas\/platformWindows" + }, + { + "$ref": "#\/components\/schemas\/platformLinux" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "web": "#\/components\/schemas\/platformWeb", + "apple": "#\/components\/schemas\/platformApple", + "android": "#\/components\/schemas\/platformAndroid", + "windows": "#\/components\/schemas\/platformWindows", + "linux": "#\/components\/schemas\/platformLinux" + } + } + }, + "x-example": "" } }, "required": [ - "$id", - "enabled" + "total", + "platforms" ], "example": { - "$id": "graphql", - "enabled": false + "total": 5, + "platforms": "" } }, - "webhook": { - "description": "Webhook", + "variable": { + "description": "Variable", "type": "object", "properties": { "$id": { "type": "string", - "description": "Webhook ID.", + "description": "Variable ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Webhook creation date in ISO 8601 format.", + "description": "Variable 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.", + "description": "Variable creation 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": [ - "databases.tables.update", - "databases.collections.update" - ] - }, - "tls": { - "type": "boolean", - "description": "Indicates if SSL \/ TLS certificate verification is enabled.", - "x-example": true - }, - "authUsername": { + "key": { "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" + "description": "Variable key.", + "x-example": "API_KEY" }, - "authPassword": { + "value": { "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "webhook-password", - "format": "password" + "description": "Variable value.", + "x-example": "myPa$$word1" }, "secret": { - "type": "string", - "description": "Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation.", - "x-example": "ad3d581ca230e2b7059c545e5a" - }, - "enabled": { "type": "boolean", - "description": "Indicates if this webhook is enabled.", - "x-example": true + "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", + "x-example": false }, - "logs": { + "resourceType": { "type": "string", - "description": "Webhook error logs from the most recent failure.", - "x-example": "Failed to connect to remote server." + "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", + "x-example": "function" }, - "attempts": { - "type": "integer", - "description": "Number of consecutive failed webhook attempts.", - "x-example": 10, - "format": "int32" + "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", - "name", - "url", - "events", - "tls", - "authUsername", - "authPassword", + "key", + "value", "secret", - "enabled", - "logs", - "attempts" + "resourceType", + "resourceId" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Webhook", - "url": "https:\/\/example.com\/webhook", - "events": [ - "databases.tables.update", - "databases.collections.update" - ], - "tls": true, - "authUsername": "username", - "authPassword": "webhook-password", - "secret": "ad3d581ca230e2b7059c545e5a", - "enabled": true, - "logs": "Failed to connect to remote server.", - "attempts": 10 + "key": "API_KEY", + "value": "myPa$$word1", + "secret": false, + "resourceType": "function", + "resourceId": "myAwesomeFunction" } }, - "key": { - "description": "Key", + "country": { + "description": "Country", "type": "object", "properties": { - "$id": { + "name": { "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" + "description": "Country name.", + "x-example": "United States" }, - "$createdAt": { + "code": { "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "United States", + "code": "US" + } + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Continent name.", + "x-example": "Europe" }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": [ + "name", + "code" + ], + "example": { + "name": "Europe", + "code": "EU" + } + }, + "language": { + "description": "Language", + "type": "object", + "properties": { "name": { "type": "string", - "description": "Key name.", - "x-example": "My API Key" + "description": "Language name.", + "x-example": "Italian" }, - "expire": { + "code": { "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": [ + "name", + "code", + "nativeName" + ], + "example": { + "name": "Italian", + "code": "it", + "nativeName": "Italiano" + } + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" }, - "secret": { + "name": { "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + "description": "Currency name.", + "x-example": "US dollar" }, - "accessedAt": { + "symbolNative": { "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" + "description": "Currency native symbol.", + "x-example": "$" }, - "sdks": { - "type": "array", - "description": "List of SDK user agents that used this key.", - "items": { - "type": "string" - }, - "x-example": "appwrite:flutter" + "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": [ - "$id", - "$createdAt", - "$updatedAt", + "symbol", "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" + "symbol": "$", + "name": "US dollar", + "symbolNative": "$", + "decimalDigits": 2, + "rounding": 0, + "code": "USD", + "namePlural": "US dollars" } }, - "ephemeralKey": { - "description": "Ephemeral Key", + "phone": { + "description": "Phone", "type": "object", "properties": { - "$id": { + "code": { "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" + "description": "Phone code.", + "x-example": "+1" }, - "$createdAt": { + "countryCode": { "type": "string", - "description": "Key creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" }, - "$updatedAt": { + "countryName": { "type": "string", - "description": "Key update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "code", + "countryCode", + "countryName" + ], + "example": { + "code": "+1", + "countryCode": "US", + "countryName": "United States" + } + }, + "headers": { + "description": "Headers", + "type": "object", + "properties": { "name": { "type": "string", - "description": "Key name.", - "x-example": "My API Key" + "description": "Header name.", + "x-example": "Content-Type" }, - "expire": { + "value": { "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Header value.", + "x-example": "application\/json" + } + }, + "required": [ + "name", + "value" + ], + "example": { + "name": "Content-Type", + "value": "application\/json" + } + }, + "specification": { + "description": "Specification", + "type": "object", + "properties": { + "memory": { + "type": "integer", + "description": "Memory size in MB.", + "x-example": 512, + "format": "int32" }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { - "type": "string" - }, - "x-example": "users.read" + "cpus": { + "type": "number", + "description": "Number of CPUs.", + "x-example": 1, + "format": "double" }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + "enabled": { + "type": "boolean", + "description": "Is size enabled.", + "x-example": true }, - "accessedAt": { + "slug": { "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" + "description": "Size slug.", + "x-example": "s-1vcpu-512mb" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "expire", - "scopes", - "secret", - "accessedAt", - "sdks" + "memory", + "cpus", + "enabled", + "slug" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "scopes": "users.read", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" + "memory": 512, + "cpus": 1, + "enabled": true, + "slug": "s-1vcpu-512mb" } }, - "devKey": { - "description": "DevKey", + "proxyRule": { + "description": "Rule", "type": "object", "properties": { "$id": { "type": "string", - "description": "Key ID.", + "description": "Rule ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Key creation date in ISO 8601 format.", + "description": "Rule 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.", + "description": "Rule update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { + "domain": { "type": "string", - "description": "Key name.", - "x-example": "Dev API Key" + "description": "Domain name.", + "x-example": "appwrite.company.com" }, - "expire": { + "type": { "type": "string", - "description": "Key expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", + "x-example": "deployment" }, - "secret": { + "trigger": { "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", + "x-example": "manual" }, - "accessedAt": { + "redirectUrl": { "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" + "description": "URL to redirect to. Used if type is \"redirect\"", + "x-example": "https:\/\/appwrite.io\/docs" }, - "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", - "secret", - "accessedAt", - "sdks" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Dev API Key", - "expire": "2020-10-15T06:38:00.000+00:00", - "secret": "919c2d18fb5d4...a2ae413da83346ad2", - "accessedAt": "2020-10-15T06:38:00.000+00:00", - "sdks": "appwrite:flutter" - } - }, - "mockNumber": { - "description": "Mock Number", - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS.", - "x-example": "+1612842323" + "redirectStatusCode": { + "type": "integer", + "description": "Status code to apply during redirect. Used if type is \"redirect\"", + "x-example": 301, + "format": "int32" }, - "otp": { + "deploymentId": { "type": "string", - "description": "Mock OTP for the number. ", - "x-example": "123456" + "description": "ID of deployment. Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" }, - "$createdAt": { + "deploymentResourceType": { "type": "string", - "description": "Attribute creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "x-example": "function", + "enum": [ + "function", + "site" + ], + "nullable": true }, - "$updatedAt": { + "deploymentResourceId": { "type": "string", - "description": "Attribute update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "number", - "otp", - "$createdAt", - "$updatedAt" - ], - "example": { - "number": "+1612842323", - "otp": "123456", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "oAuth2Github": { - "description": "OAuth2GitHub", - "type": "object", - "properties": { - "$id": { + "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", + "x-example": "n3u9feiwmf" + }, + "deploymentVcsProviderBranch": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", + "x-example": "main" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "status": { + "type": "string", + "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", + "x-example": "verified", + "enum": [ + "unverified", + "verifying", + "verified" + ] }, - "clientId": { + "logs": { "type": "string", - "description": "GitHub OAuth2 client ID. For GitHub Apps, use the \"App ID\" when both an App ID and client ID are available.", - "x-example": "e4d87900000000540733" + "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", + "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." }, - "clientSecret": { + "renewAt": { "type": "string", - "description": "GitHub OAuth2 client secret.", - "x-example": "5e07c00000000000000000000000000000198bcc" + "description": "Certificate auto-renewal date in ISO 8601 format.", + "x-example": "datetime" } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "domain", + "type", + "trigger", + "redirectUrl", + "redirectStatusCode", + "deploymentId", + "deploymentResourceId", + "deploymentVcsProviderBranch", + "status", + "logs", + "renewAt" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "domain": "appwrite.company.com", + "type": "deployment", + "trigger": "manual", + "redirectUrl": "https:\/\/appwrite.io\/docs", + "redirectStatusCode": 301, + "deploymentId": "n3u9feiwmf", + "deploymentResourceType": "function", + "deploymentResourceId": "n3u9feiwmf", + "deploymentVcsProviderBranch": "main", + "status": "verified", + "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", + "renewAt": "datetime" } }, - "oAuth2Discord": { - "description": "OAuth2Discord", + "emailTemplate": { + "description": "EmailTemplate", "type": "object", "properties": { - "$id": { + "templateId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Template type", + "x-example": "verification" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "locale": { + "type": "string", + "description": "Template locale", + "x-example": "en_us" }, - "clientId": { + "message": { "type": "string", - "description": "Discord OAuth2 client ID.", - "x-example": "950722000000343754" + "description": "Template message", + "x-example": "Click on the link to verify your account." }, - "clientSecret": { + "senderName": { "type": "string", - "description": "Discord OAuth2 client secret.", - "x-example": "YmPXnM000000000000000000002zFg5D" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" - } - }, - "oAuth2Figma": { - "description": "OAuth2Figma", - "type": "object", - "properties": { - "$id": { + "description": "Name of the sender", + "x-example": "My User" + }, + "senderEmail": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Email of the sender", + "x-example": "mail@appwrite.io" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "replyToEmail": { + "type": "string", + "description": "Reply to email address", + "x-example": "emails@appwrite.io" }, - "clientId": { + "replyToName": { "type": "string", - "description": "Figma OAuth2 client ID.", - "x-example": "byay5H0000000000VtiI40" + "description": "Reply to name", + "x-example": "Support Team" }, - "clientSecret": { + "subject": { "type": "string", - "description": "Figma OAuth2 client secret.", - "x-example": "yEpOYn0000000000000000004iIsU5" + "description": "Email subject", + "x-example": "Please verify your email address" } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" + "templateId", + "locale", + "message", + "senderName", + "senderEmail", + "replyToEmail", + "replyToName", + "subject" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "byay5H0000000000VtiI40", - "clientSecret": "yEpOYn0000000000000000004iIsU5" + "templateId": "verification", + "locale": "en_us", + "message": "Click on the link to verify your account.", + "senderName": "My User", + "senderEmail": "mail@appwrite.io", + "replyToEmail": "emails@appwrite.io", + "replyToName": "Support Team", + "subject": "Please verify your email address" } }, - "oAuth2Dropbox": { - "description": "OAuth2Dropbox", + "mfaChallenge": { + "description": "MFA Challenge", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Token ID.", + "x-example": "bb8ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Token creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appKey": { + "userId": { "type": "string", - "description": "Dropbox OAuth2 app key.", - "x-example": "jl000000000009t" + "description": "User ID.", + "x-example": "5e5ea5c168bb8" }, - "appSecret": { + "expire": { "type": "string", - "description": "Dropbox OAuth2 app secret.", - "x-example": "g200000000000vw" + "description": "Token expiration date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", - "enabled", - "appKey", - "appSecret" + "$createdAt", + "userId", + "expire" ], "example": { - "$id": "github", - "enabled": false, - "appKey": "jl000000000009t", - "appSecret": "g200000000000vw" + "$id": "bb8ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c168bb8", + "expire": "2020-10-15T06:38:00.000+00:00" } }, - "oAuth2Dailymotion": { - "description": "OAuth2Dailymotion", + "mfaRecoveryCodes": { + "description": "MFA Recovery Codes", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "apiKey": { - "type": "string", - "description": "Dailymotion OAuth2 API key.", - "x-example": "07a9000000000000067f" - }, - "apiSecret": { - "type": "string", - "description": "Dailymotion OAuth2 API secret.", - "x-example": "a399a90000000000000000000000000000d90639" + "recoveryCodes": { + "type": "array", + "description": "Recovery codes.", + "items": { + "type": "string" + }, + "x-example": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] } }, "required": [ - "$id", - "enabled", - "apiKey", - "apiSecret" + "recoveryCodes" ], "example": { - "$id": "github", - "enabled": false, - "apiKey": "07a9000000000000067f", - "apiSecret": "a399a90000000000000000000000000000d90639" + "recoveryCodes": [ + "a3kf0-s0cl2", + "s0co1-as98s" + ] } }, - "oAuth2Bitbucket": { - "description": "OAuth2Bitbucket", + "mfaType": { + "description": "MFAType", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "key": { + "secret": { "type": "string", - "description": "Bitbucket OAuth2 key.", - "x-example": "Knt70000000000ByRc" + "description": "Secret token used for TOTP factor.", + "x-example": "[SHARED_SECRET]" }, - "secret": { + "uri": { "type": "string", - "description": "Bitbucket OAuth2 secret.", - "x-example": "NMfLZJ00000000000000000000TLQdDx" + "description": "URI for authenticator apps.", + "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" } }, "required": [ - "$id", - "enabled", - "key", - "secret" + "secret", + "uri" ], "example": { - "$id": "github", - "enabled": false, - "key": "Knt70000000000ByRc", - "secret": "NMfLZJ00000000000000000000TLQdDx" + "secret": "[SHARED_SECRET]", + "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" } }, - "oAuth2Bitly": { - "description": "OAuth2Bitly", + "mfaFactors": { + "description": "MFAFactors", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "totp": { + "type": "boolean", + "description": "Can TOTP be used for MFA challenge for this account.", + "x-example": true }, - "enabled": { + "phone": { "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Can phone (SMS) be used for MFA challenge for this account.", + "x-example": true }, - "clientId": { - "type": "string", - "description": "Bitly OAuth2 client ID.", - "x-example": "d95151000000000000000000000000000067af9b" + "email": { + "type": "boolean", + "description": "Can email be used for MFA challenge for this account.", + "x-example": true }, - "clientSecret": { - "type": "string", - "description": "Bitly OAuth2 client secret.", - "x-example": "a13e250000000000000000000000000000d73095" + "recoveryCode": { + "type": "boolean", + "description": "Can recovery code be used for MFA challenge for this account.", + "x-example": true } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" + "totp", + "phone", + "email", + "recoveryCode" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "d95151000000000000000000000000000067af9b", - "clientSecret": "a13e250000000000000000000000000000d73095" + "totp": true, + "phone": true, + "email": true, + "recoveryCode": true } }, - "oAuth2Box": { - "description": "OAuth2Box", + "provider": { + "description": "Provider", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Provider ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Provider creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Provider update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "The name for the provider instance.", + "x-example": "Mailgun" + }, + "provider": { + "type": "string", + "description": "The name of the provider service.", + "x-example": "mailgun" }, "enabled": { "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Is provider enabled?", + "x-example": true }, - "clientId": { + "type": { "type": "string", - "description": "Box OAuth2 client ID.", - "x-example": "deglcs00000000000000000000x2og6y" + "description": "Type of provider.", + "x-example": "sms" }, - "clientSecret": { - "type": "string", - "description": "Box OAuth2 client secret.", - "x-example": "OKM1f100000000000000000000eshEif" + "credentials": { + "type": "object", + "additionalProperties": true, + "description": "Provider credentials.", + "x-example": { + "key": "123456789" + } + }, + "options": { + "type": "object", + "additionalProperties": true, + "description": "Provider options.", + "x-example": { + "from": "sender-email@mydomain" + } } }, "required": [ "$id", + "$createdAt", + "$updatedAt", + "name", + "provider", "enabled", - "clientId", - "clientSecret" + "type", + "credentials" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "deglcs00000000000000000000x2og6y", - "clientSecret": "OKM1f100000000000000000000eshEif" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Mailgun", + "provider": "mailgun", + "enabled": true, + "type": "sms", + "credentials": { + "key": "123456789" + }, + "options": { + "from": "sender-email@mydomain" + } } }, - "oAuth2Autodesk": { - "description": "OAuth2Autodesk", + "message": { + "description": "Message", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Message ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Message creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "$updatedAt": { "type": "string", - "description": "Autodesk OAuth2 client ID.", - "x-example": "5zw90v00000000000000000000kVYXN7" + "description": "Message update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientSecret": { + "providerType": { "type": "string", - "description": "Autodesk OAuth2 client secret.", - "x-example": "7I000000000000MW" + "description": "Message provider type.", + "x-example": "email" + }, + "topics": { + "type": "array", + "description": "Topic IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "users": { + "type": "array", + "description": "User IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "targets": { + "type": "array", + "description": "Target IDs set as recipients.", + "items": { + "type": "string" + }, + "x-example": [ + "5e5ea5c16897e" + ] + }, + "scheduledAt": { + "type": "string", + "description": "The scheduled time for message.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveredAt": { + "type": "string", + "description": "The time when the message was delivered.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "deliveryErrors": { + "type": "array", + "description": "Delivery errors if any.", + "items": { + "type": "string" + }, + "x-example": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "nullable": true + }, + "deliveredTotal": { + "type": "integer", + "description": "Number of recipients the message was delivered to.", + "x-example": 1, + "format": "int32" + }, + "data": { + "type": "object", + "additionalProperties": true, + "description": "Data of the message.", + "x-example": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + } + }, + "status": { + "type": "string", + "description": "Status of delivery.", + "x-example": "processing", + "enum": [ + "draft", + "processing", + "scheduled", + "sent", + "failed" + ] } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "providerType", + "topics", + "users", + "targets", + "deliveredTotal", + "data", + "status" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "5zw90v00000000000000000000kVYXN7", - "clientSecret": "7I000000000000MW" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "topics": [ + "5e5ea5c16897e" + ], + "users": [ + "5e5ea5c16897e" + ], + "targets": [ + "5e5ea5c16897e" + ], + "scheduledAt": "2020-10-15T06:38:00.000+00:00", + "deliveredAt": "2020-10-15T06:38:00.000+00:00", + "deliveryErrors": [ + "Failed to send message to target 5e5ea5c16897e: Credentials not valid." + ], + "deliveredTotal": 1, + "data": { + "subject": "Welcome to Appwrite", + "content": "Hi there, welcome to Appwrite family." + }, + "status": "processing" } }, - "oAuth2Google": { - "description": "OAuth2Google", + "topic": { + "description": "Topic", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Topic ID.", + "x-example": "259125845563242502" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Topic creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "$updatedAt": { "type": "string", - "description": "Google OAuth2 client ID.", - "x-example": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com" + "description": "Topic update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientSecret": { + "name": { "type": "string", - "description": "Google OAuth2 client secret.", - "x-example": "GOCSPX-2k8gsR0000000000000000VNahJj" + "description": "The name of the topic.", + "x-example": "events" }, - "prompt": { + "emailTotal": { + "type": "integer", + "description": "Total count of email subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "smsTotal": { + "type": "integer", + "description": "Total count of SMS subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "pushTotal": { + "type": "integer", + "description": "Total count of push subscribers subscribed to the topic.", + "x-example": 100, + "format": "int32" + }, + "subscribe": { "type": "array", - "description": "Google OAuth2 prompt values.", + "description": "Subscribe permissions.", "items": { - "type": "string", - "enum": [ - "none", - "consent", - "select_account" - ] + "type": "string" }, - "x-example": [ - "consent" - ] + "x-example": "users" } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret", - "prompt" + "$createdAt", + "$updatedAt", + "name", + "emailTotal", + "smsTotal", + "pushTotal", + "subscribe" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com", - "clientSecret": "GOCSPX-2k8gsR0000000000000000VNahJj", - "prompt": [ - "consent" - ] + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "events", + "emailTotal": 100, + "smsTotal": 100, + "pushTotal": 100, + "subscribe": "users" } }, - "oAuth2Zoom": { - "description": "OAuth2Zoom", + "transaction": { + "description": "Transaction", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Transaction ID.", + "x-example": "259125845563242502" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Transaction creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "$updatedAt": { "type": "string", - "description": "Zoom OAuth2 client ID.", - "x-example": "QMAC00000000000000w0AQ" + "description": "Transaction update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientSecret": { + "status": { "type": "string", - "description": "Zoom OAuth2 client secret.", - "x-example": "GAWsG4000000000000000000007U01ON" + "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", + "x-example": "pending" + }, + "operations": { + "type": "integer", + "description": "Number of operations in the transaction.", + "x-example": 5, + "format": "int32" + }, + "expiresAt": { + "type": "string", + "description": "Expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "status", + "operations", + "expiresAt" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "QMAC00000000000000w0AQ", - "clientSecret": "GAWsG4000000000000000000007U01ON" + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "status": "pending", + "operations": 5, + "expiresAt": "2020-10-15T06:38:00.000+00:00" } }, - "oAuth2Zoho": { - "description": "OAuth2Zoho", + "subscriber": { + "description": "Subscriber", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Subscriber ID.", + "x-example": "259125845563242502" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Subscriber creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "$updatedAt": { "type": "string", - "description": "Zoho OAuth2 client ID.", - "x-example": "1000.83C178000000000000000000RPNX0B" + "description": "Subscriber update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientSecret": { + "targetId": { "type": "string", - "description": "Zoho OAuth2 client secret.", - "x-example": "fb5cac000000000000000000000000000000a68f6e" + "description": "Target ID.", + "x-example": "259125845563242502" + }, + "target": { + "type": "object", + "description": "Target.", + "x-example": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/target" + } + ] + }, + "userId": { + "type": "string", + "description": "Topic ID.", + "x-example": "5e5ea5c16897e" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "Aegon Targaryen" + }, + "topicId": { + "type": "string", + "description": "Topic ID.", + "x-example": "259125845563242502" + }, + "providerType": { + "type": "string", + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "targetId", + "target", + "userId", + "userName", + "topicId", + "providerType" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "targetId": "259125845563242502", + "target": { + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "providerType": "email", + "providerId": "259125845563242502", + "name": "ageon-app-email", + "identifier": "random-mail@email.org", + "userId": "5e5ea5c16897e" + }, + "userId": "5e5ea5c16897e", + "userName": "Aegon Targaryen", + "topicId": "259125845563242502", + "providerType": "email" } }, - "oAuth2Yandex": { - "description": "OAuth2Yandex", + "target": { + "description": "Target", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Target ID.", + "x-example": "259125845563242502" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Target creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Target update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Target Name.", + "x-example": "Apple iPhone 12" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "259125845563242502" + }, + "providerId": { + "type": "string", + "description": "Provider ID.", + "x-example": "259125845563242502", + "nullable": true }, - "clientId": { + "providerType": { "type": "string", - "description": "Yandex OAuth2 client ID.", - "x-example": "6a8a6a0000000000000000000091483c" + "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", + "x-example": "email" }, - "clientSecret": { + "identifier": { "type": "string", - "description": "Yandex OAuth2 client secret.", - "x-example": "bbf98500000000000000000000c75a63" + "description": "The target identifier.", + "x-example": "token" + }, + "expired": { + "type": "boolean", + "description": "Is the target expired.", + "x-example": false } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "name", + "userId", + "providerType", + "identifier", + "expired" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "6a8a6a0000000000000000000091483c", - "clientSecret": "bbf98500000000000000000000c75a63" + "$id": "259125845563242502", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Apple iPhone 12", + "userId": "259125845563242502", + "providerId": "259125845563242502", + "providerType": "email", + "identifier": "token", + "expired": false } }, - "oAuth2X": { - "description": "OAuth2X", + "insight": { + "description": "Insight", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Insight ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Insight creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "customerKey": { + "$updatedAt": { "type": "string", - "description": "X OAuth2 customer key.", - "x-example": "slzZV0000000000000NFLaWT" + "description": "Insight update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "secretKey": { + "reportId": { "type": "string", - "description": "X OAuth2 secret key.", - "x-example": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "slzZV0000000000000NFLaWT", - "secretKey": "tkEPkp00000000000000000000000000000000000000FTxbI9" - } - }, - "oAuth2WordPress": { - "description": "OAuth2WordPress", - "type": "object", - "properties": { - "$id": { + "description": "Parent report ID. Insights always belong to a report.", + "x-example": "5e5ea5c16897e" + }, + "type": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).", + "x-example": "tablesDBIndex" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "severity": { + "type": "string", + "description": "Insight severity. One of info, warning, critical.", + "x-example": "warning" }, - "clientId": { + "status": { "type": "string", - "description": "WordPress OAuth2 client ID.", - "x-example": "130005" + "description": "Insight status. One of active, dismissed.", + "x-example": "active" }, - "clientSecret": { + "resourceType": { "type": "string", - "description": "WordPress OAuth2 client secret.", - "x-example": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "130005", - "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" - } - }, - "oAuth2Twitch": { - "description": "OAuth2Twitch", - "type": "object", - "properties": { - "$id": { + "description": "Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.", + "x-example": "databases" + }, + "resourceId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "ID of the resource the insight is about.", + "x-example": "main" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "parentResourceType": { + "type": "string", + "description": "Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table \u2192 resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.", + "x-example": "tables" }, - "clientId": { + "parentResourceId": { "type": "string", - "description": "Twitch OAuth2 client ID.", - "x-example": "vvi0in000000000000000000ikmt9p" + "description": "ID of the parent resource. Empty when the resource has no parent.", + "x-example": "orders" }, - "clientSecret": { + "title": { "type": "string", - "description": "Twitch OAuth2 client secret.", - "x-example": "pmapue000000000000000000zylw3v" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "vvi0in000000000000000000ikmt9p", - "clientSecret": "pmapue000000000000000000zylw3v" - } - }, - "oAuth2Stripe": { - "description": "OAuth2Stripe", - "type": "object", - "properties": { - "$id": { + "description": "Insight title.", + "x-example": "Missing index on collection orders" + }, + "summary": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Short markdown summary describing the insight.", + "x-example": "Queries against `orders.status` are scanning the full collection." }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "ctas": { + "type": "array", + "description": "List of call-to-action buttons attached to this insight.", + "items": { + "$ref": "#\/components\/schemas\/insightCTA" + }, + "x-example": [] }, - "clientId": { + "analyzedAt": { "type": "string", - "description": "Stripe OAuth2 client ID.", - "x-example": "ca_UKibXX0000000000000000000006byvR" + "description": "Time the insight was analyzed in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "apiSecretKey": { + "dismissedAt": { "type": "string", - "description": "Stripe OAuth2 API secret key.", - "x-example": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + "description": "Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "dismissedBy": { + "type": "string", + "description": "User ID that dismissed the insight. Empty when not dismissed.", + "x-example": "5e5ea5c16897e", + "nullable": true } }, "required": [ "$id", - "enabled", - "clientId", - "apiSecretKey" + "$createdAt", + "$updatedAt", + "reportId", + "type", + "severity", + "status", + "resourceType", + "resourceId", + "parentResourceType", + "parentResourceId", + "title", + "summary", + "ctas" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "ca_UKibXX0000000000000000000006byvR", - "apiSecretKey": "sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "reportId": "5e5ea5c16897e", + "type": "tablesDBIndex", + "severity": "warning", + "status": "active", + "resourceType": "databases", + "resourceId": "main", + "parentResourceType": "tables", + "parentResourceId": "orders", + "title": "Missing index on collection orders", + "summary": "Queries against `orders.status` are scanning the full collection.", + "ctas": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedAt": "2020-10-15T06:38:00.000+00:00", + "dismissedBy": "5e5ea5c16897e" } }, - "oAuth2Spotify": { - "description": "OAuth2Spotify", + "insightCTA": { + "description": "InsightCTA", "type": "object", "properties": { - "$id": { + "label": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Human-readable label for the CTA, used in UI.", + "x-example": "Create missing index" }, - "clientId": { + "service": { "type": "string", - "description": "Spotify OAuth2 client ID.", - "x-example": "6ec271000000000000000000009beace" + "description": "Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource \u2014 for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.", + "x-example": "tablesDB" }, - "clientSecret": { + "method": { "type": "string", - "description": "Spotify OAuth2 client secret.", - "x-example": "db068a000000000000000000008b5b9f" + "description": "Public API method on the chosen service the client should invoke when this CTA is triggered.", + "x-example": "createIndex" + }, + "params": { + "type": "object", + "additionalProperties": true, + "description": "Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId\/tableId\/columns for tablesDB, databaseId\/collectionId\/attributes for the legacy Databases API).", + "x-example": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" + "label", + "service", + "method", + "params" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "6ec271000000000000000000009beace", - "clientSecret": "db068a000000000000000000008b5b9f" + "label": "Create missing index", + "service": "tablesDB", + "method": "createIndex", + "params": { + "databaseId": "main", + "tableId": "orders", + "key": "_idx_status", + "type": "key", + "columns": [ + "status" + ] + } } }, - "oAuth2Slack": { - "description": "OAuth2Slack", + "report": { + "description": "Report", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Report ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Report creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "$updatedAt": { "type": "string", - "description": "Slack OAuth2 client ID.", - "x-example": "23000000089.15000000000023" + "description": "Report update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientSecret": { + "appId": { "type": "string", - "description": "Slack OAuth2 client secret.", - "x-example": "81656000000000000000000000f3d2fd" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "23000000089.15000000000023", - "clientSecret": "81656000000000000000000000f3d2fd" - } - }, - "oAuth2Podio": { - "description": "OAuth2Podio", - "type": "object", - "properties": { - "$id": { + "description": "ID of the third-party app that submitted the report.", + "x-example": "5e5ea5c16897e" + }, + "type": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.", + "x-example": "lighthouse" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "title": { + "type": "string", + "description": "Short, human-readable title for the report.", + "x-example": "Lighthouse audit for https:\/\/appwrite.io\/" }, - "clientId": { + "summary": { "type": "string", - "description": "Podio OAuth2 client ID.", - "x-example": "appwrite-oauth-test-app" + "description": "Markdown summary describing the report.", + "x-example": "Performance score 78. 4 opportunities found." }, - "clientSecret": { + "targetType": { "type": "string", - "description": "Podio OAuth2 client secret.", - "x-example": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + "description": "Plural noun describing what the report analyzes, e.g. databases, sites, urls.", + "x-example": "urls" + }, + "target": { + "type": "string", + "description": "Free-form target identifier (URL for lighthouse, resource ID for db).", + "x-example": "https:\/\/appwrite.io\/" + }, + "categories": { + "type": "array", + "description": "Categories covered by the report, e.g. performance, accessibility.", + "items": { + "type": "string" + }, + "x-example": [ + "performance", + "accessibility" + ] + }, + "insights": { + "type": "array", + "description": "Insights nested under this report.", + "items": { + "$ref": "#\/components\/schemas\/insight" + }, + "x-example": [] + }, + "analyzedAt": { + "type": "string", + "description": "Time the report was analyzed in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret" + "$createdAt", + "$updatedAt", + "appId", + "type", + "title", + "summary", + "targetType", + "target", + "categories", + "insights" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-oauth-test-app", - "clientSecret": "Rn247T0000000000000000000000000000000000000000000000000000W2zWTN" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "type": "lighthouse", + "title": "Lighthouse audit for https:\/\/appwrite.io\/", + "summary": "Performance score 78. 4 opportunities found.", + "targetType": "urls", + "target": "https:\/\/appwrite.io\/", + "categories": [ + "performance", + "accessibility" + ], + "insights": [], + "analyzedAt": "2020-10-15T06:38:00.000+00:00" } }, - "oAuth2Notion": { - "description": "OAuth2Notion", + "activityEvent": { + "description": "ActivityEvent", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Event ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "actorType": { + "type": "string", + "description": "Actor type.", + "x-example": "user" + }, + "actorId": { + "type": "string", + "description": "Actor ID.", + "x-example": "610fc2f985ee0" + }, + "actorEmail": { + "type": "string", + "description": "Actor Email.", + "x-example": "john@appwrite.io" + }, + "actorName": { + "type": "string", + "description": "Actor Name.", + "x-example": "John Doe" + }, + "resourceParent": { + "type": "string", + "description": "Resource parent.", + "x-example": "database\/ID" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "collection" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "610fc2f985ee0" + }, + "resource": { + "type": "string", + "description": "Resource.", + "x-example": "collections\/610fc2f985ee0" + }, + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" }, - "oauthClientId": { + "userAgent": { "type": "string", - "description": "Notion OAuth2 client ID.", - "x-example": "341d8700-0000-0000-0000-000000446ee3" + "description": "User agent.", + "x-example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36" }, - "oauthClientSecret": { + "ip": { "type": "string", - "description": "Notion OAuth2 client secret.", - "x-example": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "required": [ - "$id", - "enabled", - "oauthClientId", - "oauthClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "oauthClientId": "341d8700-0000-0000-0000-000000446ee3", - "oauthClientSecret": "secret_dLUr4b000000000000000000000000000000lFHAa9" - } - }, - "oAuth2Salesforce": { - "description": "OAuth2Salesforce", - "type": "object", - "properties": { - "$id": { + "description": "IP address.", + "x-example": "127.0.0.1" + }, + "mode": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "API mode when event triggered.", + "x-example": "admin" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "country": { + "type": "string", + "description": "Location.", + "x-example": "US" }, - "customerKey": { + "continentCode": { "type": "string", - "description": "Salesforce OAuth2 consumer key.", - "x-example": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq" + "description": "Continent code.", + "x-example": "NA" }, - "customerSecret": { + "city": { "type": "string", - "description": "Salesforce OAuth2 consumer secret.", - "x-example": "3w000000000000e2" - } - }, - "required": [ - "$id", - "enabled", - "customerKey", - "customerSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" - } - }, - "oAuth2Yahoo": { - "description": "OAuth2Yahoo", - "type": "object", - "properties": { - "$id": { + "description": "City name.", + "x-example": "Mountain View" + }, + "subdivisions": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Region\/state chain.", + "x-example": "California" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "isp": { + "type": "string", + "description": "Internet service provider.", + "x-example": "Google" }, - "clientId": { + "autonomousSystemNumber": { "type": "string", - "description": "Yahoo OAuth2 client ID.", - "x-example": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm" + "description": "Autonomous System Number (ASN).", + "x-example": "15169" }, - "clientSecret": { + "autonomousSystemOrganization": { "type": "string", - "description": "Yahoo OAuth2 client secret.", - "x-example": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm", - "clientSecret": "cf978f0000000000000000000000000000c5e2e9" - } - }, - "oAuth2Linkedin": { - "description": "OAuth2Linkedin", - "type": "object", - "properties": { - "$id": { + "description": "Organization that owns the ASN.", + "x-example": "GOOGLE" + }, + "connectionType": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Connection type (e.g. cable, cellular, corporate).", + "x-example": "cable" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "connectionUsageType": { + "type": "string", + "description": "User type (e.g. residential, business, hosting).", + "x-example": "residential" }, - "clientId": { + "connectionOrganization": { "type": "string", - "description": "LinkedIn OAuth2 client ID.", - "x-example": "770000000000dv" + "description": "Registered organization of the IP.", + "x-example": "Google LLC" }, - "primaryClientSecret": { + "time": { "type": "string", - "description": "LinkedIn OAuth2 primary client secret.", - "x-example": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "primaryClientSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "770000000000dv", - "primaryClientSecret": "WPL_AP1.2Bf0000000000000.\/HtlYw==" - } - }, - "oAuth2Disqus": { - "description": "OAuth2Disqus", - "type": "object", - "properties": { - "$id": { + "description": "Log creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "projectId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Project ID.", + "x-example": "610fc2f985ee0" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "610fc2f985ee0" }, - "publicKey": { + "hostname": { "type": "string", - "description": "Disqus OAuth2 public key.", - "x-example": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX" + "description": "Hostname.", + "x-example": "appwrite.io" }, - "secretKey": { + "sdk": { "type": "string", - "description": "Disqus OAuth2 secret key.", - "x-example": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + "description": "Name of the SDK that triggered the event.", + "x-example": "web" + }, + "sdkVersion": { + "type": "string", + "description": "Version of the SDK that triggered the event.", + "x-example": "14.0.0" } }, "required": [ "$id", - "enabled", - "publicKey", - "secretKey" + "actorType", + "actorId", + "actorEmail", + "actorName", + "resourceParent", + "resourceType", + "resourceId", + "resource", + "event", + "userAgent", + "ip", + "mode", + "country", + "continentCode", + "city", + "subdivisions", + "isp", + "autonomousSystemNumber", + "autonomousSystemOrganization", + "connectionType", + "connectionUsageType", + "connectionOrganization", + "time", + "projectId", + "teamId", + "hostname", + "sdk", + "sdkVersion" ], "example": { - "$id": "github", - "enabled": false, - "publicKey": "cgegH70000000000000000000000000000000000000000000000000000Hr1nYX", - "secretKey": "W7Bykj00000000000000000000000000000000000000000000000000003o43w9" + "$id": "5e5ea5c16897e", + "actorType": "user", + "actorId": "610fc2f985ee0", + "actorEmail": "john@appwrite.io", + "actorName": "John Doe", + "resourceParent": "database\/ID", + "resourceType": "collection", + "resourceId": "610fc2f985ee0", + "resource": "collections\/610fc2f985ee0", + "event": "account.sessions.create", + "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36", + "ip": "127.0.0.1", + "mode": "admin", + "country": "US", + "continentCode": "NA", + "city": "Mountain View", + "subdivisions": "California", + "isp": "Google", + "autonomousSystemNumber": "15169", + "autonomousSystemOrganization": "GOOGLE", + "connectionType": "cable", + "connectionUsageType": "residential", + "connectionOrganization": "Google LLC", + "time": "2020-10-15T06:38:00.000+00:00", + "projectId": "610fc2f985ee0", + "teamId": "610fc2f985ee0", + "hostname": "appwrite.io", + "sdk": "web", + "sdkVersion": "14.0.0" } }, - "oAuth2Amazon": { - "description": "OAuth2Amazon", + "additionalResource": { + "description": "AdditionalResource", "type": "object", "properties": { - "$id": { + "name": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Resource name", + "x-example": "" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "unit": { + "type": "string", + "description": "Resource unit", + "x-example": "GB" }, - "clientId": { + "currency": { "type": "string", - "description": "Amazon OAuth2 client ID.", - "x-example": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2" + "description": "Price currency", + "x-example": "USD" }, - "clientSecret": { + "price": { + "type": "number", + "description": "Price", + "x-example": 5, + "format": "double" + }, + "value": { + "type": "integer", + "description": "Resource value", + "x-example": 25, + "format": "int32" + }, + "invoiceDesc": { "type": "string", - "description": "Amazon OAuth2 client secret.", - "x-example": "79ffe4000000000000000000000000000000000000000000000000000002de55" + "description": "Description on invoice", + "x-example": "" } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" + "name", + "unit", + "currency", + "price", + "value", + "invoiceDesc" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "amzn1.application-oa2-client.87400c00000000000000000000063d5b2", - "clientSecret": "79ffe4000000000000000000000000000000000000000000000000000002de55" + "name": "", + "unit": "GB", + "currency": "USD", + "price": 5, + "value": 25, + "invoiceDesc": "" } }, - "oAuth2Etsy": { - "description": "OAuth2Etsy", + "backupArchive": { + "description": "Archive", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Archive ID.", + "x-example": "5e5ea5c16897e" }, - "keyString": { + "$createdAt": { "type": "string", - "description": "Etsy OAuth2 keystring.", - "x-example": "nsgzxh0000000000008j85a2" + "description": "Archive creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "sharedSecret": { + "$updatedAt": { "type": "string", - "description": "Etsy OAuth2 shared secret.", - "x-example": "tp000000ru" - } - }, - "required": [ - "$id", - "enabled", - "keyString", - "sharedSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "keyString": "nsgzxh0000000000008j85a2", - "sharedSecret": "tp000000ru" - } - }, - "oAuth2Facebook": { - "description": "OAuth2Facebook", - "type": "object", - "properties": { - "$id": { + "description": "Archive update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "policyId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Archive policy ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "size": { + "type": "integer", + "description": "Archive size in bytes.", + "x-example": 100000, + "format": "int32" }, - "appId": { + "status": { "type": "string", - "description": "Facebook OAuth2 app ID.", - "x-example": "260600000007694" + "description": "The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.", + "x-example": "completed" }, - "appSecret": { + "startedAt": { "type": "string", - "description": "Facebook OAuth2 app secret.", - "x-example": "2d0b2800000000000000000000d38af4" - } - }, - "required": [ - "$id", - "enabled", - "appId", - "appSecret" - ], - "example": { - "$id": "github", - "enabled": false, - "appId": "260600000007694", - "appSecret": "2d0b2800000000000000000000d38af4" - } - }, - "oAuth2Tradeshift": { - "description": "OAuth2Tradeshift", - "type": "object", - "properties": { - "$id": { + "description": "The backup start time.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "migrationId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Migration ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "services": { + "type": "array", + "description": "The services that are backed up by this archive.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'storage']" }, - "oauth2ClientId": { + "resources": { + "type": "array", + "description": "The resources that are backed up by this archive.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'collections', 'attributes', 'indexes']" + }, + "resourceId": { "type": "string", - "description": "Tradeshift OAuth2 client ID.", - "x-example": "appwrite-test-org.appwrite-test-app" + "description": "The resource ID to backup. Set only if this archive should backup a single resource.", + "x-example": "DB1", + "nullable": true }, - "oauth2ClientSecret": { + "resourceType": { "type": "string", - "description": "Tradeshift OAuth2 client secret.", - "x-example": "7cb52700-0000-0000-0000-000000ca5b83" + "description": "The resource type to backup. Set only if this archive should backup a single resource.", + "x-example": "database", + "nullable": true } }, "required": [ "$id", - "enabled", - "oauth2ClientId", - "oauth2ClientSecret" + "$createdAt", + "$updatedAt", + "policyId", + "size", + "status", + "startedAt", + "migrationId", + "services", + "resources" ], "example": { - "$id": "github", - "enabled": false, - "oauth2ClientId": "appwrite-test-org.appwrite-test-app", - "oauth2ClientSecret": "7cb52700-0000-0000-0000-000000ca5b83" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "policyId": "did8jx6ws45jana098ab7", + "size": 100000, + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database" } }, - "oAuth2Paypal": { - "description": "OAuth2Paypal", + "dedicatedDatabaseBackup": { + "description": "Backup", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Backup ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "$createdAt": { + "type": "string", + "description": "Backup creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "clientId": { + "databaseId": { "type": "string", - "description": "PayPal OAuth2 client ID.", - "x-example": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB" + "description": "Database ID this backup belongs to.", + "x-example": "5e5ea5c16897e" }, - "secretKey": { + "projectId": { "type": "string", - "description": "PayPal OAuth2 secret key.", - "x-example": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "secretKey" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB", - "secretKey": "EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp" - } - }, - "oAuth2Gitlab": { - "description": "OAuth2Gitlab", - "type": "object", - "properties": { - "$id": { + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "policyId": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Backup policy ID when the backup was created by a schedule.", + "x-example": "5e5ea5c16897e" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "trigger": { + "type": "string", + "description": "Backup trigger. Possible values: manual, schedule.", + "x-example": "schedule" }, - "applicationId": { + "type": { "type": "string", - "description": "GitLab OAuth2 application ID.", - "x-example": "d41ffe0000000000000000000000000000000000000000000000000000d5e252" + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival).", + "x-example": "full" }, - "secret": { + "requestedType": { "type": "string", - "description": "GitLab OAuth2 secret.", - "x-example": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38" + "description": "Backup type that was requested. Differs from `type` when the backend could not run the requested type and took a different one instead, in which case `fallbackReason` explains why. Empty for backups taken before the requested type was recorded.", + "x-example": "incremental" }, - "endpoint": { + "fallbackReason": { "type": "string", - "description": "GitLab OAuth2 endpoint URL. Defaults to https:\/\/gitlab.com for self-hosted instances.", - "x-example": "https:\/\/gitlab.com" - } - }, - "required": [ - "$id", - "enabled", - "applicationId", - "secret", - "endpoint" - ], - "example": { - "$id": "github", - "enabled": false, - "applicationId": "d41ffe0000000000000000000000000000000000000000000000000000d5e252", - "secret": "gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38", - "endpoint": "https:\/\/gitlab.com" - } - }, - "oAuth2Authentik": { - "description": "OAuth2Authentik", - "type": "object", - "properties": { - "$id": { + "description": "Why the backend ran a different backup type than the one requested. Empty when the backup ran as requested.", + "x-example": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls." + }, + "status": { + "type": "string", + "description": "Backup status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error), verified (integrity check passed).", + "x-example": "completed" + }, + "sizeBytes": { + "type": "integer", + "description": "Backup size in bytes.", + "x-example": 1073741824, + "format": "int32" + }, + "startedAt": { + "type": "string", + "description": "Backup start time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "completedAt": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Backup completion time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "verifiedAt": { + "type": "string", + "description": "Backup verification time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "clientId": { + "expiresAt": { "type": "string", - "description": "Authentik OAuth2 client ID.", - "x-example": "dTKOPa0000000000000000000000000000e7G8hv" + "description": "Backup expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, - "clientSecret": { + "logPosition": { "type": "string", - "description": "Authentik OAuth2 client secret.", - "x-example": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK" + "description": "Transaction-log position the backup anchors at, in the engine's own notation: PostgreSQL `{walSegment}|{lsn}`, MySQL and MariaDB `{binlogFile}|{offset}`, MongoDB `{seconds}|{increment}`. Empty when the backup recorded no position, which is the case for backup types that carry none.", + "x-example": "000000010000000000000003|0\/3000148", + "nullable": true }, - "endpoint": { + "error": { "type": "string", - "description": "Authentik OAuth2 endpoint domain.", - "x-example": "example.authentik.com" + "description": "Error message if backup failed.", + "x-example": "" } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" + "$createdAt", + "databaseId", + "projectId", + "policyId", + "trigger", + "type", + "requestedType", + "fallbackReason", + "status", + "sizeBytes", + "error" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "dTKOPa0000000000000000000000000000e7G8hv", - "clientSecret": "ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK", - "endpoint": "example.authentik.com" + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "databaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "policyId": "5e5ea5c16897e", + "trigger": "schedule", + "type": "full", + "requestedType": "incremental", + "fallbackReason": "PostgreSQL incremental backups are not offered because they cannot be restored: archived WAL is physical and cannot replay onto a logically-restored base. A full backup was taken instead; use a point-in-time restore (targetTime) to recover to a moment between fulls.", + "status": "completed", + "sizeBytes": 1073741824, + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "verifiedAt": "2020-10-15T06:38:00.000+00:00", + "expiresAt": "2020-10-15T06:38:00.000+00:00", + "logPosition": "000000010000000000000003|0\/3000148", + "error": "" } }, - "oAuth2Auth0": { - "description": "OAuth2Auth0", + "dedicatedDatabaseBackupList": { + "description": "BackupList", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Auth0 OAuth2 client ID.", - "x-example": "OaOkIA000000000000000000005KLSYq" - }, - "clientSecret": { - "type": "string", - "description": "Auth0 OAuth2 client secret.", - "x-example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" + "total": { + "type": "integer", + "description": "Total number of backups.", + "x-example": 5, + "format": "int32" }, - "endpoint": { - "type": "string", - "description": "Auth0 OAuth2 endpoint domain.", - "x-example": "example.us.auth0.com" + "backups": { + "type": "array", + "description": "List of backups.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBackup" + }, + "x-example": [] } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint" + "total", + "backups" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "OaOkIA000000000000000000005KLSYq", - "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", - "endpoint": "example.us.auth0.com" + "total": 5, + "backups": [] } }, - "oAuth2FusionAuth": { - "description": "OAuth2FusionAuth", + "dedicatedDatabaseBackupStorage": { + "description": "BackupStorageConfig", "type": "object", "properties": { - "$id": { + "provider": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "description": "Storage provider. Possible values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage).", + "x-example": "s3" }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "bucket": { + "type": "string", + "description": "Storage bucket or container name.", + "x-example": "my-backup-bucket" }, - "clientId": { + "region": { "type": "string", - "description": "FusionAuth OAuth2 client ID.", - "x-example": "b2222c00-0000-0000-0000-000000862097" + "description": "Storage region.", + "x-example": "us-east-1" }, - "clientSecret": { + "prefix": { "type": "string", - "description": "FusionAuth OAuth2 client secret.", - "x-example": "Jx4s0C0000000000000000000000000000000wGqLsc" + "description": "Object key prefix for backups.", + "x-example": "backups\/" }, "endpoint": { "type": "string", - "description": "FusionAuth OAuth2 endpoint domain.", - "x-example": "example.fusionauth.io" + "description": "Custom endpoint for S3-compatible storage.", + "x-example": "https:\/\/minio.example.com" } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", + "provider", + "bucket", + "region", + "prefix", "endpoint" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "b2222c00-0000-0000-0000-000000862097", - "clientSecret": "Jx4s0C0000000000000000000000000000000wGqLsc", - "endpoint": "example.fusionauth.io" + "provider": "s3", + "bucket": "my-backup-bucket", + "region": "us-east-1", + "prefix": "backups\/", + "endpoint": "https:\/\/minio.example.com" } }, - "oAuth2Keycloak": { - "description": "OAuth2Keycloak", + "billingLimits": { + "description": "Limits", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "bandwidth": { + "type": "integer", + "description": "Bandwidth limit", + "x-example": 5, + "format": "int32", + "nullable": true }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "storage": { + "type": "integer", + "description": "Storage limit", + "x-example": 150, + "format": "int32", + "nullable": true }, - "clientId": { - "type": "string", - "description": "Keycloak OAuth2 client ID.", - "x-example": "appwrite-o0000000st-app" + "users": { + "type": "integer", + "description": "Users limit", + "x-example": 200000, + "format": "int32", + "nullable": true }, - "clientSecret": { - "type": "string", - "description": "Keycloak OAuth2 client secret.", - "x-example": "jdjrJd00000000000000000000HUsaZO" + "executions": { + "type": "integer", + "description": "Executions limit", + "x-example": 750000, + "format": "int32", + "nullable": true }, - "endpoint": { - "type": "string", - "description": "Keycloak OAuth2 endpoint domain.", - "x-example": "keycloak.example.com" + "GBHours": { + "type": "integer", + "description": "GBHours limit", + "x-example": 100, + "format": "int32", + "nullable": true }, - "realmName": { - "type": "string", - "description": "Keycloak OAuth2 realm name.", - "x-example": "appwrite-realm" + "imageTransformations": { + "type": "integer", + "description": "Image transformations limit", + "x-example": 100, + "format": "int32", + "nullable": true + }, + "authPhone": { + "type": "integer", + "description": "Auth phone limit", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "budgetLimit": { + "type": "integer", + "description": "Budget limit percentage", + "x-example": 100, + "format": "int32", + "nullable": true } }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "endpoint", - "realmName" - ], "example": { - "$id": "github", - "enabled": false, - "clientId": "appwrite-o0000000st-app", - "clientSecret": "jdjrJd00000000000000000000HUsaZO", - "endpoint": "keycloak.example.com", - "realmName": "appwrite-realm" + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 } }, - "oAuth2Oidc": { - "description": "OAuth2Oidc", + "billingPlan": { + "description": "billingPlan", "type": "object", "properties": { "$id": { "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Plan ID.", + "x-example": "tier-0" }, - "clientId": { + "name": { "type": "string", - "description": "OpenID Connect OAuth2 client ID.", - "x-example": "qibI2x0000000000000000000000000006L2YFoG" + "description": "Plan name", + "x-example": "Hobby" }, - "clientSecret": { + "desc": { "type": "string", - "description": "OpenID Connect OAuth2 client secret.", - "x-example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" + "description": "Plan description", + "x-example": "Hobby plan" }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "x-example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + "order": { + "type": "integer", + "description": "Plan order", + "x-example": 0, + "format": "int32" }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/authorize" + "price": { + "type": "number", + "description": "Price", + "x-example": 25, + "format": "double" }, - "tokenURL": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/token" + "trial": { + "type": "integer", + "description": "Trial days", + "x-example": 14, + "format": "int32" }, - "userInfoURL": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "x-example": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "required": [ - "$id", - "enabled", - "clientId", - "clientSecret", - "wellKnownURL", - "authorizationURL", - "tokenURL", - "userInfoURL" - ], - "example": { - "$id": "github", - "enabled": false, - "clientId": "qibI2x0000000000000000000000000006L2YFoG", - "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", - "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", - "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", - "tokenURL": "https:\/\/myoauth.com\/oauth2\/token", - "userInfoURL": "https:\/\/myoauth.com\/oauth2\/userinfo" - } - }, - "oAuth2Okta": { - "description": "OAuth2Okta", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" + "bandwidth": { + "type": "integer", + "description": "Bandwidth", + "x-example": 25, + "format": "int32" + }, + "storage": { + "type": "integer", + "description": "Storage", + "x-example": 25, + "format": "int32" + }, + "imageTransformations": { + "type": "integer", + "description": "Image Transformations", + "x-example": 100, + "format": "int32" + }, + "screenshotsGenerated": { + "type": "integer", + "description": "Screenshots generated", + "x-example": 50, + "format": "int32" + }, + "members": { + "type": "integer", + "description": "Members", + "x-example": 25, + "format": "int32" + }, + "webhooks": { + "type": "integer", + "description": "Webhooks", + "x-example": 25, + "format": "int32" + }, + "wafRules": { + "type": "integer", + "description": "Maximum WAF rules per project", + "x-example": 2, + "format": "int32" + }, + "projects": { + "type": "integer", + "description": "Projects", + "x-example": 2, + "format": "int32" + }, + "platforms": { + "type": "integer", + "description": "Platforms", + "x-example": 3, + "format": "int32" + }, + "users": { + "type": "integer", + "description": "Users", + "x-example": 25, + "format": "int32" + }, + "teams": { + "type": "integer", + "description": "Teams", + "x-example": 25, + "format": "int32" + }, + "databases": { + "type": "integer", + "description": "Databases", + "x-example": 25, + "format": "int32" + }, + "databasesReads": { + "type": "integer", + "description": "Database reads per month", + "x-example": 500000, + "format": "int32" + }, + "databasesWrites": { + "type": "integer", + "description": "Database writes per month", + "x-example": 250000, + "format": "int32" + }, + "databasesBatchSize": { + "type": "integer", + "description": "Database batch size limit", + "x-example": 100, + "format": "int32" + }, + "buckets": { + "type": "integer", + "description": "Buckets", + "x-example": 25, + "format": "int32" + }, + "fileSize": { + "type": "integer", + "description": "File size", + "x-example": 25, + "format": "int32" + }, + "functions": { + "type": "integer", + "description": "Functions", + "x-example": 25, + "format": "int32" + }, + "sites": { + "type": "integer", + "description": "Sites", + "x-example": 1, + "format": "int32" + }, + "executions": { + "type": "integer", + "description": "Function executions", + "x-example": 25, + "format": "int32" + }, + "executionsRetentionCount": { + "type": "integer", + "description": "Rolling max executions retained per function\/site", + "x-example": 10000, + "format": "int32" + }, + "GBHours": { + "type": "integer", + "description": "GB hours for functions", + "x-example": 100, + "format": "int32" + }, + "realtime": { + "type": "integer", + "description": "Realtime connections", + "x-example": 25, + "format": "int32" + }, + "realtimeMessages": { + "type": "integer", + "description": "Realtime messages", + "x-example": 100000, + "format": "int32" + }, + "messages": { + "type": "integer", + "description": "Messages per month", + "x-example": 1000, + "format": "int32" + }, + "topics": { + "type": "integer", + "description": "Topics for messaging", + "x-example": 1, + "format": "int32" + }, + "authPhone": { + "type": "integer", + "description": "SMS authentications per month", + "x-example": 10, + "format": "int32" + }, + "domains": { + "type": "integer", + "description": "Custom domains", + "x-example": 5, + "format": "int32" + }, + "activityLogs": { + "type": "integer", + "description": "Activity log days", + "x-example": 7, + "format": "int32" + }, + "usageLogs": { + "type": "integer", + "description": "Usage history days", + "x-example": 30, + "format": "int32" + }, + "usageLogsIntervals": { + "type": "array", + "description": "Usage log time intervals allowed for this plan (e.g. 15m, 1h, 1d).", + "items": { + "type": "string" + }, + "x-example": [ + "15m", + "1h", + "1d" + ], + "nullable": true + }, + "projectInactivityDays": { + "type": "integer", + "description": "Number of days of console inactivity before a project is paused. 0 means pausing is disabled.", + "x-example": 7, + "format": "int32" + }, + "alertLimit": { + "type": "integer", + "description": "Alert threshold percentage", + "x-example": 80, + "format": "int32" + }, + "usage": { + "type": "object", + "description": "Additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/usageBillingPlan" + } + ] + }, + "addons": { + "type": "object", + "description": "Addons", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddon" + } + ] + }, + "budgetCapEnabled": { + "type": "boolean", + "description": "Budget cap enabled or disabled.", + "x-example": true + }, + "customSmtp": { + "type": "boolean", + "description": "Custom SMTP", + "x-example": true + }, + "emailBranding": { + "type": "boolean", + "description": "Appwrite branding in email", + "x-example": true + }, + "requiresPaymentMethod": { + "type": "boolean", + "description": "Does plan require payment method", + "x-example": true + }, + "requiresBillingAddress": { + "type": "boolean", + "description": "Does plan require billing address", + "x-example": true + }, + "isAvailable": { + "type": "boolean", + "description": "Is the billing plan available", + "x-example": true + }, + "selfService": { + "type": "boolean", + "description": "Can user change the plan themselves", + "x-example": true + }, + "premiumSupport": { + "type": "boolean", + "description": "Does plan enable premium support", + "x-example": true + }, + "budgeting": { + "type": "boolean", + "description": "Does plan support budget cap", + "x-example": true + }, + "supportsMockNumbers": { + "type": "boolean", + "description": "Does plan support mock numbers", + "x-example": true + }, + "supportsOrganizationRoles": { + "type": "boolean", + "description": "Does plan support organization roles", + "x-example": true + }, + "supportsCredits": { + "type": "boolean", + "description": "Does plan support credit", + "x-example": true + }, + "supportsDisposableEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking disposable email addresses.", + "x-example": true + }, + "supportsCanonicalEmailValidation": { + "type": "boolean", + "description": "Does plan support requiring canonical email addresses.", + "x-example": true + }, + "supportsFreeEmailValidation": { + "type": "boolean", + "description": "Does plan support blocking free email addresses.", + "x-example": true + }, + "supportsCorporateEmailValidation": { + "type": "boolean", + "description": "Does plan support restricting sign-ups to corporate email addresses only.", + "x-example": true + }, + "supportsProjectSpecificRoles": { + "type": "boolean", + "description": "Does plan support project-specific member roles.", + "x-example": true + }, + "backupsEnabled": { + "type": "boolean", + "description": "Does plan support backup policies.", + "x-example": true + }, + "usagePerProject": { + "type": "boolean", + "description": "Whether usage addons are calculated per project.", + "x-example": true }, - "enabled": { + "supportedAddons": { + "type": "object", + "description": "Supported addons for this plan", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanSupportedAddons" + } + ] + }, + "backupPolicies": { + "type": "integer", + "description": "How many policies does plan support", + "x-example": true, + "format": "int32" + }, + "deploymentSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "x-example": 30, + "format": "int32" + }, + "buildSize": { + "type": "integer", + "description": "Maximum function and site deployment size in MB", + "x-example": 2000, + "format": "int32" + }, + "databasesAllowEncrypt": { "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", + "description": "Does the plan support encrypted string attributes or not.", "x-example": false }, - "clientId": { - "type": "string", - "description": "Okta OAuth2 client ID.", - "x-example": "0oa00000000000000698" + "limits": { + "type": "object", + "description": "Plan specific limits", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanLimits" + } + ], + "nullable": true }, - "clientSecret": { + "group": { "type": "string", - "description": "Okta OAuth2 client secret.", - "x-example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" + "description": "Group of this billing plan for variants", + "x-example": "pro", + "enum": [ + "starter", + "pro", + "scale" + ] }, - "domain": { - "type": "string", - "description": "Okta OAuth2 domain.", - "x-example": "trial-6400025.okta.com" + "program": { + "type": "object", + "description": "Details of the program this plan is a part of.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/program" + } + ], + "nullable": true }, - "authorizationServerId": { - "type": "string", - "description": "Okta OAuth2 authorization server ID.", - "x-example": "aus000000000000000h7z" + "dedicatedDatabases": { + "type": "object", + "description": "Dedicated database limits available to this plan.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanDedicatedDatabaseLimits" + } + ], + "nullable": true } }, "required": [ "$id", - "enabled", - "clientId", - "clientSecret", - "domain", - "authorizationServerId" + "name", + "desc", + "order", + "price", + "trial", + "bandwidth", + "storage", + "imageTransformations", + "screenshotsGenerated", + "members", + "webhooks", + "wafRules", + "projects", + "platforms", + "users", + "teams", + "databases", + "databasesReads", + "databasesWrites", + "databasesBatchSize", + "buckets", + "fileSize", + "functions", + "sites", + "executions", + "executionsRetentionCount", + "GBHours", + "realtime", + "realtimeMessages", + "messages", + "topics", + "authPhone", + "domains", + "activityLogs", + "usageLogs", + "projectInactivityDays", + "alertLimit", + "usage", + "addons", + "budgetCapEnabled", + "customSmtp", + "emailBranding", + "requiresPaymentMethod", + "requiresBillingAddress", + "isAvailable", + "selfService", + "premiumSupport", + "budgeting", + "supportsMockNumbers", + "supportsOrganizationRoles", + "supportsCredits", + "supportsDisposableEmailValidation", + "supportsCanonicalEmailValidation", + "supportsFreeEmailValidation", + "supportsCorporateEmailValidation", + "supportsProjectSpecificRoles", + "backupsEnabled", + "usagePerProject", + "supportedAddons", + "backupPolicies", + "deploymentSize", + "buildSize", + "databasesAllowEncrypt", + "group" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "0oa00000000000000698", - "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", - "domain": "trial-6400025.okta.com", - "authorizationServerId": "aus000000000000000h7z" + "$id": "tier-0", + "name": "Hobby", + "desc": "Hobby plan", + "order": 0, + "price": 25, + "trial": 14, + "bandwidth": 25, + "storage": 25, + "imageTransformations": 100, + "screenshotsGenerated": 50, + "members": 25, + "webhooks": 25, + "wafRules": 2, + "projects": 2, + "platforms": 3, + "users": 25, + "teams": 25, + "databases": 25, + "databasesReads": 500000, + "databasesWrites": 250000, + "databasesBatchSize": 100, + "buckets": 25, + "fileSize": 25, + "functions": 25, + "sites": 1, + "executions": 25, + "executionsRetentionCount": 10000, + "GBHours": 100, + "realtime": 25, + "realtimeMessages": 100000, + "messages": 1000, + "topics": 1, + "authPhone": 10, + "domains": 5, + "activityLogs": 7, + "usageLogs": 30, + "usageLogsIntervals": [ + "15m", + "1h", + "1d" + ], + "projectInactivityDays": 7, + "alertLimit": 80, + "usage": null, + "addons": null, + "budgetCapEnabled": true, + "customSmtp": true, + "emailBranding": true, + "requiresPaymentMethod": true, + "requiresBillingAddress": true, + "isAvailable": true, + "selfService": true, + "premiumSupport": true, + "budgeting": true, + "supportsMockNumbers": true, + "supportsOrganizationRoles": true, + "supportsCredits": true, + "supportsDisposableEmailValidation": true, + "supportsCanonicalEmailValidation": true, + "supportsFreeEmailValidation": true, + "supportsCorporateEmailValidation": true, + "supportsProjectSpecificRoles": true, + "backupsEnabled": true, + "usagePerProject": true, + "supportedAddons": null, + "backupPolicies": true, + "deploymentSize": 30, + "buildSize": 2000, + "databasesAllowEncrypt": false, + "limits": null, + "group": "pro", + "program": null, + "dedicatedDatabases": null } }, - "oAuth2Kick": { - "description": "OAuth2Kick", + "billingPlanAddon": { + "description": "Addon", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "clientId": { - "type": "string", - "description": "Kick OAuth2 client ID.", - "x-example": "01KQ7C00000000000001MFHS32" + "seats": { + "type": "object", + "description": "Addon seats", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ] }, - "clientSecret": { - "type": "string", - "description": "Kick OAuth2 client secret.", - "x-example": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + "projects": { + "type": "object", + "description": "Addon projects", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlanAddonDetails" + } + ] } }, "required": [ - "$id", - "enabled", - "clientId", - "clientSecret" + "seats", + "projects" ], "example": { - "$id": "github", - "enabled": false, - "clientId": "01KQ7C00000000000001MFHS32", - "clientSecret": "34ac5600000000000000000000000000000000000000000000000000e830c8b" + "seats": null, + "projects": null } }, - "oAuth2Apple": { - "description": "OAuth2Apple", + "billingPlanAddonDetails": { + "description": "Details", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "apple" - }, - "enabled": { + "supported": { "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false + "description": "Is the addon supported in the plan?", + "x-example": true }, - "serviceId": { - "type": "string", - "description": "Apple OAuth2 service ID.", - "x-example": "ip.appwrite.app.web" + "planIncluded": { + "type": "integer", + "description": "Addon plan included value", + "x-example": 1, + "format": "int32" }, - "keyId": { + "limit": { + "type": "integer", + "description": "Addon limit", + "x-example": 5, + "format": "int32" + }, + "type": { "type": "string", - "description": "Apple OAuth2 key ID.", - "x-example": "P4000000N8" + "description": "Addon type", + "x-example": "numeric" }, - "teamId": { + "currency": { "type": "string", - "description": "Apple OAuth2 team ID.", - "x-example": "D4000000R6" + "description": "Price currency", + "x-example": "USD" }, - "p8File": { + "price": { + "type": "number", + "description": "Price", + "x-example": 5, + "format": "double" + }, + "value": { + "type": "integer", + "description": "Resource value", + "x-example": 25, + "format": "int32" + }, + "invoiceDesc": { "type": "string", - "description": "Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long.", - "x-example": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + "description": "Description on invoice", + "x-example": "" } }, "required": [ - "$id", - "enabled", - "serviceId", - "keyId", - "teamId", - "p8File" + "supported", + "planIncluded", + "limit", + "type", + "currency", + "price", + "value", + "invoiceDesc" ], "example": { - "$id": "apple", - "enabled": false, - "serviceId": "ip.appwrite.app.web", - "keyId": "P4000000N8", - "teamId": "D4000000R6", - "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----" + "supported": true, + "planIncluded": 1, + "limit": 5, + "type": "numeric", + "currency": "USD", + "price": 5, + "value": 25, + "invoiceDesc": "" } }, - "oAuth2Microsoft": { - "description": "OAuth2Microsoft", + "billingPlanLimits": { + "description": "PlanLimits", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "OAuth2 provider ID.", - "x-example": "github" - }, - "enabled": { - "type": "boolean", - "description": "OAuth2 provider is active and can be used to create sessions.", - "x-example": false - }, - "applicationId": { - "type": "string", - "description": "Microsoft OAuth2 application ID.", - "x-example": "00001111-aaaa-2222-bbbb-3333cccc4444" - }, - "applicationSecret": { - "type": "string", - "description": "Microsoft OAuth2 application secret.", - "x-example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + "credits": { + "type": "integer", + "description": "Credits limit per billing cycle", + "x-example": 100, + "format": "int32", + "nullable": true }, - "tenant": { - "type": "string", - "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", - "x-example": "common" + "dailyCredits": { + "type": "integer", + "description": "Daily credits limit (if applicable)", + "x-example": 5, + "format": "int32", + "nullable": true } }, - "required": [ - "$id", - "enabled", - "applicationId", - "applicationSecret", - "tenant" - ], "example": { - "$id": "github", - "enabled": false, - "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", - "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", - "tenant": "common" + "credits": 100, + "dailyCredits": 5 } }, - "oAuth2ProviderList": { - "description": "OAuth2 Providers List", + "billingPlanDedicatedDatabaseLimits": { + "description": "dedicatedDatabaseLimits", "type": "object", "properties": { - "total": { + "minCpu": { "type": "integer", - "description": "Total number of OAuth2 providers in the given project.", + "description": "Minimum CPU allocation in millicores.", + "x-example": 125, + "format": "int32", + "nullable": true + }, + "maxCpu": { + "type": "integer", + "description": "Maximum CPU allocation in millicores.", + "x-example": 16000, + "format": "int32", + "nullable": true + }, + "minMemoryMb": { + "type": "integer", + "description": "Minimum memory allocation in megabytes.", + "x-example": 128, + "format": "int32", + "nullable": true + }, + "maxMemoryMb": { + "type": "integer", + "description": "Maximum memory allocation in megabytes.", + "x-example": 65536, + "format": "int32", + "nullable": true + }, + "minStorageGb": { + "type": "integer", + "description": "Minimum storage allocation in gigabytes.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "maxStorageGb": { + "type": "integer", + "description": "Maximum storage allocation in gigabytes.", + "x-example": 16384, + "format": "int32", + "nullable": true + }, + "maxReplicas": { + "type": "integer", + "description": "Maximum number of high-availability replicas per dedicated database.", "x-example": 5, - "format": "int32" + "format": "int32", + "nullable": true }, - "providers": { + "maxConnections": { + "type": "integer", + "description": "Maximum number of client connections.", + "x-example": 10000, + "format": "int32", + "nullable": true + }, + "maxIpAllowlistSize": { + "type": "integer", + "description": "Maximum number of entries allowed in the IP allowlist.", + "x-example": 100, + "format": "int32", + "nullable": true + }, + "maxExtensions": { + "type": "integer", + "description": "Maximum number of database extensions that can be enabled.", + "x-example": 50, + "format": "int32", + "nullable": true + }, + "maxBackupRetentionDays": { + "type": "integer", + "description": "Maximum number of days a backup can be retained.", + "x-example": 365, + "format": "int32", + "nullable": true + }, + "maxPitrRetentionDays": { + "type": "integer", + "description": "Maximum number of days of point-in-time recovery data that can be retained.", + "x-example": 35, + "format": "int32", + "nullable": true + }, + "maxSqlApiMaxRows": { + "type": "integer", + "description": "Maximum number of rows a single SQL API query can return.", + "x-example": 1000000, + "format": "int32", + "nullable": true + }, + "maxSqlApiMaxBytes": { + "type": "integer", + "description": "Maximum response size in bytes for a single SQL API query.", + "x-example": 104857600, + "format": "int32", + "nullable": true + }, + "maxSqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum execution time in seconds for a single SQL API query.", + "x-example": 300, + "format": "int32", + "nullable": true + }, + "maxSqlApiAllowedStatements": { + "type": "integer", + "description": "Maximum number of SQL statement types that can be permitted through the SQL API.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "allowedSqlStatements": { "type": "array", - "description": "List of OAuth2 providers.", + "description": "SQL statement types permitted through the SQL API.", "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/oAuth2Github" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Discord" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Figma" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dropbox" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Dailymotion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitbucket" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Bitly" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Box" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Autodesk" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Google" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoom" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Zoho" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yandex" - }, - { - "$ref": "#\/components\/schemas\/oAuth2X" - }, - { - "$ref": "#\/components\/schemas\/oAuth2WordPress" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Twitch" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Stripe" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Spotify" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Slack" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Podio" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Notion" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Salesforce" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Yahoo" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Linkedin" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Disqus" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Amazon" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Etsy" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Facebook" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Paypal" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Gitlab" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Authentik" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Auth0" - }, - { - "$ref": "#\/components\/schemas\/oAuth2FusionAuth" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Keycloak" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Oidc" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Apple" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Okta" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Kick" - }, - { - "$ref": "#\/components\/schemas\/oAuth2Microsoft" - } - ], - "discriminator": { - "propertyName": "$id", - "mapping": { - "github": "#\/components\/schemas\/oAuth2Github", - "discord": "#\/components\/schemas\/oAuth2Discord", - "figma": "#\/components\/schemas\/oAuth2Figma", - "dropbox": "#\/components\/schemas\/oAuth2Dropbox", - "dailymotion": "#\/components\/schemas\/oAuth2Dailymotion", - "bitbucket": "#\/components\/schemas\/oAuth2Bitbucket", - "bitly": "#\/components\/schemas\/oAuth2Bitly", - "box": "#\/components\/schemas\/oAuth2Box", - "autodesk": "#\/components\/schemas\/oAuth2Autodesk", - "google": "#\/components\/schemas\/oAuth2Google", - "zoom": "#\/components\/schemas\/oAuth2Zoom", - "zoho": "#\/components\/schemas\/oAuth2Zoho", - "yandex": "#\/components\/schemas\/oAuth2Yandex", - "x": "#\/components\/schemas\/oAuth2X", - "wordpress": "#\/components\/schemas\/oAuth2WordPress", - "twitch": "#\/components\/schemas\/oAuth2Twitch", - "stripe": "#\/components\/schemas\/oAuth2Stripe", - "spotify": "#\/components\/schemas\/oAuth2Spotify", - "slack": "#\/components\/schemas\/oAuth2Slack", - "podio": "#\/components\/schemas\/oAuth2Podio", - "notion": "#\/components\/schemas\/oAuth2Notion", - "salesforce": "#\/components\/schemas\/oAuth2Salesforce", - "yahoo": "#\/components\/schemas\/oAuth2Yahoo", - "linkedin": "#\/components\/schemas\/oAuth2Linkedin", - "disqus": "#\/components\/schemas\/oAuth2Disqus", - "amazon": "#\/components\/schemas\/oAuth2Amazon", - "etsy": "#\/components\/schemas\/oAuth2Etsy", - "facebook": "#\/components\/schemas\/oAuth2Facebook", - "tradeshift": "#\/components\/schemas\/oAuth2Tradeshift", - "tradeshiftBox": "#\/components\/schemas\/oAuth2Tradeshift", - "paypal": "#\/components\/schemas\/oAuth2Paypal", - "paypalSandbox": "#\/components\/schemas\/oAuth2Paypal", - "gitlab": "#\/components\/schemas\/oAuth2Gitlab", - "authentik": "#\/components\/schemas\/oAuth2Authentik", - "auth0": "#\/components\/schemas\/oAuth2Auth0", - "fusionauth": "#\/components\/schemas\/oAuth2FusionAuth", - "keycloak": "#\/components\/schemas\/oAuth2Keycloak", - "oidc": "#\/components\/schemas\/oAuth2Oidc", - "apple": "#\/components\/schemas\/oAuth2Apple", - "okta": "#\/components\/schemas\/oAuth2Okta", - "kick": "#\/components\/schemas\/oAuth2Kick", - "microsoft": "#\/components\/schemas\/oAuth2Microsoft" - } - } + "type": "string" }, - "x-example": "" - } - }, - "required": [ - "total", - "providers" - ], - "example": { - "total": 5, - "providers": "" - } - }, - "policyPasswordDictionary": { - "description": "Policy Password Dictionary", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "x-example": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "nullable": true }, - "enabled": { - "type": "boolean", - "description": "Whether password dictionary policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyPasswordHistory": { - "description": "Policy Password History", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "allowedStorageClasses": { + "type": "array", + "description": "Storage classes available for dedicated databases.", + "items": { + "type": "string" + }, + "x-example": [ + "ssd" + ], + "nullable": true }, - "total": { - "type": "integer", - "description": "Password history length. A value of 0 means the policy is disabled.", - "x-example": 5, - "format": "int32" + "allowedSyncModes": { + "type": "array", + "description": "Replica synchronization modes available for dedicated databases.", + "items": { + "type": "string" + }, + "x-example": [ + "async", + "sync", + "quorum" + ], + "nullable": true } }, - "required": [ - "$id", - "total" - ], "example": { - "$id": "password-dictionary", - "total": 5 + "minCpu": 125, + "maxCpu": 16000, + "minMemoryMb": 128, + "maxMemoryMb": 65536, + "minStorageGb": 1, + "maxStorageGb": 16384, + "maxReplicas": 5, + "maxConnections": 10000, + "maxIpAllowlistSize": 100, + "maxExtensions": 50, + "maxBackupRetentionDays": 365, + "maxPitrRetentionDays": 35, + "maxSqlApiMaxRows": 1000000, + "maxSqlApiMaxBytes": 104857600, + "maxSqlApiTimeoutSeconds": 300, + "maxSqlApiAllowedStatements": 10, + "allowedSqlStatements": [ + "select", + "insert", + "update", + "delete", + "explain" + ], + "allowedStorageClasses": [ + "ssd" + ], + "allowedSyncModes": [ + "async", + "sync", + "quorum" + ] } }, - "policyPasswordStrength": { - "description": "Policy Password Strength", + "billingPlanSupportedAddons": { + "description": "BillingPlanSupportedAddons", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "min": { - "type": "integer", - "description": "Minimum password length required for user passwords.", - "x-example": 12, - "format": "int32" - }, - "uppercase": { - "type": "boolean", - "description": "Whether passwords must include at least one uppercase letter.", - "x-example": true - }, - "lowercase": { + "baa": { "type": "boolean", - "description": "Whether passwords must include at least one lowercase letter.", + "description": "Whether the plan supports BAA (Business Associate Agreement) addon", "x-example": true }, - "number": { + "premiumGeoDB": { "type": "boolean", - "description": "Whether passwords must include at least one number.", + "description": "Whether the plan supports Premium Geo DB addon (project-level)", "x-example": true }, - "symbols": { + "premiumGeoDBOrg": { "type": "boolean", - "description": "Whether passwords must include at least one symbol.", + "description": "Whether the plan supports Premium Geo DB addon (organization-level)", "x-example": true } }, "required": [ - "$id", - "min", - "uppercase", - "lowercase", - "number", - "symbols" + "baa", + "premiumGeoDB", + "premiumGeoDBOrg" ], "example": { - "$id": "password-dictionary", - "min": 12, - "uppercase": true, - "lowercase": true, - "number": true, - "symbols": true + "baa": true, + "premiumGeoDB": true, + "premiumGeoDBOrg": true } }, - "policyPasswordPersonalData": { - "description": "Policy Password Personal Data", + "block": { + "description": "Block", "type": "object", "properties": { - "$id": { + "$createdAt": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Block creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "enabled": { - "type": "boolean", - "description": "Whether password personal data policy is enabled.", - "x-example": true + "resourceType": { + "type": "string", + "description": "Resource type that is blocked", + "x-example": "project" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier that is blocked", + "x-example": "5e5ea5c16897e" + }, + "mode": { + "type": "string", + "description": "Block mode. full blocks reads and writes; readOnly blocks writes only.", + "x-example": "readOnly" + }, + "reason": { + "type": "string", + "description": "Reason for the block. Can be null if no reason was provided.", + "x-example": "Payment overdue", + "nullable": true + }, + "expiredAt": { + "type": "string", + "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "projectName": { + "type": "string", + "description": "Name of the project this block applies to.", + "x-example": "My Project" + }, + "region": { + "type": "string", + "description": "Region of the project this block applies to.", + "x-example": "fra" + }, + "organizationName": { + "type": "string", + "description": "Name of the organization that owns the project.", + "x-example": "Acme Inc." + }, + "organizationId": { + "type": "string", + "description": "ID of the organization that owns the project.", + "x-example": "5e5ea5c16897e" + }, + "billingPlan": { + "type": "string", + "description": "Billing plan of the organization that owns the project.", + "x-example": "pro" } }, "required": [ - "$id", - "enabled" + "$createdAt", + "resourceType", + "resourceId", + "mode", + "projectName", + "region", + "organizationName", + "organizationId", + "billingPlan" ], "example": { - "$id": "password-dictionary", - "enabled": true + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e", + "mode": "readOnly", + "reason": "Payment overdue", + "expiredAt": "2020-10-15T06:38:00.000+00:00", + "projectName": "My Project", + "region": "fra", + "organizationName": "Acme Inc.", + "organizationId": "5e5ea5c16897e", + "billingPlan": "pro" } }, - "policySessionAlert": { - "description": "Policy Session Alert", + "dedicatedDatabaseBranch": { + "description": "Branch", "type": "object", "properties": { - "$id": { + "branchId": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Branch identifier.", + "x-example": "a1b2c3d4" }, - "enabled": { + "branchName": { + "type": "string", + "description": "Branch name.", + "x-example": "branch-a1b2c3d4" + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace where the branch is deployed.", + "x-example": "db-myproject-mydb-branch-a1b2c3d4" + }, + "expiresAt": { + "type": "integer", + "description": "Unix timestamp when the branch expires.", + "x-example": 1711411200, + "format": "int32" + }, + "host": { + "type": "string", + "description": "Branch hostname for direct connections.", + "x-example": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center" + }, + "port": { + "type": "integer", + "description": "Branch port. Null until the backing reports one.", + "x-example": 5432, + "format": "int32" + }, + "database": { + "type": "string", + "description": "Database name the client sends for routing to the branch.", + "x-example": "db-myproject-mydb-a1b2c3d4" + }, + "username": { + "type": "string", + "description": "Database username. Shared with the parent database.", + "x-example": "appwrite" + }, + "password": { + "type": "string", + "description": "Database password. Shared with the parent database.", + "x-example": "********" + }, + "ssl": { "type": "boolean", - "description": "Whether session alert policy is enabled.", - "x-example": true + "description": "Whether SSL is required.", + "x-example": false + }, + "engine": { + "type": "string", + "description": "Database engine. Possible values: postgresql, mysql, mongodb.", + "x-example": "postgresql" + }, + "connectionString": { + "type": "string", + "description": "Full connection string for the branch.", + "x-example": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" } }, "required": [ - "$id", - "enabled" + "branchId", + "branchName", + "namespace", + "expiresAt", + "host", + "port", + "database", + "username", + "password", + "ssl", + "engine", + "connectionString" ], "example": { - "$id": "password-dictionary", - "enabled": true + "branchId": "a1b2c3d4", + "branchName": "branch-a1b2c3d4", + "namespace": "db-myproject-mydb-branch-a1b2c3d4", + "expiresAt": 1711411200, + "host": "db-myproject-mydb-a1b2c3d4.fra.appwrite.center", + "port": 5432, + "database": "db-myproject-mydb-a1b2c3d4", + "username": "appwrite", + "password": "********", + "ssl": false, + "engine": "postgresql", + "connectionString": "postgresql:\/\/appwrite:****@db-myproject-mydb-a1b2c3d4.fra.appwrite.center:5432\/db-myproject-mydb-a1b2c3d4?sslmode=disable" } }, - "policySessionDuration": { - "description": "Policy Session Duration", + "dedicatedDatabaseBranchList": { + "description": "BranchList", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" - }, - "duration": { - "type": "integer", - "description": "Session duration in seconds.", - "x-example": 3600, - "format": "int32" + "branches": { + "type": "array", + "description": "List of branches.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseBranch" + }, + "x-example": [] } }, "required": [ - "$id", - "duration" + "branches" ], "example": { - "$id": "password-dictionary", - "duration": 3600 + "branches": [] } }, - "policySessionInvalidation": { - "description": "Policy Session Invalidation", + "dedicatedDatabase": { + "description": "DedicatedDatabase", "type": "object", "properties": { "$id": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Dedicated database ID.", + "x-example": "5e5ea5c16897e" }, - "enabled": { + "$createdAt": { + "type": "string", + "description": "Database creation time 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" + }, + "projectId": { + "type": "string", + "description": "Project ID that owns this database.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Database display name.", + "x-example": "My Production Database" + }, + "api": { + "type": "string", + "description": "Product API that owns this database: tablesdb, documentsdb, vectorsdb, mysql, postgresql, or mongodb.", + "x-example": "postgresql" + }, + "engine": { + "type": "string", + "description": "Database engine: postgresql, mysql, or mongodb.", + "x-example": "postgresql" + }, + "version": { + "type": "string", + "description": "Database engine version.", + "x-example": "16" + }, + "specification": { + "type": "string", + "description": "Specification identifier.", + "x-example": "s-2vcpu-2gb" + }, + "backend": { + "type": "string", + "description": "Database backend provider. Possible values: prisma, edge.", + "x-example": "edge" + }, + "hostname": { + "type": "string", + "description": "Database hostname for connections.", + "x-example": "db-myproject-mydb.fra.appwrite.center" + }, + "connectionPort": { + "type": "integer", + "description": "Database port for connections. Derived from the engine when the backing has not reported one yet.", + "x-example": 5432, + "format": "int32" + }, + "connectionUser": { + "type": "string", + "description": "Database username for connections.", + "x-example": "appwrite_user" + }, + "connectionPassword": { + "type": "string", + "description": "Database password for connections.", + "x-example": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" + }, + "connectionString": { + "type": "string", + "description": "Full database connection string (URI format).", + "x-example": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require" + }, + "ssl": { "type": "boolean", - "description": "Whether session invalidation policy is enabled.", + "description": "Whether SSL\/TLS is required for client connections.", "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policySessionLimit": { - "description": "Policy Session Limit", - "type": "object", - "properties": { - "$id": { + }, + "status": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Database status. Possible values: provisioning, ready, inactive, paused, failed, deleted, restoring, scaling.", + "x-example": "ready" }, - "total": { + "containerStatus": { + "type": "string", + "description": "Container status for lifecycle-managed database runtimes: active or inactive.", + "x-example": "active" + }, + "lastAccessedAt": { + "type": "string", + "description": "Last activity timestamp in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "idleUntil": { + "type": "string", + "description": "Display-only timestamp when the database is expected to be considered idle (ISO 8601 format). Derived from last activity; lifecycle transitions are driven by lifecycleState.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "lifecycleState": { + "type": "string", + "description": "Idle-lifecycle state of the database. Possible values: active, warm, cold, hibernated.", + "x-example": "active" + }, + "idleTimeoutMinutes": { "type": "integer", - "description": "Maximum number of sessions allowed per user. A value of 0 means the policy is disabled.", - "x-example": 10, + "description": "Minutes of inactivity before container scales to zero.", + "x-example": 15, "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 10 - } - }, - "policyUserLimit": { - "description": "Policy User Limit", - "type": "object", - "properties": { - "$id": { + }, + "cpu": { + "type": "integer", + "description": "CPU allocated in millicores.", + "x-example": 2000, + "format": "int32" + }, + "memory": { + "type": "integer", + "description": "Memory allocated in MB.", + "x-example": 4096, + "format": "int32" + }, + "storage": { + "type": "integer", + "description": "Storage allocated in GB.", + "x-example": 100, + "format": "int32" + }, + "storageClass": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Storage class. Currently always 'ssd'; DigitalOcean exposes a single block-storage class.", + "x-example": "ssd" }, - "total": { + "storageMaxGb": { "type": "integer", - "description": "Maximum number of users allowed in the project. A value of 0 means the policy is disabled.", + "description": "Maximum storage allowed in GB. 0 means use system default.", "x-example": 100, "format": "int32" - } - }, - "required": [ - "$id", - "total" - ], - "example": { - "$id": "password-dictionary", - "total": 100 - } - }, - "policyMembershipPrivacy": { - "description": "Policy Membership Privacy", - "type": "object", - "properties": { - "$id": { + }, + "nodePool": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Kubernetes node pool where the database is scheduled.", + "x-example": "db-pool-4vcpu-8gb" }, - "userId": { - "type": "boolean", - "description": "Whether user ID is visible in memberships.", - "x-example": true + "replicas": { + "type": "integer", + "description": "Number of high availability replicas. High availability is enabled when greater than 0.", + "x-example": 2, + "format": "int32" }, - "userEmail": { + "syncMode": { + "type": "string", + "description": "Replication sync mode: async, sync, or quorum.", + "x-example": "async" + }, + "crossRegionReplicas": { + "type": "integer", + "description": "Number of cross-region replicas. Cross-region availability is enabled when greater than 0.", + "x-example": 1, + "format": "int32" + }, + "networkMaxConnections": { + "type": "integer", + "description": "Maximum concurrent client connections. This is the limit a client pool may reach; the engine's own max_connections reported by the status endpoint is a smaller backend limit the pooler multiplexes onto and does not constrain a client pool.", + "x-example": 500, + "format": "int32" + }, + "networkIdleTimeoutSeconds": { + "type": "integer", + "description": "Connection idle timeout in seconds.", + "x-example": 900, + "format": "int32" + }, + "networkIPAllowlist": { + "type": "array", + "description": "IP addresses\/CIDR ranges allowed to connect.", + "items": { + "type": "string" + }, + "x-example": [ + "10.0.0.0\/8", + "192.168.1.0\/24" + ] + }, + "backupEnabled": { "type": "boolean", - "description": "Whether user email is visible in memberships.", + "description": "Whether automatic backups are enabled.", "x-example": true }, - "userPhone": { + "pitr": { "type": "boolean", - "description": "Whether user phone is visible in memberships.", + "description": "Whether point-in-time recovery is enabled.", "x-example": true }, - "userName": { + "pitrRetentionDays": { + "type": "integer", + "description": "Number of days to retain PITR data.", + "x-example": 14, + "format": "int32" + }, + "storageAutoscaling": { "type": "boolean", - "description": "Whether user name is visible in memberships.", + "description": "Whether automatic storage expansion is enabled.", "x-example": true }, - "userMFA": { + "storageAutoscalingThresholdPercent": { + "type": "integer", + "description": "Storage usage percentage that triggers automatic expansion.", + "x-example": 85, + "format": "int32" + }, + "storageAutoscalingMaxGb": { + "type": "integer", + "description": "Maximum storage size in GB for autoscaling. 0 means no limit.", + "x-example": 500, + "format": "int32" + }, + "maintenanceWindowDay": { + "type": "string", + "description": "Day of the week for the maintenance window. Possible values: sun, mon, tue, wed, thu, fri, sat.", + "x-example": "sun" + }, + "maintenanceWindowHourUtc": { + "type": "integer", + "description": "Hour in UTC (0-23) when the maintenance window starts.", + "x-example": 3, + "format": "int32" + }, + "metricsEnabled": { "type": "boolean", - "description": "Whether user MFA status is visible in memberships.", - "x-example": true + "description": "Whether metrics collection is enabled.", + "x-example": false }, - "userAccessedAt": { + "sqlApiEnabled": { "type": "boolean", - "description": "Whether user last access time is visible in memberships.", + "description": "Whether the SQL API sidecar is enabled for this database.", "x-example": true + }, + "sqlApiAllowedStatements": { + "type": "array", + "description": "Statement types accepted by the SQL API. Defaults to read\/write DML only; DDL\/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE.", + "items": { + "type": "string" + }, + "x-example": "SELECT" + }, + "sqlApiMaxRows": { + "type": "integer", + "description": "Maximum rows returned per SQL API execution. Results larger than this are truncated.", + "x-example": 10000, + "format": "int32" + }, + "sqlApiMaxBytes": { + "type": "integer", + "description": "Maximum serialised SQL API result payload in bytes. Results larger than this are truncated.", + "x-example": 10485760, + "format": "int32" + }, + "sqlApiTimeoutSeconds": { + "type": "integer", + "description": "Maximum server-side SQL API execution time in seconds before the query is cancelled.", + "x-example": 30, + "format": "int32" + }, + "error": { + "type": "string", + "description": "Error message if status is failed.", + "x-example": "" } }, "required": [ "$id", - "userId", - "userEmail", - "userPhone", - "userName", - "userMFA", - "userAccessedAt" + "$createdAt", + "$updatedAt", + "projectId", + "name", + "api", + "engine", + "version", + "specification", + "backend", + "hostname", + "connectionPort", + "connectionUser", + "connectionPassword", + "connectionString", + "ssl", + "status", + "containerStatus", + "lifecycleState", + "idleTimeoutMinutes", + "cpu", + "memory", + "storage", + "storageClass", + "storageMaxGb", + "nodePool", + "replicas", + "syncMode", + "crossRegionReplicas", + "networkMaxConnections", + "networkIdleTimeoutSeconds", + "networkIPAllowlist", + "backupEnabled", + "pitr", + "pitrRetentionDays", + "storageAutoscaling", + "storageAutoscalingThresholdPercent", + "storageAutoscalingMaxGb", + "maintenanceWindowDay", + "maintenanceWindowHourUtc", + "metricsEnabled", + "sqlApiEnabled", + "sqlApiAllowedStatements", + "sqlApiMaxRows", + "sqlApiMaxBytes", + "sqlApiTimeoutSeconds", + "error" ], "example": { - "$id": "password-dictionary", - "userId": true, - "userEmail": true, - "userPhone": true, - "userName": true, - "userMFA": true, - "userAccessedAt": true + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "projectId": "5e5ea5c16897e", + "name": "My Production Database", + "api": "postgresql", + "engine": "postgresql", + "version": "16", + "specification": "s-2vcpu-2gb", + "backend": "edge", + "hostname": "db-myproject-mydb.fra.appwrite.center", + "connectionPort": 5432, + "connectionUser": "appwrite_user", + "connectionPassword": "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", + "connectionString": "postgresql:\/\/user:pass@db-myproject-mydb.fra.appwrite.center:5432\/postgres?sslmode=require", + "ssl": true, + "status": "ready", + "containerStatus": "active", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00", + "idleUntil": "2020-10-15T06:38:00.000+00:00", + "lifecycleState": "active", + "idleTimeoutMinutes": 15, + "cpu": 2000, + "memory": 4096, + "storage": 100, + "storageClass": "ssd", + "storageMaxGb": 100, + "nodePool": "db-pool-4vcpu-8gb", + "replicas": 2, + "syncMode": "async", + "crossRegionReplicas": 1, + "networkMaxConnections": 500, + "networkIdleTimeoutSeconds": 900, + "networkIPAllowlist": [ + "10.0.0.0\/8", + "192.168.1.0\/24" + ], + "backupEnabled": true, + "pitr": true, + "pitrRetentionDays": 14, + "storageAutoscaling": true, + "storageAutoscalingThresholdPercent": 85, + "storageAutoscalingMaxGb": 500, + "maintenanceWindowDay": "sun", + "maintenanceWindowHourUtc": 3, + "metricsEnabled": false, + "sqlApiEnabled": true, + "sqlApiAllowedStatements": "SELECT", + "sqlApiMaxRows": 10000, + "sqlApiMaxBytes": 10485760, + "sqlApiTimeoutSeconds": 30, + "error": "" } }, - "platformWeb": { - "description": "Platform Web", + "dedicatedDatabaseExecution": { + "description": "Execution", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" + "rows": { + "type": "object", + "additionalProperties": true, + "description": "Result rows as a list of column-name => value maps. Empty for non-returning statements.", + "x-example": [ + { + "id": 1, + "name": "example" + } + ] }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "rowCount": { + "type": "integer", + "description": "Number of rows returned (for SELECT) or affected (for INSERT\/UPDATE\/DELETE).", + "x-example": 1, + "format": "int32" }, - "$updatedAt": { - "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "columns": { + "type": "array", + "description": "Column metadata in result-set order.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseExecutionColumn" + }, + "x-example": [] + }, + "durationMs": { + "type": "integer", + "description": "Server-side execution time in milliseconds.", + "x-example": 12, + "format": "int32" + }, + "truncated": { + "type": "boolean", + "description": "True when the configured row or byte cap was hit and the result was truncated.", + "x-example": false }, + "bytes": { + "type": "integer", + "description": "Serialised payload size in bytes.", + "x-example": 1024, + "format": "int32" + } + }, + "required": [ + "rows", + "rowCount", + "columns", + "durationMs", + "truncated", + "bytes" + ], + "example": { + "rows": [ + { + "id": 1, + "name": "example" + } + ], + "rowCount": 1, + "columns": [], + "durationMs": 12, + "truncated": false, + "bytes": 1024 + } + }, + "dedicatedDatabaseExecutionColumn": { + "description": "ExecutionColumn", + "type": "object", + "properties": { "name": { "type": "string", - "description": "Platform name.", - "x-example": "My Web App" + "description": "Column name as returned by the database.", + "x-example": "id" }, "type": { "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": "app.example.com" + "description": "Engine-specific column type (e.g. int4, text, timestamptz).", + "x-example": "int4" } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", + }, + "required": [ "name", - "type", - "hostname", - "key" + "type" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "hostname": "app.example.com" + "name": "id", + "type": "int4" } }, - "platformApple": { - "description": "Platform Apple", + "dedicatedDatabaseRestoration": { + "description": "Restoration", "type": "object", "properties": { "$id": { "type": "string", - "description": "Platform ID.", + "description": "Restoration ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Platform creation date in ISO 8601 format.", + "description": "Restoration creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "databaseId": { "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database ID being restored.", + "x-example": "5e5ea5c16897e" }, - "name": { + "projectId": { "type": "string", - "description": "Platform name.", - "x-example": "My Web App" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "backupId": { + "type": "string", + "description": "Backup ID used for restoration (null for PITR).", + "x-example": "5e5ea5c16897e" }, "type": { "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" + "description": "Restoration type. Possible values: backup (restore from a specific backup snapshot), pitr (point-in-time recovery to a specific timestamp).", + "x-example": "backup" }, - "bundleIdentifier": { + "status": { "type": "string", - "description": "Apple bundle identifier.", - "x-example": "com.company.appname" + "description": "Restoration status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error).", + "x-example": "completed" + }, + "targetTime": { + "type": "string", + "description": "Target time for PITR restoration in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "startedAt": { + "type": "string", + "description": "Restoration start time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "completedAt": { + "type": "string", + "description": "Restoration completion time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "error": { + "type": "string", + "description": "Error message if restoration failed.", + "x-example": "" } }, "required": [ "$id", "$createdAt", - "$updatedAt", - "name", + "databaseId", + "projectId", + "backupId", "type", - "bundleIdentifier" + "status", + "targetTime", + "startedAt", + "completedAt", + "error" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "bundleIdentifier": "com.company.appname" + "databaseId": "5e5ea5c16897e", + "projectId": "5e5ea5c16897e", + "backupId": "5e5ea5c16897e", + "type": "backup", + "status": "completed", + "targetTime": "2020-10-15T06:38:00.000+00:00", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "error": "" } }, - "platformAndroid": { - "description": "Platform Android", + "databaseStatus": { + "description": "Status", "type": "object", "properties": { - "$id": { + "health": { "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" + "description": "Overall health status: healthy, degraded, or unhealthy.", + "x-example": "healthy" }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "ready": { + "type": "boolean", + "description": "Whether the database is ready to accept connections.", + "x-example": true }, - "$updatedAt": { + "engine": { "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database engine: postgresql, mysql, or mongodb.", + "x-example": "postgresql" }, - "name": { + "version": { "type": "string", - "description": "Platform name.", - "x-example": "My Web App" + "description": "Database engine version.", + "x-example": "17" }, - "type": { + "uptime": { + "type": "integer", + "description": "Database uptime in seconds.", + "x-example": 86400, + "format": "int32" + }, + "connections": { + "type": "object", + "description": "Connection statistics.", + "x-example": { + "current": 12, + "max": 100 + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/databaseStatusConnections" + } + ] + }, + "syncMode": { "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" + "description": "Requested replication sync mode. Possible values: async, sync, quorum. Compare with effectiveSyncMode for what the primary is enforcing.", + "x-example": "async" }, - "applicationId": { + "effectiveSyncMode": { "type": "string", - "description": "Android application ID.", - "x-example": "com.company.appname" + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read.", + "x-example": "async", + "nullable": true + }, + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "x-example": false + }, + "syncAcknowledgements": { + "type": "integer", + "description": "Number of standby acknowledgements the primary waits for before a write is committed.", + "x-example": 1, + "format": "int32" + }, + "syncStandbyCount": { + "type": "integer", + "description": "Number of standbys registered with the primary for synchronous replication.", + "x-example": 2, + "format": "int32" + }, + "syncStateConfirmed": { + "type": "boolean", + "description": "Whether the reported sync state was read from the engine. When false the state could not be confirmed and the other sync fields carry no reading.", + "x-example": true + }, + "replicas": { + "type": "array", + "description": "List of database replicas and their status. Every configured member appears, including one the backend has not brought up, which is reported as not healthy.", + "items": { + "$ref": "#\/components\/schemas\/databaseStatusReplica" + }, + "x-example": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "lagSeconds": 0.2 + } + ] + }, + "volumes": { + "type": "array", + "description": "Storage volume information.", + "items": { + "$ref": "#\/components\/schemas\/databaseStatusVolume" + }, + "x-example": { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "applicationId" + "health", + "ready", + "engine", + "version", + "uptime", + "connections", + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "syncStateConfirmed", + "replicas", + "volumes" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "applicationId": "com.company.appname" + "health": "healthy", + "ready": true, + "engine": "postgresql", + "version": "17", + "uptime": 86400, + "connections": { + "current": 12, + "max": 100 + }, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "replicas": [ + { + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": null + }, + { + "index": 1, + "role": "replica", + "healthy": true, + "lagSeconds": 0.2 + } + ], + "volumes": { + "data": { + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true + } + } } }, - "platformWindows": { - "description": "Platform Windows", + "dedicatedDatabaseExtensions": { + "description": "Extensions", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" + "installed": { + "type": "array", + "description": "List of installed extensions.", + "items": { + "type": "string" + }, + "x-example": [ + "pgvector", + "uuid-ossp" + ] }, - "$createdAt": { - "type": "string", - "description": "Platform creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "available": { + "type": "array", + "description": "List of available extensions that can be installed.", + "items": { + "type": "string" + }, + "x-example": [ + "postgis", + "pg_trgm" + ] }, - "$updatedAt": { + "metadata": { + "type": "array", + "description": "Curated metadata (display name, description, category) for each available extension.", + "items": { + "$ref": "#\/components\/schemas\/postgresExtension" + }, + "x-example": [] + } + }, + "required": [ + "installed", + "available", + "metadata" + ], + "example": { + "installed": [ + "pgvector", + "uuid-ossp" + ], + "available": [ + "postgis", + "pg_trgm" + ], + "metadata": [] + } + }, + "dedicatedDatabaseMember": { + "description": "Member", + "type": "object", + "properties": { + "$id": { "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Member identifier.", + "x-example": "1" }, - "name": { + "role": { "type": "string", - "description": "Platform name.", - "x-example": "My Web App" + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology and this member has not been probed, so no member can be named the write target).", + "x-example": "replica" }, - "type": { + "status": { "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" + "description": "Member pod status. Possible values: pending (configured but absent from the backend topology, so nothing is bringing it up), provisioning (pod missing or Pending), starting (Running but not Ready), active (Running and Ready), failed (Failed phase or CrashLoopBackOff container), or the lowercased pod phase reported by the cluster.", + "x-example": "active" }, - "packageIdentifierName": { - "type": "string", - "description": "Windows package identifier name.", - "x-example": "com.company.appname" + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds.", + "x-example": 0.5, + "format": "double" } }, "required": [ "$id", - "$createdAt", - "$updatedAt", - "name", - "type", - "packageIdentifierName" + "role", + "status", + "lagSeconds" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageIdentifierName": "com.company.appname" + "$id": "1", + "role": "replica", + "status": "active", + "lagSeconds": 0.5 } }, - "platformLinux": { - "description": "Platform Linux", + "dedicatedDatabaseOperation": { + "description": "Operation", "type": "object", "properties": { "$id": { "type": "string", - "description": "Platform ID.", + "description": "Operation ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Platform creation date in ISO 8601 format.", + "description": "Operation creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "$updatedAt": { + "databaseId": { "type": "string", - "description": "Platform update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Database ID the operation ran against.", + "x-example": "5e5ea5c16897e" }, - "name": { + "type": { "type": "string", - "description": "Platform name.", - "x-example": "My Web App" + "description": "Operation type, such as provision, update, restore, pausing, resuming, failover, backup-create or cross-region-enable.", + "x-example": "update" }, - "type": { + "status": { "type": "string", - "description": "Platform type. Possible values are: windows, apple, android, linux, web.", - "x-example": "web", - "enum": [ - "windows", - "apple", - "android", - "linux", - "web" - ], - "x-enum-name": "PlatformType" + "description": "Operation status. Possible values: running (in progress), completed (finished successfully), failed (ended in an error).", + "x-example": "completed" }, - "packageName": { + "attempts": { + "type": "integer", + "description": "Number of times this operation has been attempted.", + "x-example": 1, + "format": "int32" + }, + "requestedAt": { "type": "string", - "description": "Linux package name.", - "x-example": "com.company.appname" + "description": "Time the operation was requested, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "startedAt": { + "type": "string", + "description": "Time the operation started, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "completedAt": { + "type": "string", + "description": "Time the operation reached a terminal state, in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "Machine-readable failure code. `LockLost` marks an attempt that was fenced and abandoned because another worker took over the database.", + "x-example": "LockLost" + }, + "errorMessage": { + "type": "string", + "description": "Failure message if the operation failed.", + "x-example": "" } }, "required": [ "$id", "$createdAt", - "$updatedAt", - "name", + "databaseId", "type", - "packageName" + "status", + "attempts", + "errorCode", + "errorMessage" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Web App", - "type": "web", - "packageName": "com.company.appname" + "databaseId": "5e5ea5c16897e", + "type": "update", + "status": "completed", + "attempts": 1, + "requestedAt": "2020-10-15T06:38:00.000+00:00", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "completedAt": "2020-10-15T06:38:00.000+00:00", + "errorCode": "LockLost", + "errorMessage": "" } }, - "platformList": { - "description": "Platforms List", + "dedicatedDatabaseOperationList": { + "description": "OperationList", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of platforms in the given project.", + "description": "Total number of operations.", "x-example": 5, "format": "int32" }, - "platforms": { + "operations": { "type": "array", - "description": "List of platforms.", + "description": "List of operations.", "items": { - "anyOf": [ - { - "$ref": "#\/components\/schemas\/platformWeb" - }, - { - "$ref": "#\/components\/schemas\/platformApple" - }, - { - "$ref": "#\/components\/schemas\/platformAndroid" - }, - { - "$ref": "#\/components\/schemas\/platformWindows" - }, - { - "$ref": "#\/components\/schemas\/platformLinux" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "web": "#\/components\/schemas\/platformWeb", - "apple": "#\/components\/schemas\/platformApple", - "android": "#\/components\/schemas\/platformAndroid", - "windows": "#\/components\/schemas\/platformWindows", - "linux": "#\/components\/schemas\/platformLinux" - } - } + "$ref": "#\/components\/schemas\/dedicatedDatabaseOperation" }, "x-example": "" } }, "required": [ "total", - "platforms" + "operations" ], "example": { "total": 5, - "platforms": "" + "operations": "" } }, - "variable": { - "description": "Variable", + "dedicatedDatabaseReplicas": { + "description": "Replicas", + "type": "object", + "properties": { + "replicas": { + "type": "integer", + "description": "Number of configured replicas. Zero means high availability is disabled.", + "x-example": 2, + "format": "int32" + }, + "syncMode": { + "type": "string", + "description": "Requested replication sync mode. Possible values: async (asynchronous, fastest), sync (synchronous, strong consistency), quorum (quorum-based, majority of replicas must confirm). This is what was asked for; compare it with effectiveSyncMode for what the primary is enforcing.", + "x-example": "async" + }, + "effectiveSyncMode": { + "type": "string", + "description": "Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read. A value below the requested syncMode means writes are being acknowledged with weaker durability than configured.", + "x-example": "async", + "nullable": true + }, + "syncDegraded": { + "type": "boolean", + "description": "Whether the enforced replication is weaker than the requested syncMode.", + "x-example": false + }, + "syncAcknowledgements": { + "type": "integer", + "description": "Number of standby acknowledgements the primary waits for before a write is committed. Zero means writes are acknowledged locally.", + "x-example": 1, + "format": "int32" + }, + "syncStandbyCount": { + "type": "integer", + "description": "Number of standbys registered with the primary for synchronous replication.", + "x-example": 2, + "format": "int32" + }, + "syncStateConfirmed": { + "type": "boolean", + "description": "Whether the reported sync state was read from the engine. When false the state could not be confirmed and the other sync fields carry no reading.", + "x-example": true + }, + "members": { + "type": "array", + "description": "Per-pod statuses for the primary and every replica.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseMember" + }, + "x-example": [] + } + }, + "required": [ + "replicas", + "syncMode", + "syncDegraded", + "syncAcknowledgements", + "syncStandbyCount", + "syncStateConfirmed", + "members" + ], + "example": { + "replicas": 2, + "syncMode": "async", + "effectiveSyncMode": "async", + "syncDegraded": false, + "syncAcknowledgements": 1, + "syncStandbyCount": 2, + "syncStateConfirmed": true, + "members": [] + } + }, + "organization": { + "description": "Organization", "type": "object", "properties": { "$id": { "type": "string", - "description": "Variable ID.", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Variable creation date in ISO 8601 format.", + "description": "Team 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.", + "description": "Team update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "key": { + "name": { "type": "string", - "description": "Variable key.", - "x-example": "API_KEY" + "description": "Team name.", + "x-example": "VIP" }, - "value": { + "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" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + }, + "billingBudget": { + "type": "integer", + "description": "Project budget limit", + "x-example": 50, + "format": "int32" + }, + "budgetAlerts": { + "type": "array", + "description": "Project budget limit", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [ + 50, + 75 + ] + }, + "billingPlan": { "type": "string", - "description": "Variable value.", - "x-example": "myPa$$word1" + "description": "Organization's billing plan ID.", + "x-example": "tier-1" }, - "secret": { - "type": "boolean", - "description": "Variable secret flag. Secret variables can only be updated or deleted, but never read.", - "x-example": false + "billingPlanId": { + "type": "string", + "description": "Organization's billing plan ID.", + "x-example": "tier-1" }, - "resourceType": { + "billingPlanDetails": { + "type": "object", + "description": "Organization's billing plan.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingPlan" + } + ] + }, + "billingEmail": { "type": "string", - "description": "Service to which the variable belongs. Possible values are \"project\", \"function\"", - "x-example": "function" + "description": "Billing email set for the organization.", + "x-example": "billing@org.example" }, - "resourceId": { + "billingStartDate": { + "type": "string", + "description": "Billing cycle start date.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "billingCurrentInvoiceDate": { + "type": "string", + "description": "Current invoice cycle start date.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "billingNextInvoiceDate": { + "type": "string", + "description": "Next invoice cycle start date.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "billingTrialStartDate": { + "type": "string", + "description": "Start date of trial.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "billingTrialDays": { + "type": "integer", + "description": "Number of trial days.", + "x-example": 14, + "format": "int32" + }, + "billingAggregationId": { + "type": "string", + "description": "Current active aggregation id.", + "x-example": "adbc3de4rddfsd" + }, + "billingInvoiceId": { + "type": "string", + "description": "Current active aggregation id.", + "x-example": "adbc3de4rddfsd" + }, + "paymentMethodId": { + "type": "string", + "description": "Default payment method.", + "x-example": "adbc3de4rddfsd" + }, + "billingAddressId": { + "type": "string", + "description": "Default payment method.", + "x-example": "adbc3de4rddfsd" + }, + "backupPaymentMethodId": { + "type": "string", + "description": "Backup payment method.", + "x-example": "adbc3de4rddfsd" + }, + "status": { + "type": "string", + "description": "Team status.", + "x-example": "active" + }, + "remarks": { + "type": "string", + "description": "Remarks on team status.", + "x-example": "Pending initial payment" + }, + "agreementBAA": { + "type": "string", + "description": "Organization agreements", + "x-example": "" + }, + "programManagerName": { + "type": "string", + "description": "Program manager's name.", + "x-example": "" + }, + "programManagerCalendar": { + "type": "string", + "description": "Program manager's calendar link.", + "x-example": "" + }, + "programDiscordChannelName": { + "type": "string", + "description": "Program's discord channel name.", + "x-example": "" + }, + "programDiscordChannelUrl": { + "type": "string", + "description": "Program's discord channel URL.", + "x-example": "" + }, + "billingLimits": { + "type": "object", + "description": "Billing limits reached", + "x-example": "", + "allOf": [ + { + "$ref": "#\/components\/schemas\/billingLimits" + } + ], + "nullable": true + }, + "billingPlanDowngrade": { + "type": "string", + "description": "Billing plan selected for downgrade.", + "x-example": "tier-1" + }, + "billingTaxId": { + "type": "string", + "description": "Tax Id", + "x-example": "" + }, + "markedForDeletion": { + "type": "boolean", + "description": "Marked for deletion", + "x-example": "" + }, + "platform": { "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" + "description": "Product with which the organization is associated (appwrite or imagine)", + "x-example": "imagine" + }, + "projects": { + "type": "array", + "description": "Selected projects", + "items": { + "type": "string" + }, + "x-example": "" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "key", - "value", - "secret", - "resourceType", - "resourceId" + "name", + "total", + "prefs", + "billingBudget", + "budgetAlerts", + "billingPlan", + "billingPlanId", + "billingPlanDetails", + "billingEmail", + "billingStartDate", + "billingCurrentInvoiceDate", + "billingNextInvoiceDate", + "billingTrialStartDate", + "billingTrialDays", + "billingAggregationId", + "billingInvoiceId", + "paymentMethodId", + "billingAddressId", + "backupPaymentMethodId", + "status", + "remarks", + "agreementBAA", + "programManagerName", + "programManagerCalendar", + "programDiscordChannelName", + "programDiscordChannelUrl", + "billingPlanDowngrade", + "billingTaxId", + "markedForDeletion", + "platform", + "projects" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "key": "API_KEY", - "value": "myPa$$word1", - "secret": false, - "resourceType": "function", - "resourceId": "myAwesomeFunction" + "name": "VIP", + "total": 7, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "billingBudget": 50, + "budgetAlerts": [ + 50, + 75 + ], + "billingPlan": "tier-1", + "billingPlanId": "tier-1", + "billingPlanDetails": null, + "billingEmail": "billing@org.example", + "billingStartDate": "2020-10-15T06:38:00.000+00:00", + "billingCurrentInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingNextInvoiceDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialStartDate": "2020-10-15T06:38:00.000+00:00", + "billingTrialDays": 14, + "billingAggregationId": "adbc3de4rddfsd", + "billingInvoiceId": "adbc3de4rddfsd", + "paymentMethodId": "adbc3de4rddfsd", + "billingAddressId": "adbc3de4rddfsd", + "backupPaymentMethodId": "adbc3de4rddfsd", + "status": "active", + "remarks": "Pending initial payment", + "agreementBAA": "", + "programManagerName": "", + "programManagerCalendar": "", + "programDiscordChannelName": "", + "programDiscordChannelUrl": "", + "billingLimits": "", + "billingPlanDowngrade": "tier-1", + "billingTaxId": "", + "markedForDeletion": "", + "platform": "imagine", + "projects": "" } }, - "country": { - "description": "Country", + "dedicatedDatabasePITRWindows": { + "description": "PITRWindows", "type": "object", "properties": { - "name": { + "earliest": { "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "Earliest available recovery point.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "code": { + "latest": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Latest available recovery point.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ - "name", - "code" + "earliest", + "latest" ], "example": { - "name": "United States", - "code": "US" + "earliest": "2020-10-15T06:38:00.000+00:00", + "latest": "2020-10-15T06:38:00.000+00:00" } }, - "continent": { - "description": "Continent", + "backupPolicy": { + "description": "backup", "type": "object", "properties": { - "name": { + "$id": { "type": "string", - "description": "Continent name.", - "x-example": "Europe" + "description": "Backup policy ID.", + "x-example": "5e5ea5c16897e" }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": [ - "name", - "code" - ], - "example": { - "name": "Europe", - "code": "EU" - } - }, - "language": { - "description": "Language", - "type": "object", - "properties": { "name": { "type": "string", - "description": "Language name.", - "x-example": "Italian" + "description": "Backup policy name.", + "x-example": "Hourly backups" }, - "code": { + "$createdAt": { "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" + "description": "Policy creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": [ - "name", - "code", - "nativeName" - ], - "example": { - "name": "Italian", - "code": "it", - "nativeName": "Italiano" - } - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { + "$updatedAt": { "type": "string", - "description": "Currency symbol.", - "x-example": "$" + "description": "Policy update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { + "services": { + "type": "array", + "description": "The services that are backed up by this policy.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'storage']" + }, + "resources": { + "type": "array", + "description": "The resources that are backed up by this policy.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'collections', 'attributes', 'indexes']" + }, + "resourceId": { "type": "string", - "description": "Currency name.", - "x-example": "US dollar" + "description": "The resource ID to backup. Set only if this policy should backup a single resource.", + "x-example": "DB1", + "nullable": true }, - "symbolNative": { + "resourceType": { "type": "string", - "description": "Currency native symbol.", - "x-example": "$" + "description": "The resource type to backup. Set only if this policy should backup a single resource.", + "x-example": "database", + "nullable": true }, - "decimalDigits": { + "retention": { "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, + "description": "How many days to keep the backup before it will be automatically deleted.", + "x-example": 7, "format": "int32" }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { + "schedule": { "type": "string", - "description": "Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.", - "x-example": "USD" + "description": "Policy backup schedule in CRON format.", + "x-example": "0 * * * *" }, - "namePlural": { + "type": { "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" + "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup).", + "x-example": "full" + }, + "enabled": { + "type": "boolean", + "description": "Is this policy enabled.", + "x-example": true } }, "required": [ - "symbol", + "$id", "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" + "$createdAt", + "$updatedAt", + "services", + "resources", + "retention", + "schedule", + "type", + "enabled" ], "example": { - "symbol": "$", - "name": "US dollar", - "symbolNative": "$", - "decimalDigits": 2, - "rounding": 0, - "code": "USD", - "namePlural": "US dollars" + "$id": "5e5ea5c16897e", + "name": "Hourly backups", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "resourceId": "DB1", + "resourceType": "database", + "retention": 7, + "schedule": "0 * * * *", + "type": "full", + "enabled": true } }, - "phone": { - "description": "Phone", + "policyDenyAliasedEmail": { + "description": "Policy Deny Aliased Email", "type": "object", "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { + "$id": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" + "enabled": { + "type": "boolean", + "description": "Whether the deny aliased email policy is enabled.", + "x-example": true } }, "required": [ - "code", - "countryCode", - "countryName" + "$id", + "enabled" ], "example": { - "code": "+1", - "countryCode": "US", - "countryName": "United States" + "$id": "password-dictionary", + "enabled": true } }, - "healthAntivirus": { - "description": "Health Antivirus", + "policyDenyDisposableEmail": { + "description": "Policy Deny Disposable Email", "type": "object", "properties": { - "version": { + "$id": { "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", - "x-example": "online", - "enum": [ - "disabled", - "offline", - "online" - ] + "enabled": { + "type": "boolean", + "description": "Whether the deny disposable email policy is enabled.", + "x-example": true } }, "required": [ - "version", - "status" + "$id", + "enabled" ], "example": { - "version": "1.0.0", - "status": "online" + "$id": "password-dictionary", + "enabled": true } }, - "healthQueue": { - "description": "Health Queue", + "policyDenyFreeEmail": { + "description": "Policy Deny Free Email", "type": "object", "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" + "$id": { + "type": "string", + "description": "Policy ID.", + "x-example": "password-dictionary" + }, + "enabled": { + "type": "boolean", + "description": "Whether the deny free email policy is enabled.", + "x-example": true } }, "required": [ - "size" + "$id", + "enabled" ], "example": { - "size": 8 + "$id": "password-dictionary", + "enabled": true } }, - "healthStatus": { - "description": "Health Status", + "policyDenyCorporateEmail": { + "description": "Policy Deny Corporate Email", "type": "object", "properties": { - "name": { + "$id": { "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" + "description": "Policy ID.", + "x-example": "password-dictionary" }, - "status": { - "type": "string", - "description": "Service status. Possible values are: `pass`, `fail`", - "x-example": "pass", - "enum": [ - "pass", - "fail" - ], - "x-enum-name": "HealthCheckStatus" + "enabled": { + "type": "boolean", + "description": "Whether the deny non-corporate email policy is enabled.", + "x-example": true } }, "required": [ - "name", - "ping", - "status" + "$id", + "enabled" ], "example": { - "name": "database", - "ping": 128, - "status": "pass" + "$id": "password-dictionary", + "enabled": true } }, - "healthCertificate": { - "description": "Health Certificate", + "dedicatedDatabasePooler": { + "description": "PoolerConfig", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Certificate name", - "x-example": "\/CN=www.google.com" - }, - "subjectSN": { - "type": "string", - "description": "Subject SN", - "x-example": "" - }, - "issuerOrganisation": { - "type": "string", - "description": "Issuer organisation", - "x-example": "" - }, - "validFrom": { - "type": "string", - "description": "Valid from", - "x-example": "1704200998" + "enabled": { + "type": "boolean", + "description": "Whether connection pooling is enabled.", + "x-example": true }, - "validTo": { + "mode": { "type": "string", - "description": "Valid to", - "x-example": "1711458597" + "description": "Connection pool mode. Possible values: transaction (releases connections back to pool after each transaction), session (holds connections for the entire client session).", + "x-example": "transaction" }, - "signatureTypeSN": { - "type": "string", - "description": "Signature type SN", - "x-example": "RSA-SHA256" - } - }, - "required": [ - "name", - "subjectSN", - "issuerOrganisation", - "validFrom", - "validTo", - "signatureTypeSN" - ], - "example": { - "name": "\/CN=www.google.com", - "subjectSN": "", - "issuerOrganisation": "", - "validFrom": "1704200998", - "validTo": "1711458597", - "signatureTypeSN": "RSA-SHA256" - } - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { + "maxConnections": { "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, + "description": "Client-connection ceiling the pooler accepts. Enforced on MySQL and MariaDB; on PostgreSQL the pooler has no client cap, so this reports the database's advertised networkMaxConnections and cannot be set here.", + "x-example": 200, "format": "int32" }, - "localTime": { + "defaultPoolSize": { "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, + "description": "Default pool size per user.", + "x-example": 25, "format": "int32" }, - "diff": { + "port": { "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, + "description": "Pooler listening port.", + "x-example": 6432, "format": "int32" + }, + "readWriteSplitting": { + "type": "boolean", + "description": "Whether SELECTs are routed to HA replicas while writes and locked reads stay on the primary. Active only when HA is enabled.", + "x-example": true + }, + "poolerCpuRequest": { + "type": "string", + "description": "Effective CPU request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (5% of DB CPU, floor 100m) unless overridden.", + "x-example": "100m" + }, + "poolerCpuLimit": { + "type": "string", + "description": "Effective CPU limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (10% of DB CPU, floor 200m) unless overridden.", + "x-example": "200m" + }, + "poolerMemoryRequest": { + "type": "string", + "description": "Effective memory request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (7.5% of DB memory, floor 64Mi) unless overridden.", + "x-example": "64Mi" + }, + "poolerMemoryLimit": { + "type": "string", + "description": "Effective memory limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (15% of DB memory, floor 128Mi) unless overridden.", + "x-example": "128Mi" } }, "required": [ - "remoteTime", - "localTime", - "diff" + "enabled", + "mode", + "maxConnections", + "defaultPoolSize", + "port", + "readWriteSplitting", + "poolerCpuRequest", + "poolerCpuLimit", + "poolerMemoryRequest", + "poolerMemoryLimit" ], "example": { - "remoteTime": 1639490751, - "localTime": 1639490844, - "diff": 93 + "enabled": true, + "mode": "transaction", + "maxConnections": 200, + "defaultPoolSize": 25, + "port": 6432, + "readWriteSplitting": true, + "poolerCpuRequest": "100m", + "poolerCpuLimit": "200m", + "poolerMemoryRequest": "64Mi", + "poolerMemoryLimit": "128Mi" } }, - "headers": { - "description": "Headers", + "postgresExtension": { + "description": "Postgres extension", "type": "object", "properties": { + "key": { + "type": "string", + "description": "Extension key used with CREATE EXTENSION.", + "x-example": "vector" + }, "name": { "type": "string", - "description": "Header name.", - "x-example": "Content-Type" + "description": "Human-readable extension name.", + "x-example": "pgvector" }, - "value": { + "description": { "type": "string", - "description": "Header value.", - "x-example": "application\/json" + "description": "Short description of what the extension provides.", + "x-example": "Vector data type and similarity search for embeddings." + }, + "category": { + "type": "string", + "description": "Category the extension belongs to.", + "x-example": "search" } }, "required": [ + "key", "name", - "value" + "description", + "category" ], "example": { - "name": "Content-Type", - "value": "application\/json" + "key": "vector", + "name": "pgvector", + "description": "Vector data type and similarity search for embeddings.", + "category": "search" } }, - "specification": { - "description": "Specification", + "program": { + "description": "Program", "type": "object", "properties": { - "memory": { - "type": "integer", - "description": "Memory size in MB.", - "x-example": 512, - "format": "int32" + "$id": { + "type": "string", + "description": "Program ID", + "x-example": "" }, - "cpus": { - "type": "number", - "description": "Number of CPUs.", - "x-example": 1, - "format": "double" + "title": { + "type": "string", + "description": "Program title", + "x-example": "" }, - "enabled": { + "description": { + "type": "string", + "description": "Program description", + "x-example": "" + }, + "tag": { + "type": "string", + "description": "Program tag for highlighting on console", + "x-example": null + }, + "icon": { + "type": "string", + "description": "Program icon for highlighting on console", + "x-example": null + }, + "url": { + "type": "string", + "description": "URL for more information on this program", + "x-example": "" + }, + "active": { "type": "boolean", - "description": "Is size enabled.", - "x-example": true + "description": "Whether this program is active", + "x-example": false }, - "slug": { + "external": { + "type": "boolean", + "description": "Whether this program is external", + "x-example": false + }, + "billingPlanId": { "type": "string", - "description": "Size slug.", - "x-example": "s-1vcpu-512mb" + "description": "Billing plan ID that this is program is associated with.", + "x-example": "" } }, "required": [ - "memory", - "cpus", - "enabled", - "slug" + "$id", + "title", + "description", + "tag", + "icon", + "url", + "active", + "external", + "billingPlanId" ], "example": { - "memory": 512, - "cpus": 1, - "enabled": true, - "slug": "s-1vcpu-512mb" + "$id": "", + "title": "", + "description": "", + "tag": null, + "icon": null, + "url": "", + "active": false, + "external": false, + "billingPlanId": "" } }, - "proxyRule": { - "description": "Rule", + "backupRestoration": { + "description": "Restoration", "type": "object", "properties": { "$id": { "type": "string", - "description": "Rule ID.", + "description": "Restoration ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Rule creation date in ISO 8601 format.", + "description": "Restoration creation time 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.", + "description": "Restoration 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" - }, - "type": { - "type": "string", - "description": "Action definition for the rule. Possible values are \"api\", \"deployment\", or \"redirect\"", - "x-example": "deployment" - }, - "trigger": { - "type": "string", - "description": "Defines how the rule was created. Possible values are \"manual\" or \"deployment\"", - "x-example": "manual" - }, - "redirectUrl": { + "archiveId": { "type": "string", - "description": "URL to redirect to. Used if type is \"redirect\"", - "x-example": "https:\/\/appwrite.io\/docs" - }, - "redirectStatusCode": { - "type": "integer", - "description": "Status code to apply during redirect. Used if type is \"redirect\"", - "x-example": 301, - "format": "int32" + "description": "Backup archive ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "deploymentId": { + "policyId": { "type": "string", - "description": "ID of deployment. Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" + "description": "Backup policy ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "deploymentResourceType": { + "status": { "type": "string", - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function", - "enum": [ - "function", - "site" - ], - "nullable": true + "description": "The status of the restoration. Possible values: pending, downloading, processing, completed, failed.", + "x-example": "completed" }, - "deploymentResourceId": { + "startedAt": { "type": "string", - "description": "ID of deployment's resource (site or function ID). Used if type is \"deployment\"", - "x-example": "n3u9feiwmf" + "description": "The backup start time.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "deploymentVcsProviderBranch": { + "migrationId": { "type": "string", - "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "main" + "description": "Migration ID.", + "x-example": "did8jx6ws45jana098ab7" }, - "status": { - "type": "string", - "description": "Domain verification status. Possible values are \"unverified\", \"verifying\", \"verified\"", - "x-example": "verified", - "enum": [ - "unverified", - "verifying", - "verified" - ] + "services": { + "type": "array", + "description": "The services that are backed up by this policy.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'storage']" }, - "logs": { - "type": "string", - "description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.", - "x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record." + "resources": { + "type": "array", + "description": "The resources that are backed up by this policy.", + "items": { + "type": "string" + }, + "x-example": "['databases', 'collections', 'attributes', 'indexes']" }, - "renewAt": { + "options": { "type": "string", - "description": "Certificate auto-renewal date in ISO 8601 format.", - "x-example": "datetime" + "description": "Optional data in key-value object. ", + "x-example": "{databases.database[{oldId, newId, newName}]}" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "domain", - "type", - "trigger", - "redirectUrl", - "redirectStatusCode", - "deploymentId", - "deploymentResourceId", - "deploymentVcsProviderBranch", + "archiveId", + "policyId", "status", - "logs", - "renewAt" + "startedAt", + "migrationId", + "services", + "resources", + "options" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "domain": "appwrite.company.com", - "type": "deployment", - "trigger": "manual", - "redirectUrl": "https:\/\/appwrite.io\/docs", - "redirectStatusCode": 301, - "deploymentId": "n3u9feiwmf", - "deploymentResourceType": "function", - "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "main", - "status": "verified", - "logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.", - "renewAt": "datetime" + "archiveId": "did8jx6ws45jana098ab7", + "policyId": "did8jx6ws45jana098ab7", + "status": "completed", + "startedAt": "2020-10-15T06:38:00.000+00:00", + "migrationId": "did8jx6ws45jana098ab7", + "services": "['databases', 'storage']", + "resources": "['databases', 'collections', 'attributes', 'indexes']", + "options": "{databases.database[{oldId, newId, newName}]}" } }, - "emailTemplate": { - "description": "EmailTemplate", + "dedicatedDatabaseRestorationList": { + "description": "Dedicated database restorations list", "type": "object", "properties": { - "templateId": { - "type": "string", - "description": "Template type", - "x-example": "verification" + "total": { + "type": "integer", + "description": "Total number of restorations that matched your query.", + "x-example": 5, + "format": "int32" }, - "locale": { + "restorations": { + "type": "array", + "description": "List of restorations.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseRestoration" + }, + "x-example": "" + } + }, + "required": [ + "total", + "restorations" + ], + "example": { + "total": 5, + "restorations": "" + } + }, + "dedicatedDatabaseSpecification": { + "description": "Specification", + "type": "object", + "properties": { + "slug": { "type": "string", - "description": "Template locale", - "x-example": "en_us" + "description": "Specification slug. Use this value when creating a dedicated database.", + "x-example": "s-2vcpu-2gb" }, - "message": { + "name": { "type": "string", - "description": "Template message", - "x-example": "Click on the link to verify your account." + "description": "Human readable specification name.", + "x-example": "Standard" }, - "senderName": { - "type": "string", - "description": "Name of the sender", - "x-example": "My User" + "price": { + "type": "number", + "description": "Monthly price of the specification in USD.", + "x-example": 20, + "format": "double" }, - "senderEmail": { - "type": "string", - "description": "Email of the sender", - "x-example": "mail@appwrite.io" + "cpu": { + "type": "integer", + "description": "Allocated CPU in millicores.", + "x-example": 2000, + "format": "int32" }, - "replyToEmail": { - "type": "string", - "description": "Reply to email address", - "x-example": "emails@appwrite.io" + "memory": { + "type": "integer", + "description": "Allocated memory in MB.", + "x-example": 2048, + "format": "int32" }, - "replyToName": { - "type": "string", - "description": "Reply to name", - "x-example": "Support Team" + "maxConnections": { + "type": "integer", + "description": "Maximum number of concurrent connections.", + "x-example": 200, + "format": "int32" }, - "subject": { - "type": "string", - "description": "Email subject", - "x-example": "Please verify your email address" + "includedStorage": { + "type": "integer", + "description": "Included storage in GB before overage charges apply.", + "x-example": 25, + "format": "int32" + }, + "includedBandwidth": { + "type": "integer", + "description": "Included bandwidth in GB before overage charges apply.", + "x-example": 200, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the specification is available on the current plan.", + "x-example": true } }, "required": [ - "templateId", - "locale", - "message", - "senderName", - "senderEmail", - "replyToEmail", - "replyToName", - "subject" + "slug", + "name", + "price", + "cpu", + "memory", + "maxConnections", + "includedStorage", + "includedBandwidth", + "enabled" ], "example": { - "templateId": "verification", - "locale": "en_us", - "message": "Click on the link to verify your account.", - "senderName": "My User", - "senderEmail": "mail@appwrite.io", - "replyToEmail": "emails@appwrite.io", - "replyToName": "Support Team", - "subject": "Please verify your email address" + "slug": "s-2vcpu-2gb", + "name": "Standard", + "price": 20, + "cpu": 2000, + "memory": 2048, + "maxConnections": 200, + "includedStorage": 25, + "includedBandwidth": 200, + "enabled": true } }, - "mfaChallenge": { - "description": "MFA Challenge", + "dedicatedDatabaseSpecificationList": { + "description": "SpecificationList", "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" + "specifications": { + "type": "array", + "description": "List of dedicated database specifications.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecification" + }, + "x-example": [] }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" + "total": { + "type": "integer", + "description": "Total number of specifications.", + "x-example": 9, + "format": "int32" }, - "expire": { - "type": "string", - "description": "Token expiration date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "pricing": { + "type": "object", + "description": "Overage and add-on pricing shared across all specifications.", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/dedicatedDatabaseSpecificationPricing" + } + ] } }, "required": [ - "$id", - "$createdAt", - "userId", - "expire" + "specifications", + "total", + "pricing" ], "example": { - "$id": "bb8ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c168bb8", - "expire": "2020-10-15T06:38:00.000+00:00" + "specifications": [], + "total": 9, + "pricing": null } }, - "mfaRecoveryCodes": { - "description": "MFA Recovery Codes", + "dedicatedDatabaseSpecificationPricing": { + "description": "SpecificationPricing", "type": "object", "properties": { - "recoveryCodes": { - "type": "array", - "description": "Recovery codes.", - "items": { - "type": "string" - }, - "x-example": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] + "storageOverageRate": { + "type": "number", + "description": "Price per GB of storage above the included amount, per month, in USD.", + "x-example": 0.125, + "format": "double" + }, + "bandwidthOverageRate": { + "type": "number", + "description": "Price per GB of bandwidth above the included amount, per month, in USD.", + "x-example": 0.08, + "format": "double" + }, + "replicaRate": { + "type": "number", + "description": "High availability replica price as a fraction of the specification cost.", + "x-example": 1, + "format": "double" + }, + "crossRegionReplicaRate": { + "type": "number", + "description": "Cross-region replica price as a fraction of the specification cost.", + "x-example": 1, + "format": "double" + }, + "pitrRate": { + "type": "number", + "description": "Point-in-time recovery price as a fraction of the specification cost.", + "x-example": 0.2, + "format": "double" } }, "required": [ - "recoveryCodes" + "storageOverageRate", + "bandwidthOverageRate", + "replicaRate", + "crossRegionReplicaRate", + "pitrRate" ], "example": { - "recoveryCodes": [ - "a3kf0-s0cl2", - "s0co1-as98s" - ] + "storageOverageRate": 0.125, + "bandwidthOverageRate": 0.08, + "replicaRate": 1, + "crossRegionReplicaRate": 1, + "pitrRate": 0.2 } }, - "mfaType": { - "description": "MFAType", + "databaseStatusConnections": { + "description": "Connections", "type": "object", "properties": { - "secret": { - "type": "string", - "description": "Secret token used for TOTP factor.", - "x-example": "[SHARED_SECRET]" + "current": { + "type": "integer", + "description": "Current number of active connections.", + "x-example": 12, + "format": "int32" }, - "uri": { - "type": "string", - "description": "URI for authenticator apps.", - "x-example": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + "max": { + "type": "integer", + "description": "The engine's own max_connections. On a pooled database this is the backend limit the pooler multiplexes onto, not the ceiling a client pool may reach \u2014 that is networkMaxConnections on the database resource.", + "x-example": 100, + "format": "int32" } }, "required": [ - "secret", - "uri" + "current", + "max" ], "example": { - "secret": "[SHARED_SECRET]", - "uri": "otpauth:\/\/totp\/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite" + "current": 12, + "max": 100 } }, - "mfaFactors": { - "description": "MFAFactors", + "databaseStatusReplica": { + "description": "Replica", "type": "object", "properties": { - "totp": { - "type": "boolean", - "description": "Can TOTP be used for MFA challenge for this account.", - "x-example": true + "index": { + "type": "integer", + "description": "Member index within the database. Read `role` for which member accepts writes: a failover moves the primary without renumbering the indexes.", + "x-example": 0, + "format": "int32" }, - "phone": { - "type": "boolean", - "description": "Can phone (SMS) be used for MFA challenge for this account.", - "x-example": true + "role": { + "type": "string", + "description": "Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology, so no member can be named the write target).", + "x-example": "primary" }, - "email": { + "healthy": { "type": "boolean", - "description": "Can email be used for MFA challenge for this account.", + "description": "Whether the replica is healthy.", "x-example": true }, - "recoveryCode": { - "type": "boolean", - "description": "Can recovery code be used for MFA challenge for this account.", - "x-example": true + "lagSeconds": { + "type": "number", + "description": "Replication lag in seconds (null for primary).", + "x-example": 0.2, + "format": "double", + "nullable": true } }, "required": [ - "totp", - "phone", - "email", - "recoveryCode" + "index", + "role", + "healthy" ], "example": { - "totp": true, - "phone": true, - "email": true, - "recoveryCode": true + "index": 0, + "role": "primary", + "healthy": true, + "lagSeconds": 0.2 } }, - "provider": { - "description": "Provider", + "databaseStatusVolume": { + "description": "Volume", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Provider ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Provider creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { + "path": { "type": "string", - "description": "Provider update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Mount path of the volume.", + "x-example": "\/var\/lib\/postgresql\/data" }, - "name": { + "usedPercent": { "type": "string", - "description": "The name for the provider instance.", - "x-example": "Mailgun" + "description": "Percentage of storage used.", + "x-example": "45%" }, - "provider": { + "available": { "type": "string", - "description": "The name of the provider service.", - "x-example": "mailgun" + "description": "Available storage space.", + "x-example": "55GB" }, - "enabled": { + "mounted": { "type": "boolean", - "description": "Is provider enabled?", + "description": "Whether the volume is mounted.", "x-example": true - }, - "type": { - "type": "string", - "description": "Type of provider.", - "x-example": "sms" - }, - "credentials": { - "type": "object", - "additionalProperties": true, - "description": "Provider credentials.", - "x-example": { - "key": "123456789" - } - }, - "options": { - "type": "object", - "additionalProperties": true, - "description": "Provider options.", - "x-example": { - "from": "sender-email@mydomain" - } } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "provider", - "enabled", - "type", - "credentials" + "path", + "usedPercent", + "available", + "mounted" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Mailgun", - "provider": "mailgun", - "enabled": true, - "type": "sms", - "credentials": { - "key": "123456789" - }, - "options": { - "from": "sender-email@mydomain" - } + "path": "\/var\/lib\/postgresql\/data", + "usedPercent": "45%", + "available": "55GB", + "mounted": true } }, - "message": { - "description": "Message", + "usageBillingPlan": { + "description": "usageBillingPlan", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Message ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Message creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Message update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "providerType": { - "type": "string", - "description": "Message provider type.", - "x-example": "email" - }, - "topics": { - "type": "array", - "description": "Topic IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" + "bandwidth": { + "type": "object", + "description": "Bandwidth additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } ] }, - "users": { - "type": "array", - "description": "User IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" + "executions": { + "type": "object", + "description": "Executions additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } ] }, - "targets": { - "type": "array", - "description": "Target IDs set as recipients.", - "items": { - "type": "string" - }, - "x-example": [ - "5e5ea5c16897e" + "member": { + "type": "object", + "description": "Member additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } ] }, - "scheduledAt": { - "type": "string", - "description": "The scheduled time for message.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "realtime": { + "type": "object", + "description": "Realtime additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "deliveredAt": { - "type": "string", - "description": "The time when the message was delivered.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "realtimeMessages": { + "type": "object", + "description": "Realtime messages additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "deliveryErrors": { - "type": "array", - "description": "Delivery errors if any.", - "items": { - "type": "string" - }, - "x-example": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "nullable": true + "realtimeBandwidth": { + "type": "object", + "description": "Realtime bandwidth additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "deliveredTotal": { - "type": "integer", - "description": "Number of recipients the message was delivered to.", - "x-example": 1, - "format": "int32" + "storage": { + "type": "object", + "description": "Storage additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "data": { + "users": { "type": "object", - "additionalProperties": true, - "description": "Data of the message.", - "x-example": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." - } + "description": "User additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] }, - "status": { - "type": "string", - "description": "Status of delivery.", - "x-example": "processing", - "enum": [ - "draft", - "processing", - "scheduled", - "sent", - "failed" + "GBHours": { + "type": "object", + "description": "GBHour additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + }, + "imageTransformations": { + "type": "object", + "description": "Image transformation additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } ] - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "providerType", - "topics", - "users", - "targets", - "deliveredTotal", - "data", - "status" - ], - "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "topics": [ - "5e5ea5c16897e" - ], - "users": [ - "5e5ea5c16897e" - ], - "targets": [ - "5e5ea5c16897e" - ], - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "deliveredAt": "2020-10-15T06:38:00.000+00:00", - "deliveryErrors": [ - "Failed to send message to target 5e5ea5c16897e: Credentials not valid." - ], - "deliveredTotal": 1, - "data": { - "subject": "Welcome to Appwrite", - "content": "Hi there, welcome to Appwrite family." }, - "status": "processing" + "credits": { + "type": "object", + "description": "Credits additional resources", + "x-example": null, + "allOf": [ + { + "$ref": "#\/components\/schemas\/additionalResource" + } + ] + } + }, + "required": [ + "bandwidth", + "executions", + "member", + "realtime", + "realtimeMessages", + "realtimeBandwidth", + "storage", + "users", + "GBHours", + "imageTransformations", + "credits" + ], + "example": { + "bandwidth": null, + "executions": null, + "member": null, + "realtime": null, + "realtimeMessages": null, + "realtimeBandwidth": null, + "storage": null, + "users": null, + "GBHours": null, + "imageTransformations": null, + "credits": null } }, - "topic": { - "description": "Topic", + "app": { + "description": "App", "type": "object", "properties": { "$id": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "App ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Topic creation time in ISO 8601 format.", + "description": "App creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Topic update date in ISO 8601 format.", + "description": "App update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "name": { "type": "string", - "description": "The name of the topic.", - "x-example": "events" + "description": "Application name.", + "x-example": "My Application" }, - "emailTotal": { - "type": "integer", - "description": "Total count of email subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" + "description": { + "type": "string", + "description": "Application description shown to users during OAuth2 consent.", + "x-example": "Connect your workspace to My Application." }, - "smsTotal": { - "type": "integer", - "description": "Total count of SMS subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" + "clientUri": { + "type": "string", + "description": "Application homepage URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com" }, - "pushTotal": { - "type": "integer", - "description": "Total count of push subscribers subscribed to the topic.", - "x-example": 100, - "format": "int32" + "logoUri": { + "type": "string", + "description": "Application logo URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/logo.png" }, - "subscribe": { + "privacyPolicyUrl": { + "type": "string", + "description": "Application privacy policy URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/privacy" + }, + "termsUrl": { + "type": "string", + "description": "Application terms of service URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/terms" + }, + "contacts": { "type": "array", - "description": "Subscribe permissions.", + "description": "Application support or security contact emails.", "items": { "type": "string" }, - "x-example": "users" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "name", - "emailTotal", - "smsTotal", - "pushTotal", - "subscribe" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "events", - "emailTotal": 100, - "smsTotal": 100, - "pushTotal": 100, - "subscribe": "users" - } - }, - "transaction": { - "description": "Transaction", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Transaction ID.", - "x-example": "259125845563242502" - }, - "$createdAt": { - "type": "string", - "description": "Transaction creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "x-example": [ + "support@example.com" + ] }, - "$updatedAt": { + "tagline": { "type": "string", - "description": "Transaction update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Application tagline shown to users during OAuth2 consent.", + "x-example": "Automate your workspace." }, - "status": { - "type": "string", - "description": "Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.", - "x-example": "pending" + "tags": { + "type": "array", + "description": "Application tags shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "x-example": [ + "productivity", + "automation" + ] }, - "operations": { - "type": "integer", - "description": "Number of operations in the transaction.", - "x-example": 5, - "format": "int32" + "labels": { + "type": "array", + "description": "Application labels. Read-only for clients; only a server SDK using a project API key can update them.", + "items": { + "type": "string" + }, + "x-example": [ + "featured" + ] }, - "expiresAt": { - "type": "string", - "description": "Expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "$id", - "$createdAt", - "$updatedAt", - "status", - "operations", - "expiresAt" - ], - "example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "status": "pending", - "operations": 5, - "expiresAt": "2020-10-15T06:38:00.000+00:00" - } - }, - "subscriber": { - "description": "Subscriber", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Subscriber ID.", - "x-example": "259125845563242502" + "images": { + "type": "array", + "description": "Application image URLs shown to users during OAuth2 consent.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/screenshot.png" + ] }, - "$createdAt": { + "supportUrl": { "type": "string", - "description": "Subscriber creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Application support URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/support" }, - "$updatedAt": { + "dataDeletionUrl": { "type": "string", - "description": "Subscriber update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Application data deletion URL shown to users during OAuth2 consent.", + "x-example": "https:\/\/example.com\/data-deletion" }, - "targetId": { - "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "redirectUris": { + "type": "array", + "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/example.com\/callback" + ] }, - "target": { - "type": "object", - "description": "Target.", - "x-example": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" + "postLogoutRedirectUris": { + "type": "array", + "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", + "items": { + "type": "string" }, - "allOf": [ - { - "$ref": "#\/components\/schemas\/target" - } + "x-example": [ + "https:\/\/example.com\/logged-out" ] }, - "userId": { + "enabled": { + "type": "boolean", + "description": "Whether the app is enabled or not.", + "x-example": true + }, + "type": { "type": "string", - "description": "Topic ID.", - "x-example": "5e5ea5c16897e" + "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", + "x-example": "confidential" }, - "userName": { + "deviceFlow": { + "type": "boolean", + "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", + "x-example": false + }, + "teamId": { "type": "string", - "description": "User Name.", - "x-example": "Aegon Targaryen" + "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", + "x-example": "5e5ea5c16897e" }, - "topicId": { + "userId": { "type": "string", - "description": "Topic ID.", - "x-example": "259125845563242502" + "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", + "x-example": "5e5ea5c16897e" }, - "providerType": { + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" + }, + "secrets": { + "type": "array", + "description": "List of application secrets.", + "items": { + "$ref": "#\/components\/schemas\/appSecret" + }, + "x-example": [] } }, "required": [ "$id", "$createdAt", "$updatedAt", - "targetId", - "target", + "name", + "description", + "clientUri", + "logoUri", + "privacyPolicyUrl", + "termsUrl", + "contacts", + "tagline", + "tags", + "labels", + "images", + "supportUrl", + "dataDeletionUrl", + "redirectUris", + "postLogoutRedirectUris", + "enabled", + "type", + "deviceFlow", + "teamId", "userId", - "userName", - "topicId", - "providerType" + "installationScopes", + "installationRedirectUrl", + "secrets" ], "example": { - "$id": "259125845563242502", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "targetId": "259125845563242502", - "target": { - "$id": "259125845563242502", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "providerType": "email", - "providerId": "259125845563242502", - "name": "ageon-app-email", - "identifier": "random-mail@email.org", - "userId": "5e5ea5c16897e" - }, + "name": "My Application", + "description": "Connect your workspace to My Application.", + "clientUri": "https:\/\/example.com", + "logoUri": "https:\/\/example.com\/logo.png", + "privacyPolicyUrl": "https:\/\/example.com\/privacy", + "termsUrl": "https:\/\/example.com\/terms", + "contacts": [ + "support@example.com" + ], + "tagline": "Automate your workspace.", + "tags": [ + "productivity", + "automation" + ], + "labels": [ + "featured" + ], + "images": [ + "https:\/\/example.com\/screenshot.png" + ], + "supportUrl": "https:\/\/example.com\/support", + "dataDeletionUrl": "https:\/\/example.com\/data-deletion", + "redirectUris": [ + "https:\/\/example.com\/callback" + ], + "postLogoutRedirectUris": [ + "https:\/\/example.com\/logged-out" + ], + "enabled": true, + "type": "confidential", + "deviceFlow": false, + "teamId": "5e5ea5c16897e", "userId": "5e5ea5c16897e", - "userName": "Aegon Targaryen", - "topicId": "259125845563242502", - "providerType": "email" + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", + "secrets": [] } }, - "target": { - "description": "Target", + "appSecret": { + "description": "AppSecret", "type": "object", "properties": { "$id": { "type": "string", - "description": "Target ID.", - "x-example": "259125845563242502" + "description": "Secret ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Target creation time in ISO 8601 format.", + "description": "Secret creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Target update date in ISO 8601 format.", + "description": "Secret update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "name": { + "appId": { "type": "string", - "description": "Target Name.", - "x-example": "Apple iPhone 12" + "description": "Application ID this secret belongs to.", + "x-example": "5e5ea5c16897e" }, - "userId": { + "secret": { "type": "string", - "description": "User ID.", - "x-example": "259125845563242502" + "description": "Always empty. The application client secret is returned only once, in the response of the createSecret method.", + "x-example": "" }, - "providerId": { + "hint": { "type": "string", - "description": "Provider ID.", - "x-example": "259125845563242502", - "nullable": true + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "providerType": { + "createdById": { "type": "string", - "description": "The target provider type. Can be one of the following: `email`, `sms` or `push`.", - "x-example": "email" + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "identifier": { + "createdByName": { "type": "string", - "description": "The target identifier.", - "x-example": "token" + "description": "Name of the user who created the secret.", + "x-example": "Walter White" }, - "expired": { - "type": "boolean", - "description": "Is the target expired.", - "x-example": false + "lastAccessedAt": { + "type": "string", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true } }, "required": [ "$id", "$createdAt", "$updatedAt", - "name", - "userId", - "providerType", - "identifier", - "expired" + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { - "$id": "259125845563242502", + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "Apple iPhone 12", - "userId": "259125845563242502", - "providerId": "259125845563242502", - "providerType": "email", - "identifier": "token", - "expired": false + "appId": "5e5ea5c16897e", + "secret": "", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "insight": { - "description": "Insight", + "appSecretPlaintext": { + "description": "AppSecretPlaintext", "type": "object", "properties": { "$id": { "type": "string", - "description": "Insight ID.", + "description": "Secret ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Insight creation date in ISO 8601 format.", + "description": "Secret creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Insight update date in ISO 8601 format.", + "description": "Secret update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "reportId": { + "appId": { "type": "string", - "description": "Parent report ID. Insights always belong to a report.", + "description": "Application ID this secret belongs to.", "x-example": "5e5ea5c16897e" }, - "type": { - "type": "string", - "description": "Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).", - "x-example": "tablesDBIndex" - }, - "severity": { - "type": "string", - "description": "Insight severity. One of info, warning, critical.", - "x-example": "warning" - }, - "status": { - "type": "string", - "description": "Insight status. One of active, dismissed.", - "x-example": "active" - }, - "resourceType": { - "type": "string", - "description": "Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.", - "x-example": "databases" - }, - "resourceId": { - "type": "string", - "description": "ID of the resource the insight is about.", - "x-example": "main" - }, - "parentResourceType": { - "type": "string", - "description": "Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table \u2192 resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.", - "x-example": "tables" - }, - "parentResourceId": { - "type": "string", - "description": "ID of the parent resource. Empty when the resource has no parent.", - "x-example": "orders" - }, - "title": { + "secret": { "type": "string", - "description": "Insight title.", - "x-example": "Missing index on collection orders" + "description": "Application client secret. Returned only when the secret is created; subsequent reads always return an empty value.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "summary": { + "hint": { "type": "string", - "description": "Short markdown summary describing the insight.", - "x-example": "Queries against `orders.status` are scanning the full collection." - }, - "ctas": { - "type": "array", - "description": "List of call-to-action buttons attached to this insight.", - "items": { - "$ref": "#\/components\/schemas\/insightCTA" - }, - "x-example": [] + "description": "Last few characters of the client secret, used to help identify it.", + "x-example": "f5c6c7" }, - "analyzedAt": { + "createdById": { "type": "string", - "description": "Time the insight was analyzed in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "ID of the user who created the secret.", + "x-example": "5e5ea5c16897e" }, - "dismissedAt": { + "createdByName": { "type": "string", - "description": "Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Name of the user who created the secret.", + "x-example": "Walter White" }, - "dismissedBy": { + "lastAccessedAt": { "type": "string", - "description": "User ID that dismissed the insight. Empty when not dismissed.", - "x-example": "5e5ea5c16897e", + "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } }, @@ -78883,164 +95863,134 @@ "$id", "$createdAt", "$updatedAt", - "reportId", - "type", - "severity", - "status", - "resourceType", - "resourceId", - "parentResourceType", - "parentResourceId", - "title", - "summary", - "ctas" + "appId", + "secret", + "hint", + "createdById", + "createdByName" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "reportId": "5e5ea5c16897e", - "type": "tablesDBIndex", - "severity": "warning", - "status": "active", - "resourceType": "databases", - "resourceId": "main", - "parentResourceType": "tables", - "parentResourceId": "orders", - "title": "Missing index on collection orders", - "summary": "Queries against `orders.status` are scanning the full collection.", - "ctas": [], - "analyzedAt": "2020-10-15T06:38:00.000+00:00", - "dismissedAt": "2020-10-15T06:38:00.000+00:00", - "dismissedBy": "5e5ea5c16897e" + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "insightCTA": { - "description": "InsightCTA", + "appScope": { + "description": "AppScope", "type": "object", "properties": { - "label": { + "value": { "type": "string", - "description": "Human-readable label for the CTA, used in UI.", - "x-example": "Create missing index" + "description": "Scope value as requested by apps.", + "x-example": "organization:organization.read" }, - "service": { + "description": { "type": "string", - "description": "Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource \u2014 for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.", - "x-example": "tablesDB" + "description": "Human-readable description of what the scope grants.", + "x-example": "Access to read the organization" }, - "method": { + "type": { "type": "string", - "description": "Public API method on the chosen service the client should invoke when this CTA is triggered.", - "x-example": "createIndex" + "description": "What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable.", + "x-example": "organization" }, - "params": { - "type": "object", - "additionalProperties": true, - "description": "Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId\/tableId\/columns for tablesDB, databaseId\/collectionId\/attributes for the legacy Databases API).", - "x-example": { - "databaseId": "main", - "tableId": "orders", - "key": "_idx_status", - "type": "key", - "columns": [ - "status" - ] - } + "category": { + "type": "string", + "description": "Scope category, used to group scopes on consent and installation screens.", + "x-example": "Organization" + }, + "deprecated": { + "type": "boolean", + "description": "Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants.", + "x-example": false } }, "required": [ - "label", - "service", - "method", - "params" + "value", + "description", + "type", + "category", + "deprecated" ], "example": { - "label": "Create missing index", - "service": "tablesDB", - "method": "createIndex", - "params": { - "databaseId": "main", - "tableId": "orders", - "key": "_idx_status", - "type": "key", - "columns": [ - "status" - ] - } + "value": "organization:organization.read", + "description": "Access to read the organization", + "type": "organization", + "category": "Organization", + "deprecated": false } }, - "report": { - "description": "Report", + "appInstallation": { + "description": "AppInstallation", "type": "object", "properties": { "$id": { "type": "string", - "description": "Report ID.", + "description": "Installation ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Report creation date in ISO 8601 format.", + "description": "Installation creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Report update date in ISO 8601 format.", + "description": "Installation update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "appId": { "type": "string", - "description": "ID of the third-party app that submitted the report.", + "description": "ID of the installed application.", "x-example": "5e5ea5c16897e" }, - "type": { - "type": "string", - "description": "Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.", - "x-example": "lighthouse" - }, - "title": { - "type": "string", - "description": "Short, human-readable title for the report.", - "x-example": "Lighthouse audit for https:\/\/appwrite.io\/" - }, - "summary": { - "type": "string", - "description": "Markdown summary describing the report.", - "x-example": "Performance score 78. 4 opportunities found." - }, - "targetType": { - "type": "string", - "description": "Plural noun describing what the report analyzes, e.g. databases, sites, urls.", - "x-example": "urls" - }, - "target": { + "teamId": { "type": "string", - "description": "Free-form target identifier (URL for lighthouse, resource ID for db).", - "x-example": "https:\/\/appwrite.io\/" + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" }, - "categories": { + "scopes": { "type": "array", - "description": "Categories covered by the report, e.g. performance, accessibility.", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", "items": { "type": "string" }, "x-example": [ - "performance", - "accessibility" + "organization:organization.read" ] }, - "insights": { - "type": "array", - "description": "Insights nested under this report.", - "items": { - "$ref": "#\/components\/schemas\/insight" - }, - "x-example": [] + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] }, - "analyzedAt": { + "createdById": { "type": "string", - "description": "Time the report was analyzed in ISO 8601 format.", + "description": "ID of the user who created the installation.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the installation.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", "x-example": "2020-10-15T06:38:00.000+00:00", "nullable": true } @@ -79050,1076 +96000,1134 @@ "$createdAt", "$updatedAt", "appId", - "type", - "title", - "summary", - "targetType", - "target", - "categories", - "insights" + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" ], "example": { "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", "appId": "5e5ea5c16897e", - "type": "lighthouse", - "title": "Lighthouse audit for https:\/\/appwrite.io\/", - "summary": "Performance score 78. 4 opportunities found.", - "targetType": "urls", - "target": "https:\/\/appwrite.io\/", - "categories": [ - "performance", - "accessibility" + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" ], - "insights": [], - "analyzedAt": "2020-10-15T06:38:00.000+00:00" + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" } }, - "activityEvent": { - "description": "ActivityEvent", + "appKey": { + "description": "AppKey", "type": "object", "properties": { "$id": { "type": "string", - "description": "Event ID.", + "description": "App key ID.", "x-example": "5e5ea5c16897e" }, - "actorType": { - "type": "string", - "description": "Actor type.", - "x-example": "user" - }, - "actorId": { - "type": "string", - "description": "Actor ID.", - "x-example": "610fc2f985ee0" - }, - "actorEmail": { - "type": "string", - "description": "Actor Email.", - "x-example": "john@appwrite.io" - }, - "actorName": { - "type": "string", - "description": "Actor Name.", - "x-example": "John Doe" - }, - "resourceParent": { - "type": "string", - "description": "Resource parent.", - "x-example": "database\/ID" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "collection" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "610fc2f985ee0" - }, - "resource": { + "$createdAt": { "type": "string", - "description": "Resource.", - "x-example": "collections\/610fc2f985ee0" + "description": "App key creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "event": { + "$updatedAt": { "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" + "description": "App key update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "userAgent": { + "appId": { "type": "string", - "description": "User agent.", - "x-example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36" + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" }, - "ip": { + "secret": { "type": "string", - "description": "IP address.", - "x-example": "127.0.0.1" + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" }, - "mode": { + "hint": { "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" }, - "country": { + "createdById": { "type": "string", - "description": "Location.", - "x-example": "US" + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" }, - "time": { + "createdByName": { "type": "string", - "description": "Log creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Name of the user who created the app key.", + "x-example": "Walter White" }, - "projectId": { + "lastAccessedAt": { "type": "string", - "description": "Project ID.", - "x-example": "610fc2f985ee0" - }, - "teamId": { + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2Authorize": { + "description": "OAuth2 Authorize", + "type": "object", + "properties": { + "grantId": { "type": "string", - "description": "Team ID.", - "x-example": "610fc2f985ee0" + "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", + "x-example": "5e5ea5c16897e" }, - "hostname": { + "redirectUrl": { "type": "string", - "description": "Hostname.", - "x-example": "appwrite.io" - }, - "countryCode": { + "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "grantId", + "redirectUrl" + ], + "example": { + "grantId": "5e5ea5c16897e", + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Approve": { + "description": "OAuth2 Approve", + "type": "object", + "properties": { + "redirectUrl": { "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { + "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", + "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "required": [ + "redirectUrl" + ], + "example": { + "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + } + }, + "oauth2Reject": { + "description": "OAuth2 Reject", + "type": "object", + "properties": { + "redirectUrl": { "type": "string", - "description": "Country name.", - "x-example": "United States" + "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", + "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" } }, "required": [ - "$id", - "actorType", - "actorId", - "actorEmail", - "actorName", - "resourceParent", - "resourceType", - "resourceId", - "resource", - "event", - "userAgent", - "ip", - "mode", - "country", - "time", - "projectId", - "teamId", - "hostname", - "countryCode", - "countryName" + "redirectUrl" ], "example": { - "$id": "5e5ea5c16897e", - "actorType": "user", - "actorId": "610fc2f985ee0", - "actorEmail": "john@appwrite.io", - "actorName": "John Doe", - "resourceParent": "database\/ID", - "resourceType": "collection", - "resourceId": "610fc2f985ee0", - "resource": "collections\/610fc2f985ee0", - "event": "account.sessions.create", - "userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.198 Safari\/537.36", - "ip": "127.0.0.1", - "mode": "admin", - "country": "US", - "time": "2020-10-15T06:38:00.000+00:00", - "projectId": "610fc2f985ee0", - "teamId": "610fc2f985ee0", - "hostname": "appwrite.io", - "countryCode": "US", - "countryName": "United States" + "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" } }, - "backupArchive": { - "description": "Archive", + "oauth2Grant": { + "description": "OAuth2 Grant", "type": "object", "properties": { "$id": { "type": "string", - "description": "Archive ID.", + "description": "Grant ID.", "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", - "description": "Archive creation time in ISO 8601 format.", + "description": "Grant creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Archive update date in ISO 8601 format.", + "description": "Grant update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "policyId": { - "type": "string", - "description": "Archive policy ID.", - "x-example": "did8jx6ws45jana098ab7" - }, - "size": { - "type": "integer", - "description": "Archive size in bytes.", - "x-example": 100000, - "format": "int32" - }, - "status": { - "type": "string", - "description": "The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.", - "x-example": "completed" - }, - "startedAt": { + "userId": { "type": "string", - "description": "The backup start time.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "ID of the user the grant belongs to.", + "x-example": "5e5ea5c16897e" }, - "migrationId": { + "appId": { "type": "string", - "description": "Migration ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "ID of the OAuth2 client (app) the grant was requested for.", + "x-example": "5e5ea5c16897e" }, - "services": { + "scopes": { "type": "array", - "description": "The services that are backed up by this archive.", + "description": "Requested OAuth2 scopes the user is being asked to consent to.", "items": { "type": "string" }, - "x-example": "['databases', 'storage']" + "x-example": [ + "openid", + "email", + "profile" + ] }, "resources": { "type": "array", - "description": "The resources that are backed up by this archive.", + "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", "items": { "type": "string" }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" + "x-example": [ + "https:\/\/api.example.com\/" + ] + }, + "authorizationDetails": { + "type": "string", + "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" + }, + "prompt": { + "type": "string", + "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", + "x-example": "login" + }, + "redirectUri": { + "type": "string", + "description": "Redirect URI the user will be sent to after the flow completes.", + "x-example": "https:\/\/example.com\/callback" + }, + "authTime": { + "type": "integer", + "description": "Unix timestamp of when the user last authenticated.", + "x-example": 1592981250, + "format": "int32" + }, + "expire": { + "type": "string", + "description": "Grant expiration time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "userId", + "appId", + "scopes", + "resources", + "authorizationDetails", + "prompt", + "redirectUri", + "authTime", + "expire" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "prompt": "login", + "redirectUri": "https:\/\/example.com\/callback", + "authTime": 1592981250, + "expire": "2020-10-15T06:38:00.000+00:00" + } + }, + "oauth2DeviceAuthorization": { + "description": "OAuth2 Device Authorization", + "type": "object", + "properties": { + "device_code": { + "type": "string", + "description": "Device verification code used by the client to poll the token endpoint.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "user_code": { + "type": "string", + "description": "Short code the end user enters on the verification page.", + "x-example": "ABCD-EFGH" }, - "resourceId": { + "verification_uri": { "type": "string", - "description": "The resource ID to backup. Set only if this archive should backup a single resource.", - "x-example": "DB1", - "nullable": true + "description": "URL where the end user enters the user code.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" }, - "resourceType": { + "verification_uri_complete": { "type": "string", - "description": "The resource type to backup. Set only if this archive should backup a single resource.", - "x-example": "database", - "nullable": true + "description": "Verification URL with the user code prefilled as a query parameter.", + "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" + }, + "expires_in": { + "type": "integer", + "description": "Lifetime of the device code and user code in seconds.", + "x-example": 900, + "format": "int32" + }, + "interval": { + "type": "integer", + "description": "Minimum polling interval for the token endpoint in seconds.", + "x-example": 5, + "format": "int32" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "policyId", - "size", - "status", - "startedAt", - "migrationId", - "services", - "resources" + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "policyId": "did8jx6ws45jana098ab7", - "size": 100000, - "status": "completed", - "startedAt": "2020-10-15T06:38:00.000+00:00", - "migrationId": "did8jx6ws45jana098ab7", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "resourceId": "DB1", - "resourceType": "database" + "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "user_code": "ABCD-EFGH", + "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", + "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", + "expires_in": 900, + "interval": 5 } }, - "billingLimits": { - "description": "Limits", + "oauth2PAR": { + "description": "OAuth2 PAR", "type": "object", "properties": { - "bandwidth": { - "type": "integer", - "description": "Bandwidth limit", - "x-example": 5, - "format": "int32", - "nullable": true + "request_uri": { + "type": "string", + "description": "Authorization request handle to pass to the authorize endpoint.", + "x-example": "urn:appwrite:oauth2:request:5e5ea5c16897e" }, - "storage": { + "expires_in": { "type": "integer", - "description": "Storage limit", - "x-example": 150, - "format": "int32", - "nullable": true + "description": "Lifetime of the authorization request handle in seconds.", + "x-example": 600, + "format": "int32" + } + }, + "required": [ + "request_uri", + "expires_in" + ], + "example": { + "request_uri": "urn:appwrite:oauth2:request:5e5ea5c16897e", + "expires_in": 600 + } + }, + "oauth2Token": { + "description": "OAuth2 Token", + "type": "object", + "properties": { + "access_token": { + "type": "string", + "description": "OAuth2 access token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." }, - "users": { - "type": "integer", - "description": "Users limit", - "x-example": 200000, - "format": "int32", - "nullable": true + "token_type": { + "type": "string", + "description": "OAuth2 token type.", + "x-example": "Bearer" }, - "executions": { + "expires_in": { "type": "integer", - "description": "Executions limit", - "x-example": 750000, - "format": "int32", - "nullable": true + "description": "Access token lifetime in seconds.", + "x-example": 3600, + "format": "int32" }, - "GBHours": { - "type": "integer", - "description": "GBHours limit", - "x-example": 100, - "format": "int32", - "nullable": true + "refresh_token": { + "type": "string", + "description": "OAuth2 refresh token.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, - "imageTransformations": { - "type": "integer", - "description": "Image transformations limit", - "x-example": 100, - "format": "int32", - "nullable": true + "scope": { + "type": "string", + "description": "Space-separated scopes granted to the access token.", + "x-example": "openid email profile" }, - "authPhone": { - "type": "integer", - "description": "Auth phone limit", - "x-example": 10, - "format": "int32", + "authorization_details": { + "type": "string", + "description": "Granted RFC 9396 authorization details as a JSON string.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", "nullable": true }, - "budgetLimit": { - "type": "integer", - "description": "Budget limit percentage", - "x-example": 100, - "format": "int32", + "id_token": { + "type": "string", + "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", + "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", "nullable": true } }, + "required": [ + "access_token", + "token_type", + "expires_in", + "refresh_token", + "scope" + ], "example": { - "bandwidth": 5, - "storage": 150, - "users": 200000, - "executions": 750000, - "GBHours": 100, - "imageTransformations": 100, - "authPhone": 10, - "budgetLimit": 100 + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", + "token_type": "Bearer", + "expires_in": 3600, + "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", + "scope": "openid email profile", + "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } }, - "block": { - "description": "Block", + "oauth2Consent": { + "description": "OAuth2 Consent", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Consent ID.", + "x-example": "5e5ea5c16897e" + }, "$createdAt": { "type": "string", - "description": "Block creation date in ISO 8601 format.", + "description": "Consent creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "resourceType": { + "$updatedAt": { "type": "string", - "description": "Resource type that is blocked", - "x-example": "project" + "description": "Consent update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "resourceId": { + "userId": { "type": "string", - "description": "Resource identifier that is blocked", + "description": "ID of the user the consent belongs to.", "x-example": "5e5ea5c16897e" }, - "reason": { - "type": "string", - "description": "Reason for the block. Can be null if no reason was provided.", - "x-example": "Payment overdue", - "nullable": true - }, - "expiredAt": { + "appId": { "type": "string", - "description": "Block expiration date in ISO 8601 format. Can be null if the block does not expire.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients.", + "x-example": "5e5ea5c16897e" }, - "projectName": { + "cimdUrl": { "type": "string", - "description": "Name of the project this block applies to.", - "x-example": "My Project" + "description": "Client ID metadata document URL of the client the consent was given to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" }, - "region": { - "type": "string", - "description": "Region of the project this block applies to.", - "x-example": "fra" + "scopes": { + "type": "array", + "description": "OAuth2 scopes the user consented to.", + "items": { + "type": "string" + }, + "x-example": [ + "openid", + "email", + "profile" + ] }, - "organizationName": { - "type": "string", - "description": "Name of the organization that owns the project.", - "x-example": "Acme Inc." + "resources": { + "type": "array", + "description": "RFC 8707 resource indicators the user consented to.", + "items": { + "type": "string" + }, + "x-example": [ + "https:\/\/api.example.com\/" + ] }, - "organizationId": { + "authorizationDetails": { "type": "string", - "description": "ID of the organization that owns the project.", - "x-example": "5e5ea5c16897e" + "description": "Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "billingPlan": { + "expire": { "type": "string", - "description": "Billing plan of the organization that owns the project.", - "x-example": "pro" + "description": "Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", "$createdAt", - "resourceType", - "resourceId", - "projectName", - "region", - "organizationName", - "organizationId", - "billingPlan" + "$updatedAt", + "userId", + "appId", + "cimdUrl", + "scopes", + "resources", + "authorizationDetails", + "expire" ], "example": { + "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", - "resourceType": "project", - "resourceId": "5e5ea5c16897e", - "reason": "Payment overdue", - "expiredAt": "2020-10-15T06:38:00.000+00:00", - "projectName": "My Project", - "region": "fra", - "organizationName": "Acme Inc.", - "organizationId": "5e5ea5c16897e", - "billingPlan": "pro" + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" } }, - "backupPolicy": { - "description": "backup", + "oauth2ConsentToken": { + "description": "OAuth2 Consent Token", "type": "object", "properties": { "$id": { "type": "string", - "description": "Backup policy ID.", + "description": "Token family ID.", "x-example": "5e5ea5c16897e" }, - "name": { - "type": "string", - "description": "Backup policy name.", - "x-example": "Hourly backups" - }, "$createdAt": { "type": "string", - "description": "Policy creation date in ISO 8601 format.", + "description": "Token creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Policy update date in ISO 8601 format.", + "description": "Token update date in ISO 8601 format. Refreshing the token family updates this.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "services": { + "consentId": { + "type": "string", + "description": "ID of the consent the token family was issued under.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "ID of the user the token family belongs to.", + "x-example": "5e5ea5c16897e" + }, + "appId": { + "type": "string", + "description": "ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients.", + "x-example": "5e5ea5c16897e" + }, + "cimdUrl": { + "type": "string", + "description": "Client ID metadata document URL of the client the token family was issued to. Empty for registered apps.", + "x-example": "https:\/\/example.com\/.well-known\/client-metadata.json" + }, + "scopes": { "type": "array", - "description": "The services that are backed up by this policy.", + "description": "OAuth2 scopes granted on the token family.", "items": { "type": "string" }, - "x-example": "['databases', 'storage']" + "x-example": [ + "openid", + "email", + "profile" + ] }, "resources": { "type": "array", - "description": "The resources that are backed up by this policy.", + "description": "RFC 8707 resource indicators granted on the token family.", "items": { "type": "string" }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" - }, - "resourceId": { - "type": "string", - "description": "The resource ID to backup. Set only if this policy should backup a single resource.", - "x-example": "DB1", - "nullable": true - }, - "resourceType": { - "type": "string", - "description": "The resource type to backup. Set only if this policy should backup a single resource.", - "x-example": "database", - "nullable": true - }, - "retention": { - "type": "integer", - "description": "How many days to keep the backup before it will be automatically deleted.", - "x-example": 7, - "format": "int32" + "x-example": [ + "https:\/\/api.example.com\/" + ] }, - "schedule": { + "authorizationDetails": { "type": "string", - "description": "Policy backup schedule in CRON format.", - "x-example": "0 * * * *" + "description": "Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields.", + "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" }, - "type": { + "expire": { "type": "string", - "description": "Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup).", - "x-example": "full" - }, - "enabled": { - "type": "boolean", - "description": "Is this policy enabled.", - "x-example": true + "description": "Expiration time of the current access token of this family in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ "$id", - "name", "$createdAt", "$updatedAt", - "services", + "consentId", + "userId", + "appId", + "cimdUrl", + "scopes", "resources", - "retention", - "schedule", - "type", - "enabled" + "authorizationDetails", + "expire" ], "example": { "$id": "5e5ea5c16897e", - "name": "Hourly backups", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "resourceId": "DB1", - "resourceType": "database", - "retention": 7, - "schedule": "0 * * * *", - "type": "full", - "enabled": true + "consentId": "5e5ea5c16897e", + "userId": "5e5ea5c16897e", + "appId": "5e5ea5c16897e", + "cimdUrl": "https:\/\/example.com\/.well-known\/client-metadata.json", + "scopes": [ + "openid", + "email", + "profile" + ], + "resources": [ + "https:\/\/api.example.com\/" + ], + "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", + "expire": "2020-10-15T06:38:00.000+00:00" } }, - "policyDenyAliasedEmail": { - "description": "Policy Deny Aliased Email", + "wafRule": { + "description": "WafRule", "type": "object", "properties": { "$id": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Rule ID.", + "x-example": "wafRule1" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny aliased email policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyDenyDisposableEmail": { - "description": "Policy Deny Disposable Email", - "type": "object", - "properties": { - "$id": { + "$createdAt": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "WAF rule creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny disposable email policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyDenyFreeEmail": { - "description": "Policy Deny Free Email", - "type": "object", - "properties": { - "$id": { + "$updatedAt": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "WAF rule last update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "enabled": { - "type": "boolean", - "description": "Whether the deny free email policy is enabled.", - "x-example": true - } - }, - "required": [ - "$id", - "enabled" - ], - "example": { - "$id": "password-dictionary", - "enabled": true - } - }, - "policyDenyCorporateEmail": { - "description": "Policy Deny Corporate Email", - "type": "object", - "properties": { - "$id": { + "name": { "type": "string", - "description": "Policy ID.", - "x-example": "password-dictionary" + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "projectId": { + "type": "string", + "description": "Project ID.", + "x-example": "cloudConsole" + }, + "resourceType": { + "type": "string", + "description": "Resource type the rule is scoped to.", + "x-example": "functions" + }, + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" + }, + "action": { + "type": "string", + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" }, "enabled": { "type": "boolean", - "description": "Whether the deny non-corporate email policy is enabled.", + "description": "Whether the rule is active.", "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] } }, "required": [ "$id", - "enabled" + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" ], "example": { - "$id": "password-dictionary", - "enabled": true + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] } }, - "backupRestoration": { - "description": "Restoration", + "wafRuleBypass": { + "description": "WafRuleBypass", "type": "object", "properties": { "$id": { "type": "string", - "description": "Restoration ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "Restoration creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Restoration update date in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "archiveId": { + "name": { "type": "string", - "description": "Backup archive ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, - "policyId": { + "description": { "type": "string", - "description": "Backup policy ID.", - "x-example": "did8jx6ws45jana098ab7" + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "status": { + "teamId": { "type": "string", - "description": "The status of the restoration. Possible values: pending, downloading, processing, completed, failed.", - "x-example": "completed" + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "startedAt": { + "projectId": { "type": "string", - "description": "The backup start time.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "description": "Project ID.", + "x-example": "cloudConsole" }, - "migrationId": { + "resourceType": { "type": "string", - "description": "Migration ID.", - "x-example": "did8jx6ws45jana098ab7" - }, - "services": { - "type": "array", - "description": "The services that are backed up by this policy.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'storage']" + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "resources": { - "type": "array", - "description": "The resources that are backed up by this policy.", - "items": { - "type": "string" - }, - "x-example": "['databases', 'collections', 'attributes', 'indexes']" + "resourceId": { + "type": "string", + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "options": { + "action": { "type": "string", - "description": "Optional data in key-value object. ", - "x-example": "{databases.database[{oldId, newId, newName}]}" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" + }, + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] } }, "required": [ "$id", "$createdAt", "$updatedAt", - "archiveId", - "policyId", - "status", - "startedAt", - "migrationId", - "services", - "resources", - "options" + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "archiveId": "did8jx6ws45jana098ab7", - "policyId": "did8jx6ws45jana098ab7", - "status": "completed", - "startedAt": "2020-10-15T06:38:00.000+00:00", - "migrationId": "did8jx6ws45jana098ab7", - "services": "['databases', 'storage']", - "resources": "['databases', 'collections', 'attributes', 'indexes']", - "options": "{databases.database[{oldId, newId, newName}]}" + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] } }, - "usageDataPoint": { - "description": "usageDataPoint", + "wafRuleDeny": { + "description": "WafRuleDeny", "type": "object", "properties": { - "time": { - "type": "string", - "description": "Bucket start timestamp (ISO 8601). When `interval` is omitted this is the request end time, marking the aggregate as-of moment.", - "x-example": "2026-04-09T12:00:00.000+00:00" - }, - "value": { - "type": "integer", - "description": "Aggregated value for the bucket.", - "x-example": 5000, - "format": "int32" - }, - "path": { - "type": "string", - "description": "API endpoint path when broken down by `path`.", - "x-example": "\/v1\/storage\/files", - "nullable": true - }, - "method": { - "type": "string", - "description": "HTTP method when broken down by `method`.", - "x-example": "POST", - "nullable": true - }, - "status": { - "type": "string", - "description": "HTTP status code when broken down by `status`.", - "x-example": "201", - "nullable": true - }, - "service": { - "type": "string", - "description": "API service segment when broken down by `service`.", - "x-example": "storage", - "nullable": true - }, - "country": { + "$id": { "type": "string", - "description": "Country code when broken down by `country`.", - "x-example": "us", - "nullable": true + "description": "Rule ID.", + "x-example": "wafRule1" }, - "region": { + "$createdAt": { "type": "string", - "description": "Appwrite region when broken down by `region`.", - "x-example": "fra", - "nullable": true + "description": "WAF rule creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "hostname": { + "$updatedAt": { "type": "string", - "description": "Caller origin hostname when broken down by `hostname`.", - "x-example": "app.example.com", - "nullable": true + "description": "WAF rule last update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" }, - "osName": { + "name": { "type": "string", - "description": "Operating system name when broken down by `osName`.", - "x-example": "iOS", - "nullable": true + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, - "clientType": { + "description": { "type": "string", - "description": "Client type when broken down by `clientType`.", - "x-example": "browser", - "nullable": true + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "clientName": { + "teamId": { "type": "string", - "description": "Client name when broken down by `clientName`.", - "x-example": "Chrome", - "nullable": true + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "deviceName": { + "projectId": { "type": "string", - "description": "Device classification when broken down by `deviceName`.", - "x-example": "smartphone", - "nullable": true + "description": "Project ID.", + "x-example": "cloudConsole" }, - "teamId": { + "resourceType": { "type": "string", - "description": "Owning team ID when broken down by `teamId`.", - "x-example": "team_abc", - "nullable": true + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, "resourceId": { "type": "string", - "description": "External resource ID when broken down by `resourceId`.", - "x-example": "abc123", - "nullable": true + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "resource": { - "type": "string", - "description": "Resource type when broken down by `resource` (gauges only).", - "x-example": "file", - "nullable": true - } - }, - "required": [ - "time", - "value" - ], - "example": { - "time": "2026-04-09T12:00:00.000+00:00", - "value": 5000, - "path": "\/v1\/storage\/files", - "method": "POST", - "status": "201", - "service": "storage", - "country": "us", - "region": "fra", - "hostname": "app.example.com", - "osName": "iOS", - "clientType": "browser", - "clientName": "Chrome", - "deviceName": "smartphone", - "teamId": "team_abc", - "resourceId": "abc123", - "resource": "file" - } - }, - "usageEventList": { - "description": "usageEventList", - "type": "object", - "properties": { - "interval": { + "action": { "type": "string", - "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", - "x-example": "1d" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "metrics": { - "type": "array", - "description": "One entry per requested metric, each carrying its own points[] time series (sums per bucket \/ dimension over time).", - "items": { - "$ref": "#\/components\/schemas\/usageMetric" - }, - "x-example": "" - } - }, - "required": [ - "interval", - "metrics" - ], - "example": { - "interval": "1d", - "metrics": "" - } - }, - "usageGaugeList": { - "description": "usageGaugeList", - "type": "object", - "properties": { - "interval": { - "type": "string", - "description": "Time interval size (1h or 1d). Empty when the request omits `interval` \u2014 points then carry the request end time as their as-of marker.", - "x-example": "1d" + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" }, - "metrics": { - "type": "array", - "description": "One entry per requested metric, each carrying its own points[] time series (latest-snapshot per bucket \/ dimension via argMax over time).", - "items": { - "$ref": "#\/components\/schemas\/usageMetric" - }, - "x-example": "" - } - }, - "required": [ - "interval", - "metrics" - ], - "example": { - "interval": "1d", - "metrics": "" - } - }, - "usageMetric": { - "description": "usageMetric", - "type": "object", - "properties": { - "metric": { - "type": "string", - "description": "Metric key this series describes.", - "x-example": "files.storage" + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true }, - "points": { - "type": "array", - "description": "Data points for this metric, ordered by time ascending. With `interval`, each entry is one bucket; without, each entry is one row of the dimensional or aggregate breakdown.", - "items": { - "$ref": "#\/components\/schemas\/usageDataPoint" - }, - "x-example": "" + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] } }, "required": [ - "metric", - "points" + "$id", + "$createdAt", + "$updatedAt", + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config" ], "example": { - "metric": "files.storage", - "points": "" + "$id": "wafRule1", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [] } }, - "app": { - "description": "App", + "wafRuleChallenge": { + "description": "WafRuleChallenge", "type": "object", "properties": { "$id": { "type": "string", - "description": "App ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "App creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "App update date in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "name": { "type": "string", - "description": "Application name.", - "x-example": "My Application" + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" }, "description": { "type": "string", - "description": "Application description shown to users during OAuth2 consent.", - "x-example": "Connect your workspace to My Application." - }, - "clientUri": { - "type": "string", - "description": "Application homepage URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com" - }, - "logoUri": { - "type": "string", - "description": "Application logo URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/logo.png" + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" }, - "privacyPolicyUrl": { + "teamId": { "type": "string", - "description": "Application privacy policy URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/privacy" + "description": "Team ID.", + "x-example": "5e5ea5c16897e" }, - "termsUrl": { + "projectId": { "type": "string", - "description": "Application terms of service URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/terms" - }, - "contacts": { - "type": "array", - "description": "Application support or security contact emails.", - "items": { - "type": "string" - }, - "x-example": [ - "support@example.com" - ] + "description": "Project ID.", + "x-example": "cloudConsole" }, - "tagline": { + "resourceType": { "type": "string", - "description": "Application tagline shown to users during OAuth2 consent.", - "x-example": "Automate your workspace." - }, - "tags": { - "type": "array", - "description": "Application tags shown to users during OAuth2 consent.", - "items": { - "type": "string" - }, - "x-example": [ - "productivity", - "automation" - ] - }, - "images": { - "type": "array", - "description": "Application image URLs shown to users during OAuth2 consent.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/screenshot.png" - ] + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "supportUrl": { + "resourceId": { "type": "string", - "description": "Application support URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/support" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "dataDeletionUrl": { + "action": { "type": "string", - "description": "Application data deletion URL shown to users during OAuth2 consent.", - "x-example": "https:\/\/example.com\/data-deletion" - }, - "redirectUris": { - "type": "array", - "description": "List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/callback" - ] + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "postLogoutRedirectUris": { - "type": "array", - "description": "List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session.", - "items": { - "type": "string" - }, - "x-example": [ - "https:\/\/example.com\/logged-out" - ] + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" }, "enabled": { "type": "boolean", - "description": "Whether the app is enabled or not.", + "description": "Whether the rule is active.", "x-example": true }, - "type": { - "type": "string", - "description": "OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret.", - "x-example": "confidential" + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] }, - "deviceFlow": { - "type": "boolean", - "description": "Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628).", - "x-example": false + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] }, - "teamId": { + "challengeType": { "type": "string", - "description": "ID of team that owns the application, if owned by team. Otherwise, user ID will be used.", - "x-example": "5e5ea5c16897e" + "description": "Challenge type enforced when the rule matches.", + "x-example": "compute" }, - "userId": { - "type": "string", - "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", - "x-example": "5e5ea5c16897e" + "difficulty": { + "type": "integer", + "description": "Challenge difficulty from 1 (easiest) to 5 (hardest) enforced when the rule matches.", + "x-example": 3, + "format": "int32" }, - "secrets": { - "type": "array", - "description": "List of application secrets.", - "items": { - "$ref": "#\/components\/schemas\/appSecret" - }, - "x-example": [] + "ttl": { + "type": "integer", + "description": "Seconds a visitor stays cleared after passing the challenge before being challenged again.", + "x-example": 1800, + "format": "int32" } }, "required": [ @@ -80128,491 +97136,541 @@ "$updatedAt", "name", "description", - "clientUri", - "logoUri", - "privacyPolicyUrl", - "termsUrl", - "contacts", - "tagline", - "tags", - "images", - "supportUrl", - "dataDeletionUrl", - "redirectUris", - "postLogoutRedirectUris", - "enabled", - "type", - "deviceFlow", "teamId", - "userId", - "secrets" + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "challengeType", + "difficulty", + "ttl" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "name": "My Application", - "description": "Connect your workspace to My Application.", - "clientUri": "https:\/\/example.com", - "logoUri": "https:\/\/example.com\/logo.png", - "privacyPolicyUrl": "https:\/\/example.com\/privacy", - "termsUrl": "https:\/\/example.com\/terms", - "contacts": [ - "support@example.com" - ], - "tagline": "Automate your workspace.", - "tags": [ - "productivity", - "automation" - ], - "images": [ - "https:\/\/example.com\/screenshot.png" - ], - "supportUrl": "https:\/\/example.com\/support", - "dataDeletionUrl": "https:\/\/example.com\/data-deletion", - "redirectUris": [ - "https:\/\/example.com\/callback" - ], - "postLogoutRedirectUris": [ - "https:\/\/example.com\/logged-out" - ], - "enabled": true, - "type": "confidential", - "deviceFlow": false, + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", "teamId": "5e5ea5c16897e", - "userId": "5e5ea5c16897e", - "secrets": [] + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "challengeType": "compute", + "difficulty": 3, + "ttl": 1800 } }, - "appSecret": { - "description": "AppSecret", + "wafRuleRateLimit": { + "description": "WafRuleRateLimit", "type": "object", "properties": { "$id": { "type": "string", - "description": "Secret ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Secret update time in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appId": { + "name": { "type": "string", - "description": "Application ID this secret belongs to.", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, - "secret": { + "projectId": { "type": "string", - "description": "Hashed application client secret.", - "x-example": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg" + "description": "Project ID.", + "x-example": "cloudConsole" }, - "hint": { + "resourceType": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "createdById": { + "resourceId": { "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "createdByName": { + "action": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "lastAccessedAt": { + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] + }, + "limit": { + "type": "integer", + "description": "Maximum number of matching requests allowed for the given interval.", + "x-example": 1000, + "format": "int32" + }, + "interval": { + "type": "integer", + "description": "Interval in seconds for the rate limit window.", + "x-example": 60, + "format": "int32" + }, + "key": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Rate limit key: `ip` limits per client IP, `userId` limits per authenticated user.", + "x-example": "userId" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "appId", - "secret", - "hint", - "createdById", - "createdByName" + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "limit", + "interval", + "key" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "secret": "$argon2i$v=19$m=16,t=2,p=1$MTIzMTIzMTIzMTIzMQ$3\/ZUl3IWERBO2RIm5rHltg", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "limit": 1000, + "interval": 60, + "key": "userId" } }, - "appSecretPlaintext": { - "description": "AppSecretPlaintext", + "wafRuleRedirect": { + "description": "WafRuleRedirect", "type": "object", "properties": { "$id": { "type": "string", - "description": "Secret ID.", - "x-example": "5e5ea5c16897e" + "description": "Rule ID.", + "x-example": "wafRule1" }, "$createdAt": { "type": "string", - "description": "Secret creation time in ISO 8601 format.", + "description": "WAF rule creation time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, "$updatedAt": { "type": "string", - "description": "Secret update time in ISO 8601 format.", + "description": "WAF rule last update time in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" }, - "appId": { + "name": { "type": "string", - "description": "Application ID this secret belongs to.", + "description": "Human friendly rule name.", + "x-example": "Block anonymous POST traffic" + }, + "description": { + "type": "string", + "description": "Optional description for the rule.", + "x-example": "Blocks anonymous POST calls to \/v1\/graphql" + }, + "teamId": { + "type": "string", + "description": "Team ID.", "x-example": "5e5ea5c16897e" }, - "secret": { + "projectId": { "type": "string", - "description": "Application client secret. Returned in full only when the secret is created; subsequent reads return a masked value.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + "description": "Project ID.", + "x-example": "cloudConsole" }, - "hint": { + "resourceType": { "type": "string", - "description": "Last few characters of the client secret, used to help identify it.", - "x-example": "f5c6c7" + "description": "Resource type the rule is scoped to.", + "x-example": "functions" }, - "createdById": { + "resourceId": { "type": "string", - "description": "ID of the user who created the secret.", - "x-example": "5e5ea5c16897e" + "description": "Resource identifier. Empty for API-wide rules.", + "x-example": "functionId" }, - "createdByName": { + "action": { "type": "string", - "description": "Name of the user who created the secret.", - "x-example": "Walter White" + "description": "Action performed when the rule matches.", + "x-example": "deny", + "enum": [ + "bypass", + "deny", + "challenge", + "rateLimit", + "redirect" + ], + "x-enum-name": "WafRuleAction" }, - "lastAccessedAt": { + "priority": { + "type": "integer", + "description": "Evaluation priority. Lower values execute earlier.", + "x-example": 100, + "format": "int32" + }, + "enabled": { + "type": "boolean", + "description": "Whether the rule is active.", + "x-example": true + }, + "conditions": { + "type": "object", + "additionalProperties": true, + "description": "List of conditions evaluated for this rule.", + "x-example": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ] + }, + "config": { + "type": "object", + "additionalProperties": true, + "description": "Action specific configuration.", + "x-example": [] + }, + "location": { "type": "string", - "description": "Time the secret was last used for authentication in ISO 8601 format. Null if never used.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "nullable": true + "description": "Target location for the redirect.", + "x-example": "\/maintenance" + }, + "statusCode": { + "type": "integer", + "description": "HTTP status code used for the redirect.", + "x-example": 301, + "format": "int32" } }, "required": [ "$id", "$createdAt", "$updatedAt", - "appId", - "secret", - "hint", - "createdById", - "createdByName" + "name", + "description", + "teamId", + "projectId", + "resourceType", + "resourceId", + "action", + "priority", + "enabled", + "conditions", + "config", + "location", + "statusCode" ], "example": { - "$id": "5e5ea5c16897e", + "$id": "wafRule1", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "appId": "5e5ea5c16897e", - "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "hint": "f5c6c7", - "createdById": "5e5ea5c16897e", - "createdByName": "Walter White", - "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + "name": "Block anonymous POST traffic", + "description": "Blocks anonymous POST calls to \/v1\/graphql", + "teamId": "5e5ea5c16897e", + "projectId": "cloudConsole", + "resourceType": "functions", + "resourceId": "functionId", + "action": "deny", + "priority": 100, + "enabled": true, + "conditions": [ + { + "method": "equal", + "attribute": "ip", + "values": [ + "127.0.0.1" + ] + } + ], + "config": [], + "location": "\/maintenance", + "statusCode": 301 } }, - "oauth2Authorize": { - "description": "OAuth2 Authorize", + "wafRuleList": { + "description": "WAF rule list", "type": "object", "properties": { - "grantId": { - "type": "string", - "description": "OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead.", - "x-example": "5e5ea5c16897e" + "total": { + "type": "integer", + "description": "Total number of rules that matched your query.", + "x-example": 5, + "format": "int32" }, - "redirectUrl": { - "type": "string", - "description": "URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "rules": { + "type": "array", + "description": "List of rules.", + "items": { + "$ref": "#\/components\/schemas\/wafRule" + }, + "x-example": "" } }, "required": [ - "grantId", - "redirectUrl" + "total", + "rules" ], "example": { - "grantId": "5e5ea5c16897e", - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "total": 5, + "rules": "" } }, - "oauth2Approve": { - "description": "OAuth2 Approve", + "oauth2Project": { + "description": "OAuth2 Project", "type": "object", "properties": { - "redirectUrl": { + "$id": { "type": "string", - "description": "URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and\/or `id_token` along with the original `state`.", - "x-example": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "region": { + "type": "string", + "description": "Region ID the project is deployed in.", + "x-example": "fra" + }, + "endpoint": { + "type": "string", + "description": "API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured.", + "x-example": "https:\/\/fra.cloud.appwrite.io\/v1" } }, "required": [ - "redirectUrl" + "$id", + "region", + "endpoint" ], "example": { - "redirectUrl": "https:\/\/example.com\/callback?code=abcde&state=fghij" + "$id": "5e5ea5c16897e", + "region": "fra", + "endpoint": "https:\/\/fra.cloud.appwrite.io\/v1" } }, - "oauth2Reject": { - "description": "OAuth2 Reject", + "oauth2Organization": { + "description": "OAuth2 Organization", "type": "object", "properties": { - "redirectUrl": { + "$id": { "type": "string", - "description": "URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error.", - "x-example": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + "description": "Organization ID.", + "x-example": "5e5ea5c16897e" } }, "required": [ - "redirectUrl" + "$id" ], "example": { - "redirectUrl": "https:\/\/example.com\/callback?error=access_denied&state=fghij" + "$id": "5e5ea5c16897e" } }, - "oauth2Grant": { - "description": "OAuth2 Grant", + "oauth2ProjectList": { + "description": "OAuth2 accessible projects list", "type": "object", "properties": { - "$id": { - "type": "string", - "description": "Grant ID.", - "x-example": "5e5ea5c16897e" - }, - "$createdAt": { - "type": "string", - "description": "Grant creation time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Grant update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "userId": { - "type": "string", - "description": "ID of the user the grant belongs to.", - "x-example": "5e5ea5c16897e" - }, - "appId": { - "type": "string", - "description": "ID of the OAuth2 client (app) the grant was requested for.", - "x-example": "5e5ea5c16897e" + "total": { + "type": "integer", + "description": "Total number of projects that matched your query.", + "x-example": 5, + "format": "int32" }, - "scopes": { + "projects": { "type": "array", - "description": "Requested OAuth2 scopes the user is being asked to consent to.", + "description": "List of projects.", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/oauth2Project" }, - "x-example": [ - "openid", - "email", - "profile" - ] + "x-example": "" + } + }, + "required": [ + "total", + "projects" + ], + "example": { + "total": 5, + "projects": "" + } + }, + "oauth2OrganizationList": { + "description": "OAuth2 accessible organizations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of organizations that matched your query.", + "x-example": 5, + "format": "int32" }, - "resources": { + "organizations": { "type": "array", - "description": "Requested RFC 8707 resource indicators the user is being asked to consent to.", + "description": "List of organizations.", "items": { - "type": "string" + "$ref": "#\/components\/schemas\/oauth2Organization" }, - "x-example": [ - "https:\/\/api.example.com\/" - ] - }, - "authorizationDetails": { - "type": "string", - "description": "Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields.", - "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]" - }, - "prompt": { - "type": "string", - "description": "OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account.", - "x-example": "login" - }, - "redirectUri": { - "type": "string", - "description": "Redirect URI the user will be sent to after the flow completes.", - "x-example": "https:\/\/example.com\/callback" - }, - "authTime": { - "type": "integer", - "description": "Unix timestamp of when the user last authenticated.", - "x-example": 1592981250, - "format": "int32" - }, - "expire": { - "type": "string", - "description": "Grant expiration time in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" + "x-example": "" } }, "required": [ - "$id", - "$createdAt", - "$updatedAt", - "userId", - "appId", - "scopes", - "resources", - "authorizationDetails", - "prompt", - "redirectUri", - "authTime", - "expire" + "total", + "organizations" ], "example": { - "$id": "5e5ea5c16897e", - "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00", - "userId": "5e5ea5c16897e", - "appId": "5e5ea5c16897e", - "scopes": [ - "openid", - "email", - "profile" - ], - "resources": [ - "https:\/\/api.example.com\/" - ], - "authorizationDetails": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\",\"create_event\"]}]", - "prompt": "login", - "redirectUri": "https:\/\/example.com\/callback", - "authTime": 1592981250, - "expire": "2020-10-15T06:38:00.000+00:00" + "total": 5, + "organizations": "" } }, - "oauth2DeviceAuthorization": { - "description": "OAuth2 Device Authorization", + "oauth2ConsentList": { + "description": "OAuth2 consents list", "type": "object", "properties": { - "device_code": { - "type": "string", - "description": "Device verification code used by the client to poll the token endpoint.", - "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" - }, - "user_code": { - "type": "string", - "description": "Short code the end user enters on the verification page.", - "x-example": "ABCD-EFGH" - }, - "verification_uri": { - "type": "string", - "description": "URL where the end user enters the user code.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device" - }, - "verification_uri_complete": { - "type": "string", - "description": "Verification URL with the user code prefilled as a query parameter.", - "x-example": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH" - }, - "expires_in": { - "type": "integer", - "description": "Lifetime of the device code and user code in seconds.", - "x-example": 900, - "format": "int32" - }, - "interval": { + "total": { "type": "integer", - "description": "Minimum polling interval for the token endpoint in seconds.", + "description": "Total number of consents that matched your query.", "x-example": 5, "format": "int32" + }, + "consents": { + "type": "array", + "description": "List of consents.", + "items": { + "$ref": "#\/components\/schemas\/oauth2Consent" + }, + "x-example": "" } }, "required": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" + "total", + "consents" ], "example": { - "device_code": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", - "user_code": "ABCD-EFGH", - "verification_uri": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device", - "verification_uri_complete": "https:\/\/cloud.appwrite.io\/console\/oauth2\/device?user_code=ABCD-EFGH", - "expires_in": 900, - "interval": 5 + "total": 5, + "consents": "" } }, - "oauth2Token": { - "description": "OAuth2 Token", + "oauth2ConsentTokenList": { + "description": "OAuth2 consent tokens list", "type": "object", "properties": { - "access_token": { - "type": "string", - "description": "OAuth2 access token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." - }, - "token_type": { - "type": "string", - "description": "OAuth2 token type.", - "x-example": "Bearer" - }, - "expires_in": { + "total": { "type": "integer", - "description": "Access token lifetime in seconds.", - "x-example": 3600, + "description": "Total number of tokens that matched your query.", + "x-example": 5, "format": "int32" }, - "refresh_token": { - "type": "string", - "description": "OAuth2 refresh token.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." - }, - "scope": { - "type": "string", - "description": "Space-separated scopes granted to the access token.", - "x-example": "openid email profile" - }, - "authorization_details": { - "type": "string", - "description": "Granted RFC 9396 authorization details as a JSON string.", - "x-example": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "nullable": true - }, - "id_token": { - "type": "string", - "description": "OpenID Connect ID token. Returned when the `openid` scope is granted.", - "x-example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "nullable": true + "tokens": { + "type": "array", + "description": "List of tokens.", + "items": { + "$ref": "#\/components\/schemas\/oauth2ConsentToken" + }, + "x-example": "" } }, "required": [ - "access_token", - "token_type", - "expires_in", - "refresh_token", - "scope" + "total", + "tokens" ], "example": { - "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...", - "token_type": "Bearer", - "expires_in": 3600, - "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", - "scope": "openid email profile", - "authorization_details": "[{\"type\":\"calendar\",\"identifier\":\"primary\",\"actions\":[\"read_events\"]}]", - "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." + "total": 5, + "tokens": "" } }, "activityEventList": { @@ -80727,6 +97785,34 @@ "restorations": "" } }, + "dedicatedDatabaseList": { + "description": "Dedicated databases list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of databases that matched your query.", + "x-example": 5, + "format": "int32" + }, + "databases": { + "type": "array", + "description": "List of databases.", + "items": { + "$ref": "#\/components\/schemas\/dedicatedDatabase" + }, + "x-example": "" + } + }, + "required": [ + "total", + "databases" + ], + "example": { + "total": 5, + "databases": "" + } + }, "appsList": { "description": "Apps list", "type": "object", @@ -80782,6 +97868,90 @@ "total": 5, "secrets": "" } + }, + "appScopeList": { + "description": "App scopes list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of scopes that matched your query.", + "x-example": 5, + "format": "int32" + }, + "scopes": { + "type": "array", + "description": "List of scopes.", + "items": { + "$ref": "#\/components\/schemas\/appScope" + }, + "x-example": "" + } + }, + "required": [ + "total", + "scopes" + ], + "example": { + "total": 5, + "scopes": "" + } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": { @@ -80814,6 +97984,15 @@ "demo": "<YOUR_API_KEY>" } }, + "Organization": { + "type": "apiKey", + "name": "X-Appwrite-Organization", + "description": "Your organization ID", + "in": "header", + "x-appwrite": { + "demo": "<YOUR_ORGANIZATION_ID>" + } + }, "JWT": { "type": "apiKey", "name": "X-Appwrite-JWT", @@ -80823,6 +98002,12 @@ "demo": "<YOUR_JWT>" } }, + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "The OAuth access token to authenticate with" + }, "Locale": { "type": "apiKey", "name": "X-Appwrite-Locale",